Mech Mini 'Revamp'. Will need playtesting. (#5480)

* Exosuits are now capable of holding more equipment, of specific types.

* Tweaks regarding feedback in staffside thread, other concerns.

* Tweak to be more consistent. Why did the Odysseus have two universals. Tweak to weapon restriction on Med - > Odyss

* Weapons only fit in universal combat slots.
This commit is contained in:
Mechoid
2018-08-21 13:08:58 -07:00
committed by Anewbe
parent 51ad266de7
commit 6f909ce590
18 changed files with 1613 additions and 1358 deletions

View File

@@ -10,6 +10,13 @@
damage_absorption = list("brute"=0.7,"fire"=1,"bullet"=0.7,"laser"=0.85,"energy"=1,"bomb"=0.8) damage_absorption = list("brute"=0.7,"fire"=1,"bullet"=0.7,"laser"=0.85,"energy"=1,"bomb"=0.8)
var/am = "d3c2fbcadca903a41161ccc9df9cf948" var/am = "d3c2fbcadca903a41161ccc9df9cf948"
max_hull_equip = 2
max_weapon_equip = 2
max_utility_equip = 1
max_universal_equip = 1
max_special_equip = 1
cargo_capacity = 1
/* /*
/obj/mecha/combat/range_action(target as obj|mob|turf) /obj/mecha/combat/range_action(target as obj|mob|turf)
if(internal_damage&MECHA_INT_CONTROL_LOST) if(internal_damage&MECHA_INT_CONTROL_LOST)

View File

@@ -6,6 +6,7 @@
step_in = 4 step_in = 4
dir_in = 1 //Facing North. dir_in = 1 //Facing North.
health = 400 health = 400
maxhealth = 400
deflect_chance = 20 deflect_chance = 20
damage_absorption = list("brute"=0.5,"fire"=1.1,"bullet"=0.65,"laser"=0.85,"energy"=0.9,"bomb"=0.8) damage_absorption = list("brute"=0.5,"fire"=1.1,"bullet"=0.65,"laser"=0.85,"energy"=0.9,"bomb"=0.8)
max_temperature = 30000 max_temperature = 30000
@@ -15,6 +16,12 @@
var/defence_deflect = 35 var/defence_deflect = 35
wreckage = /obj/effect/decal/mecha_wreckage/durand wreckage = /obj/effect/decal/mecha_wreckage/durand
max_hull_equip = 2
max_weapon_equip = 1
max_utility_equip = 2
max_universal_equip = 1
max_special_equip = 1
/* /*
/obj/mecha/combat/durand/New() /obj/mecha/combat/durand/New()
..() ..()

View File

@@ -64,6 +64,7 @@
pixel_x = -16 pixel_x = -16
step_in = 10 step_in = 10
health = 5000 health = 5000
maxhealth = 5000
opacity = 0 // Because there's big tall legs to look through. Also it looks fucky if this is set to 1. opacity = 0 // Because there's big tall legs to look through. Also it looks fucky if this is set to 1.
deflect_chance = 50 deflect_chance = 50
damage_absorption = list("brute"=0.1,"fire"=0.8,"bullet"=0.1,"laser"=0.6,"energy"=0.7,"bomb"=0.7) //values show how much damage will pass through, not how much will be absorbed. damage_absorption = list("brute"=0.1,"fire"=0.8,"bullet"=0.1,"laser"=0.6,"energy"=0.7,"bomb"=0.7) //values show how much damage will pass through, not how much will be absorbed.
@@ -79,6 +80,12 @@
internal_damage_threshold = 25 internal_damage_threshold = 25
force = 60 force = 60
max_equip = 5 max_equip = 5
//This will (Should) never be in the hands of players. If it is, the one who inflicted this monster upon the server can edit these vars to not be insane.
max_hull_equip = 5
max_weapon_equip = 5
max_utility_equip = 5
max_universal_equip = 5
max_special_equip = 2
/obj/mecha/combat/gorilla/New() /obj/mecha/combat/gorilla/New()
..() ..()

View File

@@ -6,6 +6,7 @@
step_in = 3 step_in = 3
dir_in = 1 //Facing North. dir_in = 1 //Facing North.
health = 300 health = 300
maxhealth = 300
deflect_chance = 15 deflect_chance = 15
damage_absorption = list("brute"=0.75,"fire"=1,"bullet"=0.8,"laser"=0.7,"energy"=0.85,"bomb"=1) damage_absorption = list("brute"=0.75,"fire"=1,"bullet"=0.8,"laser"=0.7,"energy"=0.85,"bomb"=1)
max_temperature = 25000 max_temperature = 25000
@@ -16,12 +17,19 @@
internal_damage_threshold = 35 internal_damage_threshold = 35
max_equip = 3 max_equip = 3
max_hull_equip = 1
max_weapon_equip = 2
max_utility_equip = 2
max_universal_equip = 1
max_special_equip = 1
/obj/mecha/combat/gygax/dark /obj/mecha/combat/gygax/dark
desc = "A lightweight exosuit used by Heavy Asset Protection. A significantly upgraded Gygax security mech." desc = "A lightweight exosuit used by Heavy Asset Protection. A significantly upgraded Gygax security mech."
name = "Dark Gygax" name = "Dark Gygax"
icon_state = "darkgygax" icon_state = "darkgygax"
initial_icon = "darkgygax" initial_icon = "darkgygax"
health = 400 health = 400
maxhealth = 400
deflect_chance = 25 deflect_chance = 25
damage_absorption = list("brute"=0.6,"fire"=0.8,"bullet"=0.6,"laser"=0.5,"energy"=0.65,"bomb"=0.8) damage_absorption = list("brute"=0.6,"fire"=0.8,"bullet"=0.6,"laser"=0.5,"energy"=0.65,"bomb"=0.8)
max_temperature = 45000 max_temperature = 45000
@@ -30,6 +38,12 @@
max_equip = 4 max_equip = 4
step_energy_drain = 5 step_energy_drain = 5
max_hull_equip = 1
max_weapon_equip = 2
max_utility_equip = 2
max_universal_equip = 1
max_special_equip = 2
/obj/mecha/combat/gygax/dark/New() /obj/mecha/combat/gygax/dark/New()
..() ..()
var/obj/item/mecha_parts/mecha_equipment/ME = new /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/scattershot var/obj/item/mecha_parts/mecha_equipment/ME = new /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/scattershot

View File

@@ -5,6 +5,7 @@
initial_icon = "marauder" initial_icon = "marauder"
step_in = 5 step_in = 5
health = 500 health = 500
maxhealth = 500
deflect_chance = 25 deflect_chance = 25
damage_absorption = list("brute"=0.5,"fire"=0.7,"bullet"=0.45,"laser"=0.6,"energy"=0.7,"bomb"=0.7) damage_absorption = list("brute"=0.5,"fire"=0.7,"bullet"=0.45,"laser"=0.6,"energy"=0.7,"bomb"=0.7)
max_temperature = 60000 max_temperature = 60000
@@ -22,6 +23,12 @@
force = 45 force = 45
max_equip = 4 max_equip = 4
max_hull_equip = 3
max_weapon_equip = 3
max_utility_equip = 3
max_universal_equip = 1
max_special_equip = 1
/obj/mecha/combat/marauder/seraph /obj/mecha/combat/marauder/seraph
desc = "Heavy-duty, command-type exosuit. This is a custom model, utilized only by high-ranking military personnel." desc = "Heavy-duty, command-type exosuit. This is a custom model, utilized only by high-ranking military personnel."
name = "Seraph" name = "Seraph"
@@ -62,7 +69,7 @@
var/obj/item/mecha_parts/mecha_equipment/ME var/obj/item/mecha_parts/mecha_equipment/ME
if(equipment.len)//Now to remove it and equip anew. if(equipment.len)//Now to remove it and equip anew.
for(ME in equipment) for(ME in equipment)
equipment -= ME ME.detach()
qdel(ME) qdel(ME)
ME = new /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/scattershot(src) ME = new /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/scattershot(src)
ME.attach(src) ME.attach(src)

View File

@@ -7,6 +7,7 @@
dir_in = 1 //Facing North. dir_in = 1 //Facing North.
step_energy_drain = 3 step_energy_drain = 3
health = 200 health = 200
maxhealth = 200
deflect_chance = 30 deflect_chance = 30
damage_absorption = list("brute"=0.7,"fire"=0.7,"bullet"=0.7,"laser"=0.7,"energy"=0.7,"bomb"=0.7) damage_absorption = list("brute"=0.7,"fire"=0.7,"bullet"=0.7,"laser"=0.7,"energy"=0.7,"bomb"=0.7)
max_temperature = 25000 max_temperature = 25000
@@ -20,6 +21,11 @@
var/phasing_energy_drain = 200 var/phasing_energy_drain = 200
max_equip = 4 max_equip = 4
max_hull_equip = 3
max_weapon_equip = 3
max_utility_equip = 3
max_universal_equip = 3
max_special_equip = 4
/obj/mecha/combat/phazon/New() /obj/mecha/combat/phazon/New()
..() ..()

View File

@@ -1,5 +1,9 @@
//DO NOT ADD MECHA PARTS TO THE GAME WITH THE DEFAULT "SPRITE ME" SPRITE! //DO NOT ADD MECHA PARTS TO THE GAME WITH THE DEFAULT "SPRITE ME" SPRITE!
//I'm annoyed I even have to tell you this! SPRITE FIRST, then commit. //I'm annoyed I even have to tell you this! SPRITE FIRST, then commit.
#define EQUIP_HULL 1
#define EQUIP_WEAPON 2
#define EQUIP_UTILITY 3
#define EQUIP_SPECIAL 4
/obj/item/mecha_parts/mecha_equipment /obj/item/mecha_parts/mecha_equipment
name = "mecha equipment" name = "mecha equipment"
@@ -14,7 +18,7 @@
var/range = MELEE //bitflags var/range = MELEE //bitflags
var/salvageable = 1 var/salvageable = 1
var/required_type = /obj/mecha //may be either a type or a list of allowed types var/required_type = /obj/mecha //may be either a type or a list of allowed types
var/equip_type = null //mechaequip2
/obj/item/mecha_parts/mecha_equipment/proc/do_after_cooldown(target=1) /obj/item/mecha_parts/mecha_equipment/proc/do_after_cooldown(target=1)
sleep(equip_cooldown) sleep(equip_cooldown)
@@ -43,6 +47,20 @@
/obj/item/mecha_parts/mecha_equipment/proc/destroy()//missiles detonating, teleporter creating singularity? /obj/item/mecha_parts/mecha_equipment/proc/destroy()//missiles detonating, teleporter creating singularity?
if(chassis) if(chassis)
if(equip_type)
if(equip_type == EQUIP_HULL)
chassis.hull_equipment -= src
listclearnulls(chassis.hull_equipment)
if(equip_type == EQUIP_WEAPON)
chassis.weapon_equipment -= src
listclearnulls(chassis.weapon_equipment)
if(equip_type == EQUIP_UTILITY)
chassis.utility_equipment -= src
listclearnulls(chassis.utility_equipment)
if(equip_type == EQUIP_SPECIAL)
chassis.special_equipment -= src
listclearnulls(chassis.special_equipment)
chassis.universal_equipment -= src
chassis.equipment -= src chassis.equipment -= src
listclearnulls(chassis.equipment) listclearnulls(chassis.equipment)
if(chassis.selected == src) if(chassis.selected == src)
@@ -89,19 +107,49 @@
return return
/obj/item/mecha_parts/mecha_equipment/proc/can_attach(obj/mecha/M as obj) /obj/item/mecha_parts/mecha_equipment/proc/can_attach(obj/mecha/M as obj)
if(M.equipment.len >= M.max_equip) //if(M.equipment.len >= M.max_equip)
// return 0
for(var/obj/item/mecha_parts/mecha_equipment/ME in M.equipment) //Exact duplicate components aren't allowed.
if(ME.type == src.type)
return 0 return 0
if(equip_type == EQUIP_HULL && M.hull_equipment.len < M.max_hull_equip)
if (ispath(required_type)) return 1
if(equip_type == EQUIP_WEAPON && M.weapon_equipment.len < M.max_weapon_equip)
return 1
if(equip_type == EQUIP_UTILITY && M.utility_equipment.len < M.max_utility_equip)
return 1
if(equip_type == EQUIP_SPECIAL && M.special_equipment.len < M.max_special_equip)
return 1
if(equip_type != EQUIP_SPECIAL && M.universal_equipment.len < M.max_universal_equip) //The exosuit needs to be military grade to actually have a universal slot capable of accepting a true weapon.
if(equip_type == EQUIP_WEAPON && !istype(M, /obj/mecha/combat))
return 0
return 1
/*if (ispath(required_type))
return istype(M, required_type) return istype(M, required_type)
for (var/path in required_type) for (var/path in required_type)
if (istype(M, path)) if (istype(M, path))
return 1 return 1
*/
return 0 return 0
/obj/item/mecha_parts/mecha_equipment/proc/attach(obj/mecha/M as obj) /obj/item/mecha_parts/mecha_equipment/proc/attach(obj/mecha/M as obj)
//M.equipment += src
var/has_equipped = 0
if(equip_type == EQUIP_HULL && M.hull_equipment.len < M.max_hull_equip && !has_equipped)
M.hull_equipment += src
has_equipped = 1
if(equip_type == EQUIP_WEAPON && M.weapon_equipment.len < M.max_weapon_equip && !has_equipped)
M.weapon_equipment += src
has_equipped = 1
if(equip_type == EQUIP_UTILITY && M.utility_equipment.len < M.max_utility_equip && !has_equipped)
M.utility_equipment += src
has_equipped = 1
if(equip_type == EQUIP_SPECIAL && M.special_equipment.len < M.max_special_equip && !has_equipped)
M.special_equipment += src
has_equipped = 1
if(equip_type != EQUIP_SPECIAL && M.universal_equipment.len < M.max_universal_equip && !has_equipped)
M.universal_equipment += src
M.equipment += src M.equipment += src
chassis = M chassis = M
src.loc = M src.loc = M
@@ -115,6 +163,17 @@
moveto = moveto || get_turf(chassis) moveto = moveto || get_turf(chassis)
if(src.Move(moveto)) if(src.Move(moveto))
chassis.equipment -= src chassis.equipment -= src
chassis.universal_equipment -= src
if(equip_type)
switch(equip_type)
if(EQUIP_HULL)
chassis.hull_equipment -= src
if(EQUIP_WEAPON)
chassis.weapon_equipment -= src
if(EQUIP_UTILITY)
chassis.utility_equipment -= src
if(EQUIP_SPECIAL)
chassis.special_equipment -= src
if(chassis.selected == src) if(chassis.selected == src)
chassis.selected = null chassis.selected = null
update_chassis_page() update_chassis_page()

View File

@@ -13,22 +13,22 @@
required_type = /obj/mecha/medical required_type = /obj/mecha/medical
salvageable = 0 salvageable = 0
New() /obj/item/mecha_parts/mecha_equipment/tool/sleeper/New()
..() ..()
pr_mech_sleeper = new /datum/global_iterator/mech_sleeper(list(src),0) pr_mech_sleeper = new /datum/global_iterator/mech_sleeper(list(src),0)
pr_mech_sleeper.set_delay(equip_cooldown) pr_mech_sleeper.set_delay(equip_cooldown)
return return
Destroy() /obj/item/mecha_parts/mecha_equipment/tool/sleeper/Destroy()
qdel(pr_mech_sleeper) qdel(pr_mech_sleeper)
for(var/atom/movable/AM in src) for(var/atom/movable/AM in src)
AM.forceMove(get_turf(src)) AM.forceMove(get_turf(src))
return ..() return ..()
Exit(atom/movable/O) /obj/item/mecha_parts/mecha_equipment/tool/sleeper/Exit(atom/movable/O)
return 0 return 0
action(var/mob/living/carbon/human/target) /obj/item/mecha_parts/mecha_equipment/tool/sleeper/action(var/mob/living/carbon/human/target)
if(!action_checks(target)) if(!action_checks(target))
return return
if(!istype(target)) if(!istype(target))
@@ -69,7 +69,7 @@
log_message("[target] loaded. Life support functions engaged.") log_message("[target] loaded. Life support functions engaged.")
return return
proc/go_out() /obj/item/mecha_parts/mecha_equipment/tool/sleeper/proc/go_out()
if(!occupant) if(!occupant)
return return
occupant.forceMove(get_turf(src)) occupant.forceMove(get_turf(src))
@@ -87,14 +87,14 @@
set_ready_state(1) set_ready_state(1)
return return
detach() /obj/item/mecha_parts/mecha_equipment/tool/sleeper/detach()
if(occupant) if(occupant)
occupant_message("Unable to detach [src] - equipment occupied.") occupant_message("Unable to detach [src] - equipment occupied.")
return return
pr_mech_sleeper.stop() pr_mech_sleeper.stop()
return ..() return ..()
get_equip_info() /obj/item/mecha_parts/mecha_equipment/tool/sleeper/get_equip_info()
var/output = ..() var/output = ..()
if(output) if(output)
var/temp = "" var/temp = ""
@@ -103,7 +103,7 @@
return "[output] [temp]" return "[output] [temp]"
return return
Topic(href,href_list) /obj/item/mecha_parts/mecha_equipment/tool/sleeper/Topic(href,href_list)
..() ..()
var/datum/topic_input/top_filter = new /datum/topic_input(href,href_list) var/datum/topic_input/top_filter = new /datum/topic_input(href,href_list)
if(top_filter.get("eject")) if(top_filter.get("eject"))
@@ -116,7 +116,7 @@
inject_reagent(top_filter.getType("inject",/datum/reagent),top_filter.getObj("source")) inject_reagent(top_filter.getType("inject",/datum/reagent),top_filter.getObj("source"))
return return
proc/get_occupant_stats() /obj/item/mecha_parts/mecha_equipment/tool/sleeper/proc/get_occupant_stats()
if(!occupant) if(!occupant)
return return
return {"<html> return {"<html>
@@ -145,7 +145,7 @@
</body> </body>
</html>"} </html>"}
proc/get_occupant_dam() /obj/item/mecha_parts/mecha_equipment/tool/sleeper/proc/get_occupant_dam()
var/t1 var/t1
switch(occupant.stat) switch(occupant.stat)
if(0) if(0)
@@ -164,14 +164,14 @@
<font color="[occupant.getFireLoss() < 60 ? "blue" : "red"]"><b>Burn Severity:</b> [occupant.getFireLoss()]%</font><br /> <font color="[occupant.getFireLoss() < 60 ? "blue" : "red"]"><b>Burn Severity:</b> [occupant.getFireLoss()]%</font><br />
"} "}
proc/get_occupant_reagents() /obj/item/mecha_parts/mecha_equipment/tool/sleeper/proc/get_occupant_reagents()
if(occupant.reagents) if(occupant.reagents)
for(var/datum/reagent/R in occupant.reagents.reagent_list) for(var/datum/reagent/R in occupant.reagents.reagent_list)
if(R.volume > 0) if(R.volume > 0)
. += "[R]: [round(R.volume,0.01)]<br />" . += "[R]: [round(R.volume,0.01)]<br />"
return . || "None" return . || "None"
proc/get_available_reagents() /obj/item/mecha_parts/mecha_equipment/tool/sleeper/proc/get_available_reagents()
var/output var/output
var/obj/item/mecha_parts/mecha_equipment/tool/syringe_gun/SG = locate(/obj/item/mecha_parts/mecha_equipment/tool/syringe_gun) in chassis var/obj/item/mecha_parts/mecha_equipment/tool/syringe_gun/SG = locate(/obj/item/mecha_parts/mecha_equipment/tool/syringe_gun) in chassis
if(SG && SG.reagents && islist(SG.reagents.reagent_list)) if(SG && SG.reagents && islist(SG.reagents.reagent_list))
@@ -181,7 +181,7 @@
return output return output
proc/inject_reagent(var/datum/reagent/R,var/obj/item/mecha_parts/mecha_equipment/tool/syringe_gun/SG) /obj/item/mecha_parts/mecha_equipment/tool/sleeper/proc/inject_reagent(var/datum/reagent/R,var/obj/item/mecha_parts/mecha_equipment/tool/syringe_gun/SG)
if(!R || !occupant || !SG || !(SG in chassis.equipment)) if(!R || !occupant || !SG || !(SG in chassis.equipment))
return 0 return 0
var/to_inject = min(R.volume, inject_amount) var/to_inject = min(R.volume, inject_amount)
@@ -196,7 +196,7 @@
update_equip_info() update_equip_info()
return return
update_equip_info() /obj/item/mecha_parts/mecha_equipment/tool/sleeper/update_equip_info()
if(..()) if(..())
send_byjax(chassis.occupant,"msleeper.browser","lossinfo",get_occupant_dam()) send_byjax(chassis.occupant,"msleeper.browser","lossinfo",get_occupant_dam())
send_byjax(chassis.occupant,"msleeper.browser","reagents",get_occupant_reagents()) send_byjax(chassis.occupant,"msleeper.browser","reagents",get_occupant_reagents())
@@ -219,7 +219,7 @@
/datum/global_iterator/mech_sleeper /datum/global_iterator/mech_sleeper
process(var/obj/item/mecha_parts/mecha_equipment/tool/sleeper/S) /datum/global_iterator/mech_sleeper/process(var/obj/item/mecha_parts/mecha_equipment/tool/sleeper/S)
if(!S.chassis) if(!S.chassis)
S.set_ready_state(1) S.set_ready_state(1)
return stop() return stop()
@@ -257,25 +257,25 @@
var/max_cable = 1000 var/max_cable = 1000
required_type = /obj/mecha/working required_type = /obj/mecha/working
New() /obj/item/mecha_parts/mecha_equipment/tool/cable_layer/New()
cable = new(src) cable = new(src)
cable.amount = 0 cable.amount = 0
..() ..()
attach() /obj/item/mecha_parts/mecha_equipment/tool/cable_layer/attach()
..() ..()
event = chassis.events.addEvent("onMove",src,"layCable") event = chassis.events.addEvent("onMove",src,"layCable")
return return
detach() /obj/item/mecha_parts/mecha_equipment/tool/cable_layer/detach()
chassis.events.clearEvent("onMove",event) chassis.events.clearEvent("onMove",event)
return ..() return ..()
destroy() /obj/item/mecha_parts/mecha_equipment/tool/cable_layer/destroy()
chassis.events.clearEvent("onMove",event) chassis.events.clearEvent("onMove",event)
return ..() return ..()
action(var/obj/item/stack/cable_coil/target) /obj/item/mecha_parts/mecha_equipment/tool/cable_layer/action(var/obj/item/stack/cable_coil/target)
if(!action_checks(target)) if(!action_checks(target))
return return
var/result = load_cable(target) var/result = load_cable(target)
@@ -290,7 +290,7 @@
occupant_message(message) occupant_message(message)
return return
Topic(href,href_list) /obj/item/mecha_parts/mecha_equipment/tool/cable_layer/Topic(href,href_list)
..() ..()
if(href_list["toggle"]) if(href_list["toggle"])
set_ready_state(!equip_ready) set_ready_state(!equip_ready)
@@ -309,13 +309,13 @@
occupant_message("There's no more cable on the reel.") occupant_message("There's no more cable on the reel.")
return return
get_equip_info() /obj/item/mecha_parts/mecha_equipment/tool/cable_layer/get_equip_info()
var/output = ..() var/output = ..()
if(output) if(output)
return "[output] \[Cable: [cable ? cable.amount : 0] m\][(cable && cable.amount) ? "- <a href='?src=\ref[src];toggle=1'>[!equip_ready?"Dea":"A"]ctivate</a>|<a href='?src=\ref[src];cut=1'>Cut</a>" : null]" return "[output] \[Cable: [cable ? cable.amount : 0] m\][(cable && cable.amount) ? "- <a href='?src=\ref[src];toggle=1'>[!equip_ready?"Dea":"A"]ctivate</a>|<a href='?src=\ref[src];cut=1'>Cut</a>" : null]"
return return
proc/load_cable(var/obj/item/stack/cable_coil/CC) /obj/item/mecha_parts/mecha_equipment/tool/cable_layer/proc/load_cable(var/obj/item/stack/cable_coil/CC)
if(istype(CC) && CC.amount) if(istype(CC) && CC.amount)
var/cur_amount = cable? cable.amount : 0 var/cur_amount = cable? cable.amount : 0
var/to_load = max(max_cable - cur_amount,0) var/to_load = max(max_cable - cur_amount,0)
@@ -331,7 +331,7 @@
return 0 return 0
return return
proc/use_cable(amount) /obj/item/mecha_parts/mecha_equipment/tool/cable_layer/proc/use_cable(amount)
if(!cable || cable.amount<1) if(!cable || cable.amount<1)
set_ready_state(1) set_ready_state(1)
occupant_message("Cable depleted, [src] deactivated.") occupant_message("Cable depleted, [src] deactivated.")
@@ -344,17 +344,17 @@
update_equip_info() update_equip_info()
return 1 return 1
proc/reset() /obj/item/mecha_parts/mecha_equipment/tool/cable_layer/proc/reset()
last_piece = null last_piece = null
proc/dismantleFloor(var/turf/new_turf) /obj/item/mecha_parts/mecha_equipment/tool/cable_layer/proc/dismantleFloor(var/turf/new_turf)
if(istype(new_turf, /turf/simulated/floor)) if(istype(new_turf, /turf/simulated/floor))
var/turf/simulated/floor/T = new_turf var/turf/simulated/floor/T = new_turf
if(!T.is_plating()) if(!T.is_plating())
T.make_plating(!(T.broken || T.burnt)) T.make_plating(!(T.broken || T.burnt))
return new_turf.is_plating() return new_turf.is_plating()
proc/layCable(var/turf/new_turf) /obj/item/mecha_parts/mecha_equipment/tool/cable_layer/proc/layCable(var/turf/new_turf)
if(equip_ready || !istype(new_turf) || !dismantleFloor(new_turf)) if(equip_ready || !istype(new_turf) || !dismantleFloor(new_turf))
return reset() return reset()
var/fdirn = turn(chassis.dir,180) var/fdirn = turn(chassis.dir,180)
@@ -404,7 +404,7 @@
origin_tech = list(TECH_MATERIAL = 3, TECH_BIO = 4, TECH_MAGNET = 4, TECH_DATA = 3) origin_tech = list(TECH_MATERIAL = 3, TECH_BIO = 4, TECH_MAGNET = 4, TECH_DATA = 3)
required_type = /obj/mecha/medical required_type = /obj/mecha/medical
New() /obj/item/mecha_parts/mecha_equipment/tool/syringe_gun/New()
..() ..()
flags |= NOREACT flags |= NOREACT
syringes = new syringes = new
@@ -413,22 +413,22 @@
create_reagents(max_volume) create_reagents(max_volume)
synth = new (list(src),0) synth = new (list(src),0)
detach() /obj/item/mecha_parts/mecha_equipment/tool/syringe_gun/detach()
synth.stop() synth.stop()
return ..() return ..()
critfail() /obj/item/mecha_parts/mecha_equipment/tool/syringe_gun/critfail()
..() ..()
flags &= ~NOREACT flags &= ~NOREACT
return return
get_equip_info() /obj/item/mecha_parts/mecha_equipment/tool/syringe_gun/get_equip_info()
var/output = ..() var/output = ..()
if(output) if(output)
return "[output] \[<a href=\"?src=\ref[src];toggle_mode=1\">[mode? "Analyze" : "Launch"]</a>\]<br />\[Syringes: [syringes.len]/[max_syringes] | Reagents: [reagents.total_volume]/[reagents.maximum_volume]\]<br /><a href='?src=\ref[src];show_reagents=1'>Reagents list</a>" return "[output] \[<a href=\"?src=\ref[src];toggle_mode=1\">[mode? "Analyze" : "Launch"]</a>\]<br />\[Syringes: [syringes.len]/[max_syringes] | Reagents: [reagents.total_volume]/[reagents.maximum_volume]\]<br /><a href='?src=\ref[src];show_reagents=1'>Reagents list</a>"
return return
action(atom/movable/target) /obj/item/mecha_parts/mecha_equipment/tool/syringe_gun/action(atom/movable/target)
if(!action_checks(target)) if(!action_checks(target))
return return
if(istype(target,/obj/item/weapon/reagent_containers/syringe)) if(istype(target,/obj/item/weapon/reagent_containers/syringe))
@@ -488,7 +488,7 @@
return 1 return 1
Topic(href,href_list) /obj/item/mecha_parts/mecha_equipment/tool/syringe_gun/Topic(href,href_list)
..() ..()
var/datum/topic_input/top_filter = new (href,href_list) var/datum/topic_input/top_filter = new (href,href_list)
if(top_filter.get("toggle_mode")) if(top_filter.get("toggle_mode"))
@@ -526,7 +526,7 @@
return return
return return
proc/get_reagents_page() /obj/item/mecha_parts/mecha_equipment/tool/syringe_gun/proc/get_reagents_page()
var/output = {"<html> var/output = {"<html>
<head> <head>
<title>Reagent Synthesizer</title> <title>Reagent Synthesizer</title>
@@ -554,7 +554,7 @@
"} "}
return output return output
proc/get_reagents_form() /obj/item/mecha_parts/mecha_equipment/tool/syringe_gun/proc/get_reagents_form()
var/r_list = get_reagents_list() var/r_list = get_reagents_list()
var/inputs var/inputs
if(r_list) if(r_list)
@@ -569,14 +569,14 @@
"} "}
return output return output
proc/get_reagents_list() /obj/item/mecha_parts/mecha_equipment/tool/syringe_gun/proc/get_reagents_list()
var/output var/output
for(var/i=1 to known_reagents.len) for(var/i=1 to known_reagents.len)
var/reagent_id = known_reagents[i] var/reagent_id = known_reagents[i]
output += {"<input type="checkbox" value="[reagent_id]" name="reagent_[i]" [(reagent_id in processed_reagents)? "checked=\"1\"" : null]> [known_reagents[reagent_id]]<br />"} output += {"<input type="checkbox" value="[reagent_id]" name="reagent_[i]" [(reagent_id in processed_reagents)? "checked=\"1\"" : null]> [known_reagents[reagent_id]]<br />"}
return output return output
proc/get_current_reagents() /obj/item/mecha_parts/mecha_equipment/tool/syringe_gun/proc/get_current_reagents()
var/output var/output
for(var/datum/reagent/R in reagents.reagent_list) for(var/datum/reagent/R in reagents.reagent_list)
if(R.volume > 0) if(R.volume > 0)
@@ -585,7 +585,7 @@
output += "Total: [round(reagents.total_volume,0.001)]/[reagents.maximum_volume] - <a href=\"?src=\ref[src];purge_all=1\">Purge All</a>" output += "Total: [round(reagents.total_volume,0.001)]/[reagents.maximum_volume] - <a href=\"?src=\ref[src];purge_all=1\">Purge All</a>"
return output || "None" return output || "None"
proc/load_syringe(obj/item/weapon/reagent_containers/syringe/S) /obj/item/mecha_parts/mecha_equipment/tool/syringe_gun/proc/load_syringe(obj/item/weapon/reagent_containers/syringe/S)
if(syringes.len<max_syringes) if(syringes.len<max_syringes)
if(get_dist(src,S) >= 2) if(get_dist(src,S) >= 2)
occupant_message("The syringe is too far away.") occupant_message("The syringe is too far away.")
@@ -607,7 +607,7 @@
occupant_message("The [src] syringe chamber is full.") occupant_message("The [src] syringe chamber is full.")
return 0 return 0
proc/analyze_reagents(atom/A) /obj/item/mecha_parts/mecha_equipment/tool/syringe_gun/proc/analyze_reagents(atom/A)
if(get_dist(src,A) >= 4) if(get_dist(src,A) >= 4)
occupant_message("The object is too far away.") occupant_message("The object is too far away.")
return 0 return 0
@@ -622,7 +622,7 @@
occupant_message("Analyzis complete.") occupant_message("Analyzis complete.")
return 1 return 1
proc/add_known_reagent(r_id,r_name) /obj/item/mecha_parts/mecha_equipment/tool/syringe_gun/proc/add_known_reagent(r_id,r_name)
set_ready_state(0) set_ready_state(0)
do_after_cooldown() do_after_cooldown()
if(!(r_id in known_reagents)) if(!(r_id in known_reagents))
@@ -632,14 +632,14 @@
return 0 return 0
update_equip_info() /obj/item/mecha_parts/mecha_equipment/tool/syringe_gun/update_equip_info()
if(..()) if(..())
send_byjax(chassis.occupant,"msyringegun.browser","reagents",get_current_reagents()) send_byjax(chassis.occupant,"msyringegun.browser","reagents",get_current_reagents())
send_byjax(chassis.occupant,"msyringegun.browser","reagents_form",get_reagents_form()) send_byjax(chassis.occupant,"msyringegun.browser","reagents_form",get_reagents_form())
return 1 return 1
return return
on_reagent_change() /obj/item/mecha_parts/mecha_equipment/tool/syringe_gun/on_reagent_change()
..() ..()
update_equip_info() update_equip_info()
return return
@@ -647,7 +647,7 @@
/datum/global_iterator/mech_synth /datum/global_iterator/mech_synth
delay = 100 delay = 100
process(var/obj/item/mecha_parts/mecha_equipment/tool/syringe_gun/S) /datum/global_iterator/mech_synth/process(var/obj/item/mecha_parts/mecha_equipment/tool/syringe_gun/S)
if(!S.chassis) if(!S.chassis)
return stop() return stop()
var/energy_drain = S.energy_drain*10 var/energy_drain = S.energy_drain*10

