diff --git a/code/game/mecha/combat/combat.dm b/code/game/mecha/combat/combat.dm
index b3e0256c78c..b61a97ea33a 100644
--- a/code/game/mecha/combat/combat.dm
+++ b/code/game/mecha/combat/combat.dm
@@ -115,7 +115,7 @@
V.show_message("[src.name] hits [target].", 1)
if(!istype(target, /turf/simulated/wall))
target:attackby(src,src.occupant)
- else if(prob(2))
+ else if(prob(5))
target:dismantle_wall(1)
src.occupant_message("\blue You smash through the wall.")
src.visible_message("[src.name] smashes through the wall")
diff --git a/code/game/mecha/combat/durand.dm b/code/game/mecha/combat/durand.dm
index 8fd8611a484..fa88be0104a 100644
--- a/code/game/mecha/combat/durand.dm
+++ b/code/game/mecha/combat/durand.dm
@@ -2,7 +2,7 @@
desc = "Combat exosuit."
name = "Durand"
icon_state = "durand"
- step_in = 8
+ step_in = 6
health = 350
deflect_chance = 12
max_temperature = 3000
diff --git a/code/game/mecha/combat/gygax.dm b/code/game/mecha/combat/gygax.dm
index 9f71c3e26fd..f74e6eb9030 100644
--- a/code/game/mecha/combat/gygax.dm
+++ b/code/game/mecha/combat/gygax.dm
@@ -2,7 +2,7 @@
desc = "Security exosuit."
name = "Gygax"
icon_state = "gygax"
- step_in = 6
+ step_in = 5
health = 300
deflect_chance = 10
max_temperature = 3500
diff --git a/code/game/mecha/combat/marauder.dm b/code/game/mecha/combat/marauder.dm
index 5a765c4fce9..3fe7dd80a04 100644
--- a/code/game/mecha/combat/marauder.dm
+++ b/code/game/mecha/combat/marauder.dm
@@ -2,7 +2,7 @@
desc = "Heavy duty combat exosuit."
name = "Marauder"
icon_state = "marauder"
- step_in = 10
+ step_in = 7
health = 400
deflect_chance = 25
max_temperature = 5000
@@ -112,6 +112,7 @@
/obj/mecha/combat/marauder/go_out()
if(src.occupant && src.occupant.client)
src.occupant.client.view = world.view
+ src.zoom = 0
..()
return
diff --git a/code/game/mecha/combat/weapons/weapons.dm b/code/game/mecha/combat/weapons/weapons.dm
index 647f7ccad16..a83798866ba 100644
--- a/code/game/mecha/combat/weapons/weapons.dm
+++ b/code/game/mecha/combat/weapons/weapons.dm
@@ -343,7 +343,6 @@
var/target_y = targloc.y
var/target_z = targloc.z
targloc = null
- target = null
for(var/i=1 to min(projectiles, projectiles_per_shot))
targloc = locate(target_x+GaussRandRound(deviation,1),target_y+GaussRandRound(deviation,1),target_z)
if(!targloc || targloc == curloc)
@@ -378,7 +377,6 @@
var/target_y = targloc.y
var/target_z = targloc.z
targloc = null
- target = null
spawn for(var/i=1 to min(projectiles, projectiles_per_shot))
if(!chassis) break
var/turf/curloc = get_turf(chassis)
diff --git a/code/game/mecha/construction_datum.dm b/code/game/mecha/construction_datum.dm
index 0008c177334..228d4b8255e 100644
--- a/code/game/mecha/construction_datum.dm
+++ b/code/game/mecha/construction_datum.dm
@@ -17,6 +17,9 @@
spawn_result()
return
+ proc/action(atom/used_atom,mob/user as mob)
+ return
+
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)
diff --git a/code/game/mecha/mech_fabricator.dm b/code/game/mecha/mech_fabricator.dm
index 0924b432f5b..9c7f1bcbf23 100644
--- a/code/game/mecha/mech_fabricator.dm
+++ b/code/game/mecha/mech_fabricator.dm
@@ -19,7 +19,8 @@
"gold"=0,
"silver"=0,
"diamond"=0,
- "plasma"=0
+ "plasma"=0,
+ "bananium"=0
)
var/res_max_amount = 200000
var/part_set
@@ -53,6 +54,16 @@
list("result"="/obj/item/mecha_parts/part/gygax_left_leg","time"=200,"metal"=35000),
list("result"="/obj/item/mecha_parts/part/gygax_right_leg","time"=200,"metal"=35000),
list("result"="/obj/item/mecha_parts/part/gygax_armour","time"=600,"metal"=75000,"diamond"=10000)
+ ),
+
+ "H.O.N.K"=list(
+ list("result"="/obj/mecha_chassis/honker","time"=100,"metal"=20000),
+ list("result"="/obj/item/mecha_parts/part/honker_torso","time"=300,"metal"=35000,"glass"=10000,"bananium"=10000),
+ list("result"="/obj/item/mecha_parts/part/honker_head","time"=200,"metal"=15000,"glass"=5000,"bananium"=5000),
+ list("result"="/obj/item/mecha_parts/part/honker_left_arm","time"=200,"metal"=20000,"bananium"=5000),
+ list("result"="/obj/item/mecha_parts/part/honker_right_arm","time"=200,"metal"=20000,"bananium"=5000),
+ list("result"="/obj/item/mecha_parts/part/honker_left_leg","time"=200,"metal"=20000,"bananium"=5000),
+ list("result"="/obj/item/mecha_parts/part/honker_right_leg","time"=200,"metal"=20000,"bananium"=5000),
)
)
@@ -192,13 +203,14 @@
var/time = part["time"]
src.being_built = new path(src)
src.remove_resources(part)
- flick("mechfab3", src)
+ src.icon_state = "mechfab3" //looks better than 'flick'
src.use_power = 2
spawn(time)
src.use_power = 1
src.being_built.Move(get_step(src,EAST))
src.icon_state = initial(src.icon_state)
src.visible_message("[src] beeps, \"The [src.being_built] is complete\".")
+ src.icon_state = initial(src.icon_state)
src.being_built = null
src.updateUsrDialog()
src.updateUsrDialog()
@@ -229,6 +241,9 @@
else if(istype(W, /obj/item/stack/sheet/glass))
material = "glass"
amnt = "g_amt"
+ else if(istype(W, /obj/item/stack/sheet/clown))
+ material = "bananium"
+ amnt = "g_amt"
else
return ..()
diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm
index ea4bbfa39ae..dc3b97b25f4 100644
--- a/code/game/mecha/mecha.dm
+++ b/code/game/mecha/mecha.dm
@@ -90,7 +90,13 @@
if(mech_click == world.time) return
mech_click = world.time
*/
- if(!location) return //probably GUI
+ if(istype(object, /obj/screen))
+ var/obj/screen/using = object
+ if(using.screen_loc == ui_acti || using.screen_loc == ui_iarrowleft || using.screen_loc == ui_iarrowright)//ignore all HUD objects save 'intent' and its arrows
+ return ..()
+ else
+ return
+// if(!location) return //probably GUI
if(M.stat>0) return
if(!istype(object,/atom)) return
var/obj/mecha/Mech = M.loc
@@ -101,11 +107,12 @@
return ..()
/obj/mecha/proc/click_action(atom/target)
- if(!istype(target,/turf) && !istype(target.loc,/turf)) return
+// if(!istype(target,/turf) && !istype(target.loc,/turf)) return
if(!src.occupant) return
if(state || !cell || cell.charge<=0) return
if(src == target) return
- if(!(get_dir(src,target) & src.dir))//wrong direction
+ var/dir_to_target = get_dir(src,target)
+ if(dir_to_target && !(get_dir(src,target) & src.dir))//wrong direction
return
if(get_dist(src,target)<=1)
src.melee_action(target)
@@ -684,13 +691,16 @@
if(!I || !istype(I, /obj/item/weapon/card/id) || !I.access) //not ID or no access
return 0
for(var/req in src.internals_req_access)
- if(!(req in I.access)) //doesn't have this access
- return 0
- return 1
+ if(req in I.access)
+ return 1
+ return 0
/obj/mecha/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W, /obj/item/weapon/card/id)||istype(W, /obj/item/device/pda))
+ if(src.occupant)
+ user << "Unable to initiate maintenance protocol."
+ return
if(src.internals_access_allowed(usr))
if(state==0)
state = 1
diff --git a/code/game/mecha/mecha_construction.dm b/code/game/mecha/mecha_construction.dm
index bde336ac004..9533fe5cf96 100644
--- a/code/game/mecha/mecha_construction.dm
+++ b/code/game/mecha/mecha_construction.dm
@@ -9,95 +9,44 @@
var/datum/construction/construct
flags = FPRINT | CONDUCT
+ attackby(obj/item/W as obj, mob/user as mob)
+ if(!construct || !construct.action(W, user))
+ ..()
+ return
+
//////// Ripley chassis
/obj/mecha_chassis/ripley
- name = "Ripley Chassis Frame"
+ name = "Ripley Chassis"
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
-
/////// Gygax chasis
/obj/mecha_chassis/gygax
- name = "Gygax Chassis Frame"
+ name = "Gygax Chassis"
New()
..()
construct = new /datum/construction/mecha/gygax_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/gygax_full
- name = "Gygax Chassis"
- icon_state = "gygax_chassis"
-
- New()
- ..()
- construct = new /datum/construction/mecha/gygax(src)
-
- attackby(obj/item/weapon/W as obj, mob/user as mob)
- if(!construct || !construct.check_step(W, user))
- ..()
- return
-
/////// Firefighter chassis
/obj/mecha_chassis/firefighter
- name = "Ripley-on-Fire Chassis Frame"
+ name = "Ripley-on-Fire Chassis"
New()
..()
construct = new /datum/construction/mecha/firefighter_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/firefighter_full
- name = "Ripley-on-Fire Chassis"
- icon_state = "ripley_chassis"
+/////// HONK chassis
+/obj/mecha_chassis/honker
+ name = "H.O.N.K Chassis"
New()
..()
- construct = new /datum/construction/mecha/firefighter(src)
-
- attackby(obj/item/weapon/W as obj, mob/user as mob)
- if(!construct || !construct.check_step(W, user))
- ..()
- return
-
+ construct = new /datum/construction/mecha/honker_chassis(src)
/////////////////////////
////// Mecha Parts //////
@@ -186,6 +135,30 @@
icon_state = "ripley_r_leg"
+////////// HONK
+/obj/item/mecha_parts/part/honker_torso
+ name="H.O.N.K Torso"
+ icon_state = "honker_harness"
+
+/obj/item/mecha_parts/part/honker_head
+ name="H.O.N.K Head"
+ icon_state = "honker_head"
+
+/obj/item/mecha_parts/part/honker_left_arm
+ name="H.O.N.K Left Arm"
+ icon_state = "honker_l_arm"
+
+/obj/item/mecha_parts/part/honker_right_arm
+ name="H.O.N.K Right Arm"
+ icon_state = "honker_r_arm"
+
+/obj/item/mecha_parts/part/honker_left_leg
+ name="H.O.N.K Left Leg"
+ icon_state = "honker_l_leg"
+
+/obj/item/mecha_parts/part/honker_right_leg
+ name="H.O.N.K Right Leg"
+ icon_state = "honker_r_leg"
/obj/item/mecha_parts/circuitboard
@@ -213,7 +186,7 @@
icon_state = "mcontroller"
gygax/targeting
- name = "Circuit board (Weapon Control and Targeting module)"
+ name = "Circuit board (Gygax Weapon Control and Targeting module)"
icon_state = "mcontroller"
gygax/main
@@ -224,6 +197,19 @@
name = "Circuit board (Ripley-on-Fire Peripherals Control module)"
icon_state = "mcontroller"
+ honker/peripherals
+ name = "Circuit board (H.O.N.K Peripherals Control module)"
+ icon_state = "mcontroller"
+
+ honker/targeting
+ name = "Circuit board (H.O.N.K Weapon Control and Targeting module)"
+ icon_state = "mcontroller"
+
+ honker/main
+ name = "Circuit board (H.O.N.K Central Control module)"
+ icon_state = "mainboard"
+
+
////////////////////////////////
///// Construction datums //////
////////////////////////////////
@@ -268,19 +254,22 @@
)
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+"+o"
del used_atom
return 1
+ action(atom/used_atom,mob/user as mob)
+ return check_all_steps(used_atom,user)
+
+ spawn_result()
+ var/obj/mecha_chassis/const_holder = holder
+ const_holder.construct = new /datum/construction/mecha/ripley(const_holder)
+ const_holder.density = 1
+ spawn()
+ del src
+ return
+
/datum/construction/mecha/ripley
result = "/obj/mecha/working/ripley"
@@ -300,6 +289,9 @@
list("key"="/obj/item/weapon/wrench")//14
)
+ action(atom/used_atom,mob/user as mob)
+ return check_step(used_atom,user)
+
custom_action(step, atom/used_atom, mob/user)
if(!..())
return 0
@@ -356,6 +348,18 @@
del used_atom
return 1
+ action(atom/used_atom,mob/user as mob)
+ return check_all_steps(used_atom,user)
+
+ spawn_result()
+ var/obj/mecha_chassis/const_holder = holder
+ const_holder.construct = new /datum/construction/mecha/gygax(const_holder)
+ const_holder.density = 1
+ spawn()
+ del src
+ return
+
+
/datum/construction/mecha/gygax
result = "/obj/mecha/combat/gygax"
@@ -381,6 +385,9 @@
list("key"="/obj/item/weapon/wrench")//20
)
+ action(atom/used_atom,mob/user as mob)
+ return check_step(used_atom,user)
+
custom_action(step, atom/used_atom, mob/user)
if(!..())
return 0
@@ -452,6 +459,17 @@
del used_atom
return 1
+ action(atom/used_atom,mob/user as mob)
+ return check_all_steps(used_atom,user)
+
+ spawn_result()
+ var/obj/mecha_chassis/const_holder = holder
+ const_holder.construct = new /datum/construction/mecha/firefighter(const_holder)
+ const_holder.density = 1
+ spawn()
+ del src
+ return
+
/datum/construction/mecha/firefighter
result = "/obj/mecha/working/firefighter"
@@ -471,6 +489,10 @@
list("key"="/obj/item/weapon/wrench")//14
)
+ action(atom/used_atom,mob/user as mob)
+ return check_step(used_atom,user)
+
+
custom_action(step, atom/used_atom, mob/user)
if(!..())
return 0
@@ -511,6 +533,92 @@
+/datum/construction/mecha/honker_chassis
+ result = "/obj/mecha_chassis/honker_full"
+ steps = list(list("key"="/obj/item/mecha_parts/part/honker_torso"),//1
+ list("key"="/obj/item/mecha_parts/part/honker_left_arm"),//2
+ list("key"="/obj/item/mecha_parts/part/honker_right_arm"),//3
+ list("key"="/obj/item/mecha_parts/part/honker_left_leg"),//4
+ list("key"="/obj/item/mecha_parts/part/honker_right_leg"),//5
+ list("key"="/obj/item/mecha_parts/part/honker_head")
+ )
+
+ action(atom/used_atom,mob/user as mob)
+ return check_all_steps(used_atom,user)
+
+ custom_action(step, atom/used_atom, mob/user)
+ user.visible_message("[user] has connected [used_atom] to [holder].", "You connect [used_atom] to [holder]")
+ holder.overlays += used_atom.icon_state+"+o"
+ del used_atom
+ return 1
+
+ spawn_result()
+ var/obj/mecha_chassis/const_holder = holder
+ const_holder.construct = new /datum/construction/mecha/honker(const_holder)
+ const_holder.density = 1
+ spawn()
+ del src
+ return
+
+
+/datum/construction/mecha/honker
+ result = "/obj/mecha/combat/honker"
+ steps = list(list("key"="/obj/item/weapon/bikehorn"),//1
+ list("key"="/obj/item/clothing/shoes/clown_shoes"),//2
+ list("key"="/obj/item/weapon/bikehorn"),//3
+ list("key"="/obj/item/clothing/mask/gas/clown_hat"),//4
+ list("key"="/obj/item/weapon/bikehorn"),//5
+ list("key"="/obj/item/weapon/mousetrap"),//6
+ list("key"="/obj/item/weapon/bikehorn"),//7
+ list("key"="/obj/item/weapon/bananapeel"),//8
+ list("key"="/obj/item/weapon/bikehorn"),//9
+ list("key"="/obj/item/mecha_parts/circuitboard/honker/targeting"),//10
+ list("key"="/obj/item/weapon/bikehorn"),//11
+ list("key"="/obj/item/mecha_parts/circuitboard/honker/peripherals"),//12
+ list("key"="/obj/item/weapon/bikehorn"),//13
+ list("key"="/obj/item/mecha_parts/circuitboard/honker/main"),//14
+ list("key"="/obj/item/weapon/bikehorn"),//15
+ )
+
+ action(atom/used_atom,mob/user as mob)
+ return check_step(used_atom,user)
+
+ custom_action(step, atom/used_atom, mob/user)
+ if(!..())
+ return 0
+
+ if(istype(used_atom, /obj/item/weapon/bikehorn))
+ playsound(holder, 'bikehorn.ogg', 50, 1)
+ user.visible_message("HONK!")
+
+ //TODO: better messages.
+ switch(step)
+ if(14)
+ user.visible_message("[user] installs the central control module into [holder].", "You install the central control module into [holder].")
+ del used_atom
+ if(12)
+ user.visible_message("[user] installs the peripherals control module into [holder].", "You install the peripherals control module into [holder].")
+ del used_atom
+ if(10)
+ user.visible_message("[user] installs the weapon control module into [holder].", "You install the weapon control module into [holder].")
+ del used_atom
+ if(8)
+ user.visible_message("[user] installs the banana peel into hONK1 socket.", "You install the banana peel into the hONK1 socket.")
+ del used_atom
+ if(6)
+ user.visible_message("[user] installs the mousetrap into hONK2 socket.", "You install the mousetrap into hONK2 socket.")
+ del used_atom
+ if(4)
+ user.visible_message("[user] puts clown wig and mask on [holder].", "You put clown wig and mask on [holder].")
+ del used_atom
+ if(2)
+ user.visible_message("[user] puts clown boots on [holder].", "You put clown boots on [holder].")
+ del used_atom
+ return 1
+
+
+
+
////////////////// misc ////////////////
diff --git a/code/game/mecha/working/working.dm b/code/game/mecha/working/working.dm
index a46a856cf47..b810fb70e98 100644
--- a/code/game/mecha/working/working.dm
+++ b/code/game/mecha/working/working.dm
@@ -26,6 +26,8 @@
var/tool = locate(href_list["select_tool"])
if(tool)
src.selected_tool = tool
+ if (href_list["unlock_id_upload"])
+ add_req_access = 1
if (href_list["add_req_access"])
if(!add_req_access) return
var/access = text2num(href_list["add_req_access"])
@@ -78,6 +80,12 @@
else
return ..()
+/obj/mecha/working/get_commands()
+ var/output = {"Unlock ID upload panel
+ "}
+ output += ..()
+ return output
+
/obj/mecha/working/proc/output_access_dialog(obj/item/weapon/card/id/id_card, mob/user)
if(!id_card || !user) return
@@ -88,9 +96,9 @@
for(var/a in id_card.access)
if(a in operation_req_access) continue
var/a_name = get_access_desc(a)
- if(!a_name) continue
+ if(!a_name) continue //there's some strange access without a name
output += "[a_name] - Add
"
- output += "