View File

@@ -1,3 +1,6 @@
/obj/item/mecha_parts/mecha_equipment/tool
equip_type = EQUIP_UTILITY
/obj/item/mecha_parts/mecha_equipment/tool/hydraulic_clamp /obj/item/mecha_parts/mecha_equipment/tool/hydraulic_clamp
name = "hydraulic clamp" name = "hydraulic clamp"
icon_state = "mecha_clamp" icon_state = "mecha_clamp"
@@ -7,12 +10,12 @@
var/obj/mecha/working/ripley/cargo_holder var/obj/mecha/working/ripley/cargo_holder
required_type = /obj/mecha/working required_type = /obj/mecha/working
attach(obj/mecha/M as obj) /obj/item/mecha_parts/mecha_equipment/tool/hydraulic_clamp/attach(obj/mecha/M as obj)
..() ..()
cargo_holder = M cargo_holder = M
return return
action(atom/target) /obj/item/mecha_parts/mecha_equipment/tool/hydraulic_clamp/action(atom/target)
if(!action_checks(target)) return if(!action_checks(target)) return
if(!cargo_holder) return if(!cargo_holder) return
@@ -77,7 +80,7 @@
force = 15 force = 15
required_type = list(/obj/mecha/working/ripley, /obj/mecha/combat) required_type = list(/obj/mecha/working/ripley, /obj/mecha/combat)
action(atom/target) /obj/item/mecha_parts/mecha_equipment/tool/drill/action(atom/target)
if(!action_checks(target)) return if(!action_checks(target)) return
if(isobj(target)) if(isobj(target))
var/obj/target_obj = target var/obj/target_obj = target
@@ -128,7 +131,7 @@
equip_cooldown = 20 equip_cooldown = 20
force = 15 force = 15
action(atom/target) /obj/item/mecha_parts/mecha_equipment/tool/drill/diamonddrill/action(atom/target)
if(!action_checks(target)) return if(!action_checks(target)) return
if(isobj(target)) if(isobj(target))
var/obj/target_obj = target var/obj/target_obj = target
@@ -174,14 +177,14 @@
var/spray_amount = 5 //units of liquid per particle. 5 is enough to wet the floor - it's a big fire extinguisher, so should be fine var/spray_amount = 5 //units of liquid per particle. 5 is enough to wet the floor - it's a big fire extinguisher, so should be fine
var/max_water = 1000 var/max_water = 1000
New() /obj/item/mecha_parts/mecha_equipment/tool/extinguisher/New()
reagents = new/datum/reagents(max_water) reagents = new/datum/reagents(max_water)
reagents.my_atom = src reagents.my_atom = src
reagents.add_reagent("water", max_water) reagents.add_reagent("water", max_water)
..() ..()
return return
action(atom/target) //copypasted from extinguisher. TODO: Rewrite from scratch. /obj/item/mecha_parts/mecha_equipment/tool/extinguisher/action(atom/target) //copypasted from extinguisher. TODO: Rewrite from scratch.
if(!action_checks(target) || get_dist(chassis, target)>3) return if(!action_checks(target) || get_dist(chassis, target)>3) return
if(get_dist(chassis, target)>2) return if(get_dist(chassis, target)>2) return
set_ready_state(0) set_ready_state(0)
@@ -227,10 +230,10 @@
W.set_up(my_target) W.set_up(my_target)
return 1 return 1
get_equip_info() /obj/item/mecha_parts/mecha_equipment/tool/extinguisher/get_equip_info()
return "[..()] \[[src.reagents.total_volume]\]" return "[..()] \[[src.reagents.total_volume]\]"
on_reagent_change() /obj/item/mecha_parts/mecha_equipment/tool/extinguisher/on_reagent_change()
return return
@@ -245,7 +248,9 @@
var/mode = 0 //0 - deconstruct, 1 - wall or floor, 2 - airlock. var/mode = 0 //0 - deconstruct, 1 - wall or floor, 2 - airlock.
var/disabled = 0 //malf var/disabled = 0 //malf
action(atom/target) equip_type = EQUIP_SPECIAL
/obj/item/mecha_parts/mecha_equipment/tool/rcd/action(atom/target)
if(istype(target,/area/shuttle)||istype(target, /turf/space/transit))//>implying these are ever made -Sieve if(istype(target,/area/shuttle)||istype(target, /turf/space/transit))//>implying these are ever made -Sieve
disabled = 1 disabled = 1
else else
@@ -317,8 +322,7 @@
chassis.use_power(energy_drain*2) chassis.use_power(energy_drain*2)
return return
/obj/item/mecha_parts/mecha_equipment/tool/rcd/Topic(href,href_list)
Topic(href,href_list)
..() ..()
if(href_list["mode"]) if(href_list["mode"])
mode = text2num(href_list["mode"]) mode = text2num(href_list["mode"])
@@ -331,7 +335,7 @@
occupant_message("Switched RCD to Construct Airlock.") occupant_message("Switched RCD to Construct Airlock.")
return return
get_equip_info() /obj/item/mecha_parts/mecha_equipment/tool/rcd/get_equip_info()
return "[..()] \[<a href='?src=\ref[src];mode=0'>D</a>|<a href='?src=\ref[src];mode=1'>C</a>|<a href='?src=\ref[src];mode=2'>A</a>\]" return "[..()] \[<a href='?src=\ref[src];mode=0'>D</a>|<a href='?src=\ref[src];mode=1'>C</a>|<a href='?src=\ref[src];mode=2'>A</a>\]"
@@ -346,7 +350,9 @@
energy_drain = 1000 energy_drain = 1000
range = RANGED range = RANGED
action(atom/target) equip_type = EQUIP_SPECIAL
/obj/item/mecha_parts/mecha_equipment/teleporter/action(atom/target)
if(!action_checks(target) || src.loc.z == 2) return if(!action_checks(target) || src.loc.z == 2) return
var/turf/T = get_turf(target) var/turf/T = get_turf(target)
if(T) if(T)
@@ -366,8 +372,9 @@
energy_drain = 300 energy_drain = 300
range = RANGED range = RANGED
equip_type = EQUIP_SPECIAL
action(atom/target) /obj/item/mecha_parts/mecha_equipment/wormhole_generator/action(atom/target)
if(!action_checks(target) || src.loc.z == 2) return if(!action_checks(target) || src.loc.z == 2) return
var/list/theareas = list() var/list/theareas = list()
for(var/area/AR in orange(100, chassis)) for(var/area/AR in orange(100, chassis))
@@ -421,7 +428,9 @@
var/last_fired = 0 //Concept stolen from guns. var/last_fired = 0 //Concept stolen from guns.
var/fire_delay = 10 //Used to prevent spam-brute against humans. var/fire_delay = 10 //Used to prevent spam-brute against humans.
action(atom/movable/target) equip_type = EQUIP_UTILITY
/obj/item/mecha_parts/mecha_equipment/gravcatapult/action(atom/movable/target)
if(world.time >= last_fired + fire_delay) if(world.time >= last_fired + fire_delay)
last_fired = world.time last_fired = world.time
@@ -472,10 +481,10 @@
do_after_cooldown() do_after_cooldown()
return return
get_equip_info() /obj/item/mecha_parts/mecha_equipment/gravcatapult/get_equip_info()
return "[..()] [mode==1?"([locked||"Nothing"])":null] \[<a href='?src=\ref[src];mode=1'>S</a>|<a href='?src=\ref[src];mode=2'>P</a>\]" return "[..()] [mode==1?"([locked||"Nothing"])":null] \[<a href='?src=\ref[src];mode=1'>S</a>|<a href='?src=\ref[src];mode=2'>P</a>\]"
Topic(href, href_list) /obj/item/mecha_parts/mecha_equipment/gravcatapult/Topic(href, href_list)
..() ..()
if(href_list["mode"]) if(href_list["mode"])
mode = text2num(href_list["mode"]) mode = text2num(href_list["mode"])
@@ -494,27 +503,29 @@
var/deflect_coeff = 1.15 var/deflect_coeff = 1.15
var/damage_coeff = 0.8 var/damage_coeff = 0.8
can_attach(obj/mecha/M as obj) equip_type = EQUIP_HULL
/obj/item/mecha_parts/mecha_equipment/anticcw_armor_booster/can_attach(obj/mecha/M as obj)
if(..()) if(..())
if(!M.proc_res["dynattackby"]) if(!M.proc_res["dynattackby"])
return 1 return 1
return 0 return 0
attach(obj/mecha/M as obj) /obj/item/mecha_parts/mecha_equipment/anticcw_armor_booster/attach(obj/mecha/M as obj)
..() ..()
chassis.proc_res["dynattackby"] = src chassis.proc_res["dynattackby"] = src
return return
detach() /obj/item/mecha_parts/mecha_equipment/anticcw_armor_booster/detach()
chassis.proc_res["dynattackby"] = null chassis.proc_res["dynattackby"] = null
..() ..()
return return
get_equip_info() /obj/item/mecha_parts/mecha_equipment/anticcw_armor_booster/get_equip_info()
if(!chassis) return if(!chassis) return
return "<span style=\"color:[equip_ready?"#0f0":"#f00"];\">*</span>&nbsp;[src.name]" return "<span style=\"color:[equip_ready?"#0f0":"#f00"];\">*</span>&nbsp;[src.name]"
proc/dynattackby(obj/item/weapon/W as obj, mob/user as mob) /obj/item/mecha_parts/mecha_equipment/anticcw_armor_booster/proc/dynattackby(obj/item/weapon/W as obj, mob/user as mob)
if(!action_checks(user)) if(!action_checks(user))
return chassis.dynattackby(W,user) return chassis.dynattackby(W,user)
chassis.log_message("Attacked by [W]. Attacker - [user]") chassis.log_message("Attacked by [W]. Attacker - [user]")
@@ -543,29 +554,31 @@
var/deflect_coeff = 1.15 var/deflect_coeff = 1.15
var/damage_coeff = 0.8 var/damage_coeff = 0.8
can_attach(obj/mecha/M as obj) equip_type = EQUIP_HULL
/obj/item/mecha_parts/mecha_equipment/antiproj_armor_booster/can_attach(obj/mecha/M as obj)
if(..()) if(..())
if(!M.proc_res["dynbulletdamage"] && !M.proc_res["dynhitby"]) if(!M.proc_res["dynbulletdamage"] && !M.proc_res["dynhitby"])
return 1 return 1
return 0 return 0
attach(obj/mecha/M as obj) /obj/item/mecha_parts/mecha_equipment/antiproj_armor_booster/attach(obj/mecha/M as obj)
..() ..()
chassis.proc_res["dynbulletdamage"] = src chassis.proc_res["dynbulletdamage"] = src
chassis.proc_res["dynhitby"] = src chassis.proc_res["dynhitby"] = src
return return
detach() /obj/item/mecha_parts/mecha_equipment/antiproj_armor_booster/detach()
chassis.proc_res["dynbulletdamage"] = null chassis.proc_res["dynbulletdamage"] = null
chassis.proc_res["dynhitby"] = null chassis.proc_res["dynhitby"] = null
..() ..()
return return
get_equip_info() /obj/item/mecha_parts/mecha_equipment/antiproj_armor_booster/get_equip_info()
if(!chassis) return if(!chassis) return
return "<span style=\"color:[equip_ready?"#0f0":"#f00"];\">*</span>&nbsp;[src.name]" return "<span style=\"color:[equip_ready?"#0f0":"#f00"];\">*</span>&nbsp;[src.name]"
proc/dynbulletdamage(var/obj/item/projectile/Proj) /obj/item/mecha_parts/mecha_equipment/antiproj_armor_booster/proc/dynbulletdamage(var/obj/item/projectile/Proj)
if(!action_checks(src)) if(!action_checks(src))
return chassis.dynbulletdamage(Proj) return chassis.dynbulletdamage(Proj)
if(prob(chassis.deflect_chance*deflect_coeff)) if(prob(chassis.deflect_chance*deflect_coeff))
@@ -581,7 +594,7 @@
do_after_cooldown() do_after_cooldown()
return return
proc/dynhitby(atom/movable/A) /obj/item/mecha_parts/mecha_equipment/antiproj_armor_booster/proc/dynhitby(atom/movable/A)
if(!action_checks(A)) if(!action_checks(A))
return chassis.dynhitby(A) return chassis.dynhitby(A)
if(prob(chassis.deflect_chance*deflect_coeff) || istype(A, /mob/living) || istype(A, /obj/item/mecha_parts/mecha_tracking)) if(prob(chassis.deflect_chance*deflect_coeff) || istype(A, /mob/living) || istype(A, /obj/item/mecha_parts/mecha_tracking))
@@ -615,40 +628,42 @@
var/icon/droid_overlay var/icon/droid_overlay
var/list/repairable_damage = list(MECHA_INT_TEMP_CONTROL,MECHA_INT_TANK_BREACH) var/list/repairable_damage = list(MECHA_INT_TEMP_CONTROL,MECHA_INT_TANK_BREACH)
New() equip_type = EQUIP_HULL
/obj/item/mecha_parts/mecha_equipment/repair_droid/New()
..() ..()
pr_repair_droid = new /datum/global_iterator/mecha_repair_droid(list(src),0) pr_repair_droid = new /datum/global_iterator/mecha_repair_droid(list(src),0)
pr_repair_droid.set_delay(equip_cooldown) pr_repair_droid.set_delay(equip_cooldown)
return return
Destroy() /obj/item/mecha_parts/mecha_equipment/repair_droid/Destroy()
qdel(pr_repair_droid) qdel(pr_repair_droid)
pr_repair_droid = null pr_repair_droid = null
..() ..()
attach(obj/mecha/M as obj) /obj/item/mecha_parts/mecha_equipment/repair_droid/attach(obj/mecha/M as obj)
..() ..()
droid_overlay = new(src.icon, icon_state = "repair_droid") droid_overlay = new(src.icon, icon_state = "repair_droid")
M.overlays += droid_overlay M.overlays += droid_overlay
return return
destroy() /obj/item/mecha_parts/mecha_equipment/repair_droid/destroy()
chassis.overlays -= droid_overlay chassis.overlays -= droid_overlay
..() ..()
return return
detach() /obj/item/mecha_parts/mecha_equipment/repair_droid/detach()
chassis.overlays -= droid_overlay chassis.overlays -= droid_overlay
pr_repair_droid.stop() pr_repair_droid.stop()
..() ..()
return return
get_equip_info() /obj/item/mecha_parts/mecha_equipment/repair_droid/get_equip_info()
if(!chassis) return if(!chassis) return
return "<span style=\"color:[equip_ready?"#0f0":"#f00"];\">*</span>&nbsp;[src.name] - <a href='?src=\ref[src];toggle_repairs=1'>[pr_repair_droid.active()?"Dea":"A"]ctivate</a>" return "<span style=\"color:[equip_ready?"#0f0":"#f00"];\">*</span>&nbsp;[src.name] - <a href='?src=\ref[src];toggle_repairs=1'>[pr_repair_droid.active()?"Dea":"A"]ctivate</a>"
Topic(href, href_list) /obj/item/mecha_parts/mecha_equipment/repair_droid/Topic(href, href_list)
..() ..()
if(href_list["toggle_repairs"]) if(href_list["toggle_repairs"])
chassis.overlays -= droid_overlay chassis.overlays -= droid_overlay
@@ -666,7 +681,7 @@
/datum/global_iterator/mecha_repair_droid /datum/global_iterator/mecha_repair_droid
process(var/obj/item/mecha_parts/mecha_equipment/repair_droid/RD as obj) /datum/global_iterator/mecha_repair_droid/process(var/obj/item/mecha_parts/mecha_equipment/repair_droid/RD as obj)
if(!RD.chassis) if(!RD.chassis)
stop() stop()
RD.set_ready_state(1) RD.set_ready_state(1)
@@ -708,37 +723,39 @@
var/coeff = 100 var/coeff = 100
var/list/use_channels = list(EQUIP,ENVIRON,LIGHT) var/list/use_channels = list(EQUIP,ENVIRON,LIGHT)
New() equip_type = EQUIP_UTILITY
/obj/item/mecha_parts/mecha_equipment/tesla_energy_relay/New()
..() ..()
pr_energy_relay = new /datum/global_iterator/mecha_energy_relay(list(src),0) pr_energy_relay = new /datum/global_iterator/mecha_energy_relay(list(src),0)
pr_energy_relay.set_delay(equip_cooldown) pr_energy_relay.set_delay(equip_cooldown)
return return
Destroy() /obj/item/mecha_parts/mecha_equipment/tesla_energy_relay/Destroy()
qdel(pr_energy_relay) qdel(pr_energy_relay)
pr_energy_relay = null pr_energy_relay = null
..() ..()
detach() /obj/item/mecha_parts/mecha_equipment/tesla_energy_relay/detach()
pr_energy_relay.stop() pr_energy_relay.stop()
// chassis.proc_res["dynusepower"] = null // chassis.proc_res["dynusepower"] = null
chassis.proc_res["dyngetcharge"] = null chassis.proc_res["dyngetcharge"] = null
..() ..()
return return
attach(obj/mecha/M) /obj/item/mecha_parts/mecha_equipment/tesla_energy_relay/attach(obj/mecha/M)
..() ..()
chassis.proc_res["dyngetcharge"] = src chassis.proc_res["dyngetcharge"] = src
// chassis.proc_res["dynusepower"] = src // chassis.proc_res["dynusepower"] = src
return return
can_attach(obj/mecha/M) /obj/item/mecha_parts/mecha_equipment/tesla_energy_relay/can_attach(obj/mecha/M)
if(..()) if(..())
if(!M.proc_res["dyngetcharge"])// && !M.proc_res["dynusepower"]) if(!M.proc_res["dyngetcharge"])// && !M.proc_res["dynusepower"])
return 1 return 1
return 0 return 0
proc/dyngetcharge() /obj/item/mecha_parts/mecha_equipment/tesla_energy_relay/proc/dyngetcharge()
if(equip_ready) //disabled if(equip_ready) //disabled
return chassis.dyngetcharge() return chassis.dyngetcharge()
var/area/A = get_area(chassis) var/area/A = get_area(chassis)
@@ -750,7 +767,7 @@
return chassis.dyngetcharge() return chassis.dyngetcharge()
return charge return charge
proc/get_power_channel(var/area/A) /obj/item/mecha_parts/mecha_equipment/tesla_energy_relay/proc/get_power_channel(var/area/A)
var/pow_chan var/pow_chan
if(A) if(A)
for(var/c in use_channels) for(var/c in use_channels)
@@ -759,7 +776,7 @@
break break
return pow_chan return pow_chan
Topic(href, href_list) /obj/item/mecha_parts/mecha_equipment/tesla_energy_relay/Topic(href, href_list)
..() ..()
if(href_list["toggle_relay"]) if(href_list["toggle_relay"])
if(pr_energy_relay.toggle()) if(pr_energy_relay.toggle())
@@ -770,7 +787,7 @@
log_message("Deactivated.") log_message("Deactivated.")
return return
get_equip_info() /obj/item/mecha_parts/mecha_equipment/tesla_energy_relay/get_equip_info()
if(!chassis) return if(!chassis) return
return "<span style=\"color:[equip_ready?"#0f0":"#f00"];\">*</span>&nbsp;[src.name] - <a href='?src=\ref[src];toggle_relay=1'>[pr_energy_relay.active()?"Dea":"A"]ctivate</a>" return "<span style=\"color:[equip_ready?"#0f0":"#f00"];\">*</span>&nbsp;[src.name] - <a href='?src=\ref[src];toggle_relay=1'>[pr_energy_relay.active()?"Dea":"A"]ctivate</a>"
@@ -785,7 +802,7 @@
/datum/global_iterator/mecha_energy_relay /datum/global_iterator/mecha_energy_relay
process(var/obj/item/mecha_parts/mecha_equipment/tesla_energy_relay/ER) /datum/global_iterator/mecha_energy_relay/process(var/obj/item/mecha_parts/mecha_equipment/tesla_energy_relay/ER)
if(!ER.chassis || ER.chassis.hasInternalDamage(MECHA_INT_SHORT_CIRCUIT)) if(!ER.chassis || ER.chassis.hasInternalDamage(MECHA_INT_SHORT_CIRCUIT))
stop() stop()
ER.set_ready_state(1) ER.set_ready_state(1)
@@ -828,30 +845,32 @@
var/fuel_per_cycle_active = 500 var/fuel_per_cycle_active = 500
var/power_per_cycle = 20 var/power_per_cycle = 20
New() equip_type = EQUIP_UTILITY
/obj/item/mecha_parts/mecha_equipment/generator/New()
..() ..()
init() init()
return return
Destroy() /obj/item/mecha_parts/mecha_equipment/generator/Destroy()
qdel(pr_mech_generator) qdel(pr_mech_generator)
pr_mech_generator = null pr_mech_generator = null
..() ..()
proc/init() /obj/item/mecha_parts/mecha_equipment/generator/proc/init()
fuel = new /obj/item/stack/material/phoron(src) fuel = new /obj/item/stack/material/phoron(src)
fuel.amount = 0 fuel.amount = 0
pr_mech_generator = new /datum/global_iterator/mecha_generator(list(src),0) pr_mech_generator = new /datum/global_iterator/mecha_generator(list(src),0)
pr_mech_generator.set_delay(equip_cooldown) pr_mech_generator.set_delay(equip_cooldown)
return return
detach() /obj/item/mecha_parts/mecha_equipment/generator/detach()
pr_mech_generator.stop() pr_mech_generator.stop()
..() ..()
return return
Topic(href, href_list) /obj/item/mecha_parts/mecha_equipment/generator/Topic(href, href_list)
..() ..()
if(href_list["toggle"]) if(href_list["toggle"])
if(pr_mech_generator.toggle()) if(pr_mech_generator.toggle())
@@ -862,13 +881,13 @@
log_message("Deactivated.") log_message("Deactivated.")
return return
get_equip_info() /obj/item/mecha_parts/mecha_equipment/generator/get_equip_info()
var/output = ..() var/output = ..()
if(output) if(output)
return "[output] \[[fuel]: [round(fuel.amount*fuel.perunit,0.1)] cm<sup>3</sup>\] - <a href='?src=\ref[src];toggle=1'>[pr_mech_generator.active()?"Dea":"A"]ctivate</a>" return "[output] \[[fuel]: [round(fuel.amount*fuel.perunit,0.1)] cm<sup>3</sup>\] - <a href='?src=\ref[src];toggle=1'>[pr_mech_generator.active()?"Dea":"A"]ctivate</a>"
return return
action(target) /obj/item/mecha_parts/mecha_equipment/generator/action(target)
if(chassis) if(chassis)
var/result = load_fuel(target) var/result = load_fuel(target)
var/message var/message
@@ -882,7 +901,7 @@
occupant_message(message) occupant_message(message)
return return
proc/load_fuel(var/obj/item/stack/material/P) /obj/item/mecha_parts/mecha_equipment/generator/proc/load_fuel(var/obj/item/stack/material/P)
if(P.type == fuel.type && P.amount) if(P.type == fuel.type && P.amount)
var/to_load = max(max_fuel - fuel.amount*fuel.perunit,0) var/to_load = max(max_fuel - fuel.amount*fuel.perunit,0)
if(to_load) if(to_load)
@@ -895,7 +914,7 @@
return 0 return 0
return return
attackby(weapon,mob/user) /obj/item/mecha_parts/mecha_equipment/generator/attackby(weapon,mob/user)
var/result = load_fuel(weapon) var/result = load_fuel(weapon)
if(isnull(result)) if(isnull(result))
user.visible_message("[user] tries to shove [weapon] into [src]. What a dumb-ass.","<span class='warning'>[fuel] traces minimal. [weapon] cannot be used as fuel.</span>") user.visible_message("[user] tries to shove [weapon] into [src]. What a dumb-ass.","<span class='warning'>[fuel] traces minimal. [weapon] cannot be used as fuel.</span>")
@@ -905,7 +924,7 @@
user.visible_message("[user] loads [src] with [fuel].","[result] unit\s of [fuel] successfully loaded.") user.visible_message("[user] loads [src] with [fuel].","[result] unit\s of [fuel] successfully loaded.")
return return
critfail() /obj/item/mecha_parts/mecha_equipment/generator/critfail()
..() ..()
var/turf/simulated/T = get_turf(src) var/turf/simulated/T = get_turf(src)
if(!T) if(!T)
@@ -923,7 +942,7 @@
/datum/global_iterator/mecha_generator /datum/global_iterator/mecha_generator
process(var/obj/item/mecha_parts/mecha_equipment/generator/EG) /datum/global_iterator/mecha_generator/process(var/obj/item/mecha_parts/mecha_equipment/generator/EG)
if(!EG.chassis) if(!EG.chassis)
stop() stop()
EG.set_ready_state(1) EG.set_ready_state(1)
@@ -960,19 +979,19 @@
power_per_cycle = 50 power_per_cycle = 50
var/rad_per_cycle = 0.3 var/rad_per_cycle = 0.3
init() /obj/item/mecha_parts/mecha_equipment/generator/nuclear/init()
fuel = new /obj/item/stack/material/uranium(src) fuel = new /obj/item/stack/material/uranium(src)
fuel.amount = 0 fuel.amount = 0
pr_mech_generator = new /datum/global_iterator/mecha_generator/nuclear(list(src),0) pr_mech_generator = new /datum/global_iterator/mecha_generator/nuclear(list(src),0)
pr_mech_generator.set_delay(equip_cooldown) pr_mech_generator.set_delay(equip_cooldown)
return return
critfail() /obj/item/mecha_parts/mecha_equipment/generator/nuclear/critfail()
return return
/datum/global_iterator/mecha_generator/nuclear /datum/global_iterator/mecha_generator/nuclear
process(var/obj/item/mecha_parts/mecha_equipment/generator/nuclear/EG) /datum/global_iterator/mecha_generator/nuclear/process(var/obj/item/mecha_parts/mecha_equipment/generator/nuclear/EG)
if(..()) if(..())
radiation_repository.radiate(EG, (EG.rad_per_cycle * 3)) radiation_repository.radiate(EG, (EG.rad_per_cycle * 3))
return 1 return 1
@@ -989,12 +1008,14 @@
var/obj/mecha/working/ripley/cargo_holder var/obj/mecha/working/ripley/cargo_holder
required_type = /obj/mecha/working/ripley required_type = /obj/mecha/working/ripley
attach(obj/mecha/M as obj) equip_type = EQUIP_SPECIAL
/obj/item/mecha_parts/mecha_equipment/tool/safety_clamp/attach(obj/mecha/M as obj)
..() ..()
cargo_holder = M cargo_holder = M
return return
action(atom/target) /obj/item/mecha_parts/mecha_equipment/tool/safety_clamp/action(atom/target)
if(!action_checks(target)) return if(!action_checks(target)) return
if(!cargo_holder) return if(!cargo_holder) return
if(istype(target,/obj)) if(istype(target,/obj))
@@ -1052,6 +1073,8 @@
var/door_locked = 1 var/door_locked = 1
salvageable = 0 salvageable = 0
equip_type = EQUIP_HULL
/obj/item/mecha_parts/mecha_equipment/tool/passenger/destroy() /obj/item/mecha_parts/mecha_equipment/tool/passenger/destroy()
for(var/atom/movable/AM in src) for(var/atom/movable/AM in src)
AM.forceMove(get_turf(src)) AM.forceMove(get_turf(src))

View File

@@ -12,6 +12,8 @@
var/auto_rearm = 0 //Does the weapon reload itself after each shot? var/auto_rearm = 0 //Does the weapon reload itself after each shot?
required_type = list(/obj/mecha/combat, /obj/mecha/working/hoverpod/combatpod) required_type = list(/obj/mecha/combat, /obj/mecha/working/hoverpod/combatpod)
equip_type = EQUIP_WEAPON
/obj/item/mecha_parts/mecha_equipment/weapon/action_checks(atom/target) /obj/item/mecha_parts/mecha_equipment/weapon/action_checks(atom/target)
if(projectiles <= 0) if(projectiles <= 0)
return 0 return 0
@@ -68,12 +70,14 @@
equip_cooldown = 30 equip_cooldown = 30
name = "jury-rigged welder-laser" name = "jury-rigged welder-laser"
desc = "While not regulation, this inefficient weapon can be attached to working exo-suits in desperate, or malicious, times." desc = "While not regulation, this inefficient weapon can be attached to working exo-suits in desperate, or malicious, times."
icon_state = "mecha_laser" icon_state = "mecha_laser-rig"
energy_drain = 80 energy_drain = 80
projectile = /obj/item/projectile/beam projectile = /obj/item/projectile/beam
fire_sound = 'sound/weapons/Laser.ogg' fire_sound = 'sound/weapons/Laser.ogg'
required_type = list(/obj/mecha/combat, /obj/mecha/working) required_type = list(/obj/mecha/combat, /obj/mecha/working)
equip_type = EQUIP_UTILITY
/obj/item/mecha_parts/mecha_equipment/weapon/energy/laser/heavy /obj/item/mecha_parts/mecha_equipment/weapon/energy/laser/heavy
equip_cooldown = 15 equip_cooldown = 15
name = "\improper CH-LC \"Solaris\" laser cannon" name = "\improper CH-LC \"Solaris\" laser cannon"
@@ -127,6 +131,8 @@
equip_cooldown = 150 equip_cooldown = 150
origin_tech = list(TECH_MATERIAL = 2, TECH_COMBAT = 4, TECH_ILLEGAL = 1) origin_tech = list(TECH_MATERIAL = 2, TECH_COMBAT = 4, TECH_ILLEGAL = 1)
equip_type = EQUIP_SPECIAL
/obj/item/mecha_parts/mecha_equipment/honker/action(target) /obj/item/mecha_parts/mecha_equipment/honker/action(target)
if(!chassis) if(!chassis)
return 0 return 0
@@ -198,7 +204,7 @@
equip_cooldown = 10 equip_cooldown = 10
projectile = /obj/item/projectile/bullet/pistol/medium projectile = /obj/item/projectile/bullet/pistol/medium
fire_sound = 'sound/weapons/machinegun.ogg' fire_sound = 'sound/weapons/machinegun.ogg'
projectiles = 300 projectiles = 30 //10 bursts, matching the Scattershot's 10. Also, conveniently, doesn't eat your powercell when reloading like 300 bullets does.
projectiles_per_shot = 3 projectiles_per_shot = 3
deviation = 0.3 deviation = 0.3
projectile_energy_cost = 20 projectile_energy_cost = 20
@@ -224,6 +230,8 @@
missile_range = 15 missile_range = 15
required_type = /obj/mecha //Why restrict it to just mining or combat mechs? required_type = /obj/mecha //Why restrict it to just mining or combat mechs?
equip_type = EQUIP_UTILITY
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/flare/Fire(atom/movable/AM, atom/target, turf/aimloc) /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/flare/Fire(atom/movable/AM, atom/target, turf/aimloc)
var/obj/item/device/flashlight/flare/fired = AM var/obj/item/device/flashlight/flare/fired = AM
fired.ignite() fired.ignite()
@@ -249,7 +257,7 @@
var/primed = null var/primed = null
throwforce = 15 throwforce = 15
throw_impact(atom/hit_atom) /obj/item/missile/throw_impact(atom/hit_atom)
if(primed) if(primed)
explosion(hit_atom, 0, 1, 2, 4) explosion(hit_atom, 0, 1, 2, 4)
qdel(src) qdel(src)
@@ -320,6 +328,7 @@
/obj/item/mecha_parts/mecha_equipment/weapon/energy/flamer/rigged /obj/item/mecha_parts/mecha_equipment/weapon/energy/flamer/rigged
name = "\improper AA-CR-1 Mark 4" name = "\improper AA-CR-1 Mark 4"
description_fluff = "A firefighting tool maintained by Aether Atmospherics, whose initial design originated from a small Earth company. This one seems to have been jury rigged." description_fluff = "A firefighting tool maintained by Aether Atmospherics, whose initial design originated from a small Earth company. This one seems to have been jury rigged."
icon_state = "mecha_cremate-rig"
energy_drain = 50 energy_drain = 50
required_type = list(/obj/mecha/combat, /obj/mecha/working) required_type = list(/obj/mecha/combat, /obj/mecha/working)
@@ -328,6 +337,8 @@
origin_tech = list(TECH_MATERIAL = 3, TECH_COMBAT = 3, TECH_PHORON = 3, TECH_ILLEGAL = 2) origin_tech = list(TECH_MATERIAL = 3, TECH_COMBAT = 3, TECH_PHORON = 3, TECH_ILLEGAL = 2)
equip_type = EQUIP_UTILITY
////////////// //////////////
//Defensive// //Defensive//
////////////// //////////////
@@ -343,6 +354,8 @@
var/shock_damage = 15 var/shock_damage = 15
var/active var/active
equip_type = EQUIP_HULL
/obj/item/mecha_parts/mecha_equipment/shocker/can_attach(obj/mecha/M as obj) /obj/item/mecha_parts/mecha_equipment/shocker/can_attach(obj/mecha/M as obj)
if(..()) if(..())
if(!M.proc_res["dynattackby"] && !M.proc_res["dynattackhand"] && !M.proc_res["dynattackalien"]) if(!M.proc_res["dynattackby"] && !M.proc_res["dynattackhand"] && !M.proc_res["dynattackalien"])

View File

@@ -24,6 +24,7 @@
var/dir_in = 2//What direction will the mech face when entered/powered on? Defaults to South. var/dir_in = 2//What direction will the mech face when entered/powered on? Defaults to South.
var/step_energy_drain = 10 var/step_energy_drain = 10
var/health = 300 //health is health var/health = 300 //health is health
var/maxhealth = 300 //maxhealth is maxhealth.
var/deflect_chance = 10 //chance to deflect the incoming projectiles, hits, or lesser the effect of ex_act. var/deflect_chance = 10 //chance to deflect the incoming projectiles, hits, or lesser the effect of ex_act.
//the values in this list show how much damage will pass through, not how much will be absorbed. //the values in this list show how much damage will pass through, not how much will be absorbed.
var/list/damage_absorption = list("brute"=0.8,"fire"=1.2,"bullet"=0.9,"laser"=1,"energy"=1,"bomb"=1) var/list/damage_absorption = list("brute"=0.8,"fire"=1.2,"bullet"=0.9,"laser"=1,"energy"=1,"bomb"=1)
@@ -66,8 +67,23 @@
var/list/equipment = new var/list/equipment = new
var/obj/item/mecha_parts/mecha_equipment/selected var/obj/item/mecha_parts/mecha_equipment/selected
var/max_equip = 3 var/max_equip = 2
var/datum/events/events var/datum/events/events
//mechaequipt2 stuffs
var/list/hull_equipment = new
var/list/weapon_equipment = new
var/list/utility_equipment = new
var/list/universal_equipment = new
var/list/special_equipment = new
var/max_hull_equip = 2
var/max_weapon_equip = 2
var/max_utility_equip = 2
var/max_universal_equip = 2
var/max_special_equip = 1
//Working exosuit vars
var/list/cargo = list()
var/cargo_capacity = 3
/obj/mecha/drain_power(var/drain_check) /obj/mecha/drain_power(var/drain_check)
@@ -99,10 +115,24 @@
mechas_list += src //global mech list mechas_list += src //global mech list
return return
/obj/mecha/Exit(atom/movable/O)
if(O in cargo)
return 0
return ..()
/obj/mecha/Destroy() /obj/mecha/Destroy()
src.go_out() src.go_out()
for(var/mob/M in src) //Let's just be ultra sure for(var/mob/M in src) //Be Extra Sure
M.Move(loc) M.forceMove(get_turf(src))
M.loc.Entered(M)
if(M != src.occupant)
step_rand(M)
for(var/atom/movable/A in src.cargo)
A.forceMove(get_turf(src))
var/turf/T = get_turf(A)
if(T)
T.Entered(A)
step_rand(A)
if(loc) if(loc)
loc.Exited(src) loc.Exited(src)
@@ -112,6 +142,11 @@
if(wreckage) if(wreckage)
var/obj/effect/decal/mecha_wreckage/WR = new wreckage(loc) var/obj/effect/decal/mecha_wreckage/WR = new wreckage(loc)
hull_equipment.Cut()
weapon_equipment.Cut()
utility_equipment.Cut()
universal_equipment.Cut()
special_equipment.Cut()
for(var/obj/item/mecha_parts/mecha_equipment/E in equipment) for(var/obj/item/mecha_parts/mecha_equipment/E in equipment)
if(E.salvageable && prob(30)) if(E.salvageable && prob(30))
WR.crowbar_salvage += E WR.crowbar_salvage += E
@@ -1348,6 +1383,14 @@
<b>Lights: </b>[lights?"on":"off"]<br> <b>Lights: </b>[lights?"on":"off"]<br>
[src.dna?"<b>DNA-locked:</b><br> <span style='font-size:10px;letter-spacing:-1px;'>[src.dna]</span> \[<a href='?src=\ref[src];reset_dna=1'>Reset</a>\]<br>":null] [src.dna?"<b>DNA-locked:</b><br> <span style='font-size:10px;letter-spacing:-1px;'>[src.dna]</span> \[<a href='?src=\ref[src];reset_dna=1'>Reset</a>\]<br>":null]
"} "}
//Cargo components.
output += "<b>Cargo Compartment Contents:</b><div style=\"margin-left: 15px;\">"
if(src.cargo.len)
for(var/obj/O in src.cargo)
output += "<a href='?src=\ref[src];drop_from_cargo=\ref[O]'>Unload</a> : [O]<br>"
else
output += "Nothing"
output += "</div>"
return output return output
/obj/mecha/proc/get_commands() /obj/mecha/proc/get_commands()
@@ -1396,10 +1439,23 @@
output += {"<div class='wr'> output += {"<div class='wr'>
<div class='header'>Equipment</div> <div class='header'>Equipment</div>
<div class='links'>"} <div class='links'>"}
for(var/obj/item/mecha_parts/mecha_equipment/W in equipment) for(var/obj/item/mecha_parts/mecha_equipment/W in hull_equipment)
output += "[W.name] <a href='?src=\ref[W];detach=1'>Detach</a><br>" output += "Hull Module: [W.name] <a href='?src=\ref[W];detach=1'>Detach</a><br>"
output += "<b>Available equipment slots:</b> [max_equip-equipment.len]" for(var/obj/item/mecha_parts/mecha_equipment/W in weapon_equipment)
output += "</div></div>" output += "Weapon Module: [W.name] <a href='?src=\ref[W];detach=1'>Detach</a><br>"
for(var/obj/item/mecha_parts/mecha_equipment/W in utility_equipment)
output += "Utility Module: [W.name] <a href='?src=\ref[W];detach=1'>Detach</a><br>"
for(var/obj/item/mecha_parts/mecha_equipment/W in universal_equipment)
output += "Universal Module: [W.name] <a href='?src=\ref[W];detach=1'>Detach</a><br>"
for(var/obj/item/mecha_parts/mecha_equipment/W in special_equipment)
output += "Special Module: [W.name] <a href='?src=\ref[W];detach=1'>Detach</a><br>"
output += {"<b>Available hull slots:</b> [max_hull_equip-hull_equipment.len]<br>
<b>Available weapon slots:</b> [max_weapon_equip-weapon_equipment.len]<br>
<b>Available utility slots:</b> [max_utility_equip-utility_equipment.len]<br>
<b>Available universal slots:</b> [max_universal_equip-universal_equipment.len]<br>
<b>Available special slots:</b> [max_special_equip-special_equipment.len]<br>
</div></div>
"}
return output return output
/obj/mecha/proc/get_equipment_list() //outputs mecha equipment list in html /obj/mecha/proc/get_equipment_list() //outputs mecha equipment list in html
@@ -1673,6 +1729,17 @@
else else
src.occupant_message("<font color='red'>Recalibration failed.</font>") src.occupant_message("<font color='red'>Recalibration failed.</font>")
src.log_message("Recalibration of coordination system failed with 1 error.",1) src.log_message("Recalibration of coordination system failed with 1 error.",1)
if(href_list["drop_from_cargo"])
var/obj/O = locate(href_list["drop_from_cargo"])
if(O && O in src.cargo)
src.occupant_message("<span class='notice'>You unload [O].</span>")
O.forceMove(get_turf(src))
src.cargo -= O
var/turf/T = get_turf(O)
if(T)
T.Entered(O)
src.log_message("Unloaded [O]. Cargo compartment capacity: [cargo_capacity - src.cargo.len]")
return
//debug //debug
/* /*

View File

@@ -1,3 +1,12 @@
/obj/mecha/medical
max_hull_equip = 1
max_weapon_equip = 0
max_utility_equip = 2
max_universal_equip = 1
max_special_equip = 1
cargo_capacity = 1
/obj/mecha/medical/initialize() /obj/mecha/medical/initialize()
. = ..() . = ..()
var/turf/T = get_turf(src) var/turf/T = get_turf(src)

View File

@@ -1,4 +1,4 @@
/obj/mecha/medical/odysseus /obj/mecha/medical/odysseus/
desc = "These exosuits are developed and produced by Vey-Med. (&copy; All rights reserved)." desc = "These exosuits are developed and produced by Vey-Med. (&copy; All rights reserved)."
name = "Odysseus" name = "Odysseus"
icon_state = "odysseus" icon_state = "odysseus"
@@ -6,18 +6,19 @@
step_in = 2 step_in = 2
max_temperature = 15000 max_temperature = 15000
health = 120 health = 120
maxhealth = 120
wreckage = /obj/effect/decal/mecha_wreckage/odysseus wreckage = /obj/effect/decal/mecha_wreckage/odysseus
internal_damage_threshold = 35 internal_damage_threshold = 35
deflect_chance = 15 deflect_chance = 15
step_energy_drain = 6 step_energy_drain = 6
var/obj/item/clothing/glasses/hud/health/mech/hud var/obj/item/clothing/glasses/hud/health/mech/hud
New() /obj/mecha/medical/odysseus/New()
..() ..()
hud = new /obj/item/clothing/glasses/hud/health/mech(src) hud = new /obj/item/clothing/glasses/hud/health/mech(src)
return return
moved_inside(var/mob/living/carbon/human/H as mob) /obj/mecha/medical/odysseus/moved_inside(var/mob/living/carbon/human/H as mob)
if(..()) if(..())
if(H.glasses) if(H.glasses)
occupant_message("<font color='red'>[H.glasses] prevent you from using [src] [hud]</font>") occupant_message("<font color='red'>[H.glasses] prevent you from using [src] [hud]</font>")
@@ -28,7 +29,7 @@
else else
return 0 return 0
go_out() /obj/mecha/medical/odysseus/go_out()
if(ishuman(occupant)) if(ishuman(occupant))
var/mob/living/carbon/human/H = occupant var/mob/living/carbon/human/H = occupant
if(H.glasses == hud) if(H.glasses == hud)

View File

@@ -8,6 +8,7 @@
step_energy_drain = 10 step_energy_drain = 10
max_temperature = 20000 max_temperature = 20000
health = 150 health = 150
maxhealth = 150
infra_luminosity = 6 infra_luminosity = 6
wreckage = /obj/effect/decal/mecha_wreckage/hoverpod wreckage = /obj/effect/decal/mecha_wreckage/hoverpod
cargo_capacity = 5 cargo_capacity = 5
@@ -15,6 +16,12 @@
var/datum/effect/effect/system/ion_trail_follow/ion_trail var/datum/effect/effect/system/ion_trail_follow/ion_trail
var/stabilization_enabled = 1 var/stabilization_enabled = 1
max_hull_equip = 2
max_weapon_equip = 0
max_utility_equip = 2
max_universal_equip = 1
max_special_equip = 1
/obj/mecha/working/hoverpod/New() /obj/mecha/working/hoverpod/New()
..() ..()
ion_trail = new /datum/effect/effect/system/ion_trail_follow() ion_trail = new /datum/effect/effect/system/ion_trail_follow()
@@ -79,9 +86,15 @@
desc = "An ancient, run-down combat spacecraft." // Ideally would have a seperate icon. desc = "An ancient, run-down combat spacecraft." // Ideally would have a seperate icon.
name = "Combat Hoverpod" name = "Combat Hoverpod"
health = 200 health = 200
maxhealth = 200
internal_damage_threshold = 35 internal_damage_threshold = 35
cargo_capacity = 2 cargo_capacity = 2
max_equip = 2 max_equip = 2
max_hull_equip = 2
max_weapon_equip = 2
max_utility_equip = 2
max_universal_equip = 1
max_special_equip = 1
/obj/mecha/working/hoverpod/combatpod/New() /obj/mecha/working/hoverpod/combatpod/New()
..() ..()

View File

@@ -6,6 +6,7 @@
step_in = 6 step_in = 6
max_temperature = 20000 max_temperature = 20000
health = 200 health = 200
maxhealth = 200
wreckage = /obj/effect/decal/mecha_wreckage/ripley wreckage = /obj/effect/decal/mecha_wreckage/ripley
cargo_capacity = 10 cargo_capacity = 10
@@ -20,7 +21,7 @@
..() ..()
/obj/mecha/working/ripley/firefighter /obj/mecha/working/ripley/firefighter
desc = "Standart APLU chassis was refitted with additional thermal protection and cistern." desc = "Standard APLU chassis was refitted with additional thermal protection and cistern."
name = "APLU \"Firefighter\"" name = "APLU \"Firefighter\""
icon_state = "firefighter" icon_state = "firefighter"
initial_icon = "firefighter" initial_icon = "firefighter"
@@ -29,6 +30,11 @@
lights_power = 8 lights_power = 8
damage_absorption = list("fire"=0.5,"bullet"=0.8,"bomb"=0.5) damage_absorption = list("fire"=0.5,"bullet"=0.8,"bomb"=0.5)
wreckage = /obj/effect/decal/mecha_wreckage/ripley/firefighter wreckage = /obj/effect/decal/mecha_wreckage/ripley/firefighter
max_hull_equip = 2
max_weapon_equip = 0
max_utility_equip = 2
max_universal_equip = 1
max_special_equip = 1
/obj/mecha/working/ripley/deathripley /obj/mecha/working/ripley/deathripley
desc = "OH SHIT IT'S THE DEATHSQUAD WE'RE ALL GONNA DIE" desc = "OH SHIT IT'S THE DEATHSQUAD WE'RE ALL GONNA DIE"
@@ -40,6 +46,11 @@
lights_power = 60 lights_power = 60
wreckage = /obj/effect/decal/mecha_wreckage/ripley/deathripley wreckage = /obj/effect/decal/mecha_wreckage/ripley/deathripley
step_energy_drain = 0 step_energy_drain = 0
max_hull_equip = 1
max_weapon_equip = 1
max_utility_equip = 3
max_universal_equip = 1
max_special_equip = 1
/obj/mecha/working/ripley/deathripley/New() /obj/mecha/working/ripley/deathripley/New()
..() ..()

View File

@@ -1,7 +1,10 @@
/obj/mecha/working /obj/mecha/working
internal_damage_threshold = 60 internal_damage_threshold = 60
var/list/cargo = new max_hull_equip = 1
var/cargo_capacity = 5 max_weapon_equip = 0
max_utility_equip = 3
max_universal_equip = 1
max_special_equip = 1
/obj/mecha/working/initialize() /obj/mecha/working/initialize()
. = ..() . = ..()
@@ -9,6 +12,7 @@
if(isPlayerLevel(T.z)) if(isPlayerLevel(T.z))
new /obj/item/mecha_parts/mecha_tracking(src) new /obj/item/mecha_parts/mecha_tracking(src)
/* This stuff has been generalized!
/obj/mecha/working/Destroy() /obj/mecha/working/Destroy()
for(var/mob/M in src) for(var/mob/M in src)
if(M==src.occupant) if(M==src.occupant)
@@ -54,6 +58,6 @@
output += "Nothing" output += "Nothing"
output += "</div>" output += "</div>"
return output return output
*/
/obj/mecha/working/range_action(atom/target as obj|mob|turf) /obj/mecha/working/range_action(atom/target as obj|mob|turf)
return return

View File

@@ -0,0 +1,7 @@
author: Mechoid
delete-after: True
changes:
- rscadd: "Mechs now have multiple equipment slot types, and more slots in total for greater customization."

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 24 KiB