mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2025-12-22 08:01:06 +00:00
Mecha equipment changes and tweaks (#3610)
-adds a desc to all mecha gear that were missing them -moves the cable layer to tools.dm from medical_tools. -fixes relative pathing in some mecha equipment files -adds a mecha plasma cutter, that can be used by ripleys, and a incendiary gun for combat exosuits -the scattershot weapon should fire pellets now
This commit is contained in:
@@ -47,45 +47,45 @@
|
|||||||
|
|
||||||
/obj/item/mecha_parts/mecha_equipment/weapon/honker
|
/obj/item/mecha_parts/mecha_equipment/weapon/honker
|
||||||
name = "\improper HoNkER BlAsT 5000"
|
name = "\improper HoNkER BlAsT 5000"
|
||||||
|
desc = "Equipment for clown exosuits. Spreads fun and joy to everyone around. Honk!"
|
||||||
icon_state = "mecha_honker"
|
icon_state = "mecha_honker"
|
||||||
energy_drain = 200
|
energy_drain = 200
|
||||||
equip_cooldown = 150
|
equip_cooldown = 150
|
||||||
range = MELEE|RANGED
|
range = MELEE|RANGED
|
||||||
can_attach(obj/mecha/combat/honker/M as obj)
|
required_type = list(/obj/mecha/combat/honker)
|
||||||
if(!istype(M))
|
|
||||||
return 0
|
/obj/item/mecha_parts/mecha_equipment/weapon/honker/action(target)
|
||||||
return ..()
|
if(!chassis)
|
||||||
action(target)
|
return 0
|
||||||
if(!chassis)
|
if(energy_drain && chassis.get_charge() < energy_drain)
|
||||||
return 0
|
return 0
|
||||||
if(energy_drain && chassis.get_charge() < energy_drain)
|
if(!equip_ready)
|
||||||
return 0
|
return 0
|
||||||
if(!equip_ready)
|
playsound(chassis, 'sound/items/AirHorn.ogg', 100, 1)
|
||||||
return 0
|
chassis.occupant_message("<font color='red' size='5'>HONK</font>")
|
||||||
playsound(chassis, 'sound/items/AirHorn.ogg', 100, 1)
|
for(var/mob/living/carbon/M in ohearers(6, chassis))
|
||||||
chassis.occupant_message("<font color='red' size='5'>HONK</font>")
|
if(istype(M, /mob/living/carbon/human))
|
||||||
for(var/mob/living/carbon/M in ohearers(6, chassis))
|
var/mob/living/carbon/human/H = M
|
||||||
if(istype(M, /mob/living/carbon/human))
|
if(istype(H.l_ear, /obj/item/clothing/ears/earmuffs) || istype(H.r_ear, /obj/item/clothing/ears/earmuffs))
|
||||||
var/mob/living/carbon/human/H = M
|
continue
|
||||||
if(istype(H.l_ear, /obj/item/clothing/ears/earmuffs) || istype(H.r_ear, /obj/item/clothing/ears/earmuffs))
|
M << "<font color='red' size='7'>HONK</font>"
|
||||||
continue
|
M.sleeping = 0
|
||||||
M << "<font color='red' size='7'>HONK</font>"
|
M.stuttering += 20
|
||||||
M.sleeping = 0
|
M.ear_deaf += 30
|
||||||
M.stuttering += 20
|
M.Weaken(3)
|
||||||
M.ear_deaf += 30
|
if(prob(30))
|
||||||
M.Weaken(3)
|
M.Stun(10)
|
||||||
if(prob(30))
|
M.Paralyse(4)
|
||||||
M.Stun(10)
|
else
|
||||||
M.Paralyse(4)
|
M.make_jittery(500)
|
||||||
else
|
chassis.use_power(energy_drain)
|
||||||
M.make_jittery(500)
|
log_message("Honked from [src.name]. HONK!")
|
||||||
chassis.use_power(energy_drain)
|
do_after_cooldown()
|
||||||
log_message("Honked from [src.name]. HONK!")
|
return
|
||||||
do_after_cooldown()
|
|
||||||
return
|
|
||||||
|
|
||||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/banana_mortar
|
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/banana_mortar
|
||||||
name = "Banana Mortar"
|
name = "banana mortar"
|
||||||
|
desc = "Equipment for clown exosuits. Launches banana peels."
|
||||||
icon_state = "mecha_bananamrtr"
|
icon_state = "mecha_bananamrtr"
|
||||||
projectile = /obj/item/weapon/bananapeel
|
projectile = /obj/item/weapon/bananapeel
|
||||||
fire_sound = 'sound/items/bikehorn.ogg'
|
fire_sound = 'sound/items/bikehorn.ogg'
|
||||||
@@ -93,17 +93,15 @@
|
|||||||
missile_speed = 1.5
|
missile_speed = 1.5
|
||||||
projectile_energy_cost = 100
|
projectile_energy_cost = 100
|
||||||
equip_cooldown = 20
|
equip_cooldown = 20
|
||||||
|
required_type = list(/obj/mecha/combat/honker)
|
||||||
can_attach(obj/mecha/combat/honker/M as obj)
|
|
||||||
if(!istype(M))
|
|
||||||
return 0
|
|
||||||
return ..()
|
|
||||||
|
|
||||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/banana_mortar/mousetrap_mortar
|
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/banana_mortar/mousetrap_mortar
|
||||||
name = "Mousetrap Mortar"
|
name = "mousetrap mortar"
|
||||||
|
desc = "Equipment for clown exosuits. Launches armed mousetraps."
|
||||||
icon_state = "mecha_mousetrapmrtr"
|
icon_state = "mecha_mousetrapmrtr"
|
||||||
projectile = /obj/item/device/assembly/mousetrap
|
projectile = /obj/item/device/assembly/mousetrap
|
||||||
equip_cooldown = 10
|
equip_cooldown = 10
|
||||||
|
required_type = list(/obj/mecha/combat/honker)
|
||||||
|
|
||||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/banana_mortar/mousetrap_mortar/Fire(atom/movable/AM, atom/target, turf/aimloc)
|
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/banana_mortar/mousetrap_mortar/Fire(atom/movable/AM, atom/target, turf/aimloc)
|
||||||
var/obj/item/device/assembly/mousetrap/M = AM
|
var/obj/item/device/assembly/mousetrap/M = AM
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/obj/item/mecha_parts/mecha_equipment/tool/sleeper
|
/obj/item/mecha_parts/mecha_equipment/tool/sleeper
|
||||||
name = "mounted sleeper"
|
name = "mounted sleeper"
|
||||||
desc = "A sleeper. Mountable to an exosuit. (Can be attached to: Medical Exosuits)"
|
desc = "Equipment for medical exosuits. A mounted sleeper that stabilizes patients and can inject reagents in the exosuit's reserves."
|
||||||
icon = 'icons/obj/Cryogenic2.dmi'
|
icon = 'icons/obj/Cryogenic2.dmi'
|
||||||
icon_state = "sleeper_0"
|
icon_state = "sleeper_0"
|
||||||
origin_tech = list(TECH_DATA = 2, TECH_BIO = 3)
|
origin_tech = list(TECH_DATA = 2, TECH_BIO = 3)
|
||||||
@@ -210,147 +210,9 @@
|
|||||||
chassis.use_power(energy_drain)
|
chassis.use_power(energy_drain)
|
||||||
update_equip_info()
|
update_equip_info()
|
||||||
|
|
||||||
/obj/item/mecha_parts/mecha_equipment/tool/cable_layer
|
|
||||||
name = "Cable Layer"
|
|
||||||
icon_state = "mecha_wire"
|
|
||||||
var/datum/mecha_event/event
|
|
||||||
var/turf/old_turf
|
|
||||||
var/obj/structure/cable/last_piece
|
|
||||||
var/obj/item/stack/cable_coil/cable
|
|
||||||
var/max_cable = 1000
|
|
||||||
required_type = /obj/mecha/working
|
|
||||||
|
|
||||||
/obj/item/mecha_parts/mecha_equipment/tool/cable_layer/New()
|
|
||||||
cable = new(src)
|
|
||||||
cable.amount = 0
|
|
||||||
..()
|
|
||||||
|
|
||||||
/obj/item/mecha_parts/mecha_equipment/tool/cable_layer/attach()
|
|
||||||
..()
|
|
||||||
event = chassis.events.addEvent("onMove",src,"layCable")
|
|
||||||
return
|
|
||||||
|
|
||||||
/obj/item/mecha_parts/mecha_equipment/tool/cable_layer/detach()
|
|
||||||
chassis.events.clearEvent("onMove",event)
|
|
||||||
return ..()
|
|
||||||
|
|
||||||
/obj/item/mecha_parts/mecha_equipment/tool/cable_layer/destroy()
|
|
||||||
chassis.events.clearEvent("onMove",event)
|
|
||||||
return ..()
|
|
||||||
|
|
||||||
/obj/item/mecha_parts/mecha_equipment/tool/cable_layer/action(var/obj/item/stack/cable_coil/target)
|
|
||||||
if(!action_checks(target))
|
|
||||||
return
|
|
||||||
var/result = load_cable(target)
|
|
||||||
var/message
|
|
||||||
if(isnull(result))
|
|
||||||
message = "<font color='red'>Unable to load [target] - no cable found.</font>"
|
|
||||||
else if(!result)
|
|
||||||
message = "Reel is full."
|
|
||||||
else
|
|
||||||
message = "[result] meters of cable successfully loaded."
|
|
||||||
send_byjax(chassis.occupant,"exosuit.browser","\ref[src]",src.get_equip_info())
|
|
||||||
occupant_message(message)
|
|
||||||
return
|
|
||||||
|
|
||||||
/obj/item/mecha_parts/mecha_equipment/tool/cable_layer/Topic(href,href_list)
|
|
||||||
..()
|
|
||||||
if(href_list["toggle"])
|
|
||||||
set_ready_state(!equip_ready)
|
|
||||||
occupant_message("[src] [equip_ready?"dea":"a"]ctivated.")
|
|
||||||
log_message("[equip_ready?"Dea":"A"]ctivated.")
|
|
||||||
return
|
|
||||||
if(href_list["cut"])
|
|
||||||
if(cable && cable.amount)
|
|
||||||
var/m = round(input(chassis.occupant,"Please specify the length of cable to cut","Cut cable",min(cable.amount,30)) as num, 1)
|
|
||||||
m = min(m, cable.amount)
|
|
||||||
if(m)
|
|
||||||
use_cable(m)
|
|
||||||
var/obj/item/stack/cable_coil/CC = new (get_turf(chassis))
|
|
||||||
CC.amount = m
|
|
||||||
else
|
|
||||||
occupant_message("There's no more cable on the reel.")
|
|
||||||
return
|
|
||||||
|
|
||||||
/obj/item/mecha_parts/mecha_equipment/tool/cable_layer/get_equip_info()
|
|
||||||
var/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
|
|
||||||
|
|
||||||
/obj/item/mecha_parts/mecha_equipment/tool/cable_layer/proc/load_cable(var/obj/item/stack/cable_coil/CC)
|
|
||||||
if(istype(CC) && CC.amount)
|
|
||||||
var/cur_amount = cable? cable.amount : 0
|
|
||||||
var/to_load = max(max_cable - cur_amount,0)
|
|
||||||
if(to_load)
|
|
||||||
to_load = min(CC.amount, to_load)
|
|
||||||
if(!cable)
|
|
||||||
cable = new(src)
|
|
||||||
cable.amount = 0
|
|
||||||
cable.amount += to_load
|
|
||||||
CC.use(to_load)
|
|
||||||
return to_load
|
|
||||||
else
|
|
||||||
return 0
|
|
||||||
return
|
|
||||||
|
|
||||||
/obj/item/mecha_parts/mecha_equipment/tool/cable_layer/proc/use_cable(amount)
|
|
||||||
if(!cable || cable.amount<1)
|
|
||||||
set_ready_state(1)
|
|
||||||
occupant_message("Cable depleted, [src] deactivated.")
|
|
||||||
log_message("Cable depleted, [src] deactivated.")
|
|
||||||
return
|
|
||||||
if(cable.amount < amount)
|
|
||||||
occupant_message("No enough cable to finish the task.")
|
|
||||||
return
|
|
||||||
cable.use(amount)
|
|
||||||
update_equip_info()
|
|
||||||
return 1
|
|
||||||
|
|
||||||
/obj/item/mecha_parts/mecha_equipment/tool/cable_layer/proc/reset()
|
|
||||||
last_piece = null
|
|
||||||
|
|
||||||
/obj/item/mecha_parts/mecha_equipment/tool/cable_layer/proc/dismantleFloor(var/turf/new_turf)
|
|
||||||
if(istype(new_turf, /turf/simulated/floor))
|
|
||||||
var/turf/simulated/floor/T = new_turf
|
|
||||||
if(!T.is_plating())
|
|
||||||
T.make_plating(!(T.broken || T.burnt))
|
|
||||||
return new_turf.is_plating()
|
|
||||||
|
|
||||||
/obj/item/mecha_parts/mecha_equipment/tool/cable_layer/proc/layCable(var/turf/new_turf)
|
|
||||||
if(equip_ready || !istype(new_turf) || !dismantleFloor(new_turf))
|
|
||||||
return reset()
|
|
||||||
var/fdirn = turn(chassis.dir,180)
|
|
||||||
for(var/obj/structure/cable/LC in new_turf) // check to make sure there's not a cable there already
|
|
||||||
if(LC.d1 == fdirn || LC.d2 == fdirn)
|
|
||||||
return reset()
|
|
||||||
if(!use_cable(1))
|
|
||||||
return reset()
|
|
||||||
var/obj/structure/cable/NC = new(new_turf)
|
|
||||||
NC.cableColor("red")
|
|
||||||
NC.d1 = 0
|
|
||||||
NC.d2 = fdirn
|
|
||||||
NC.updateicon()
|
|
||||||
|
|
||||||
var/datum/powernet/PN
|
|
||||||
if(last_piece && last_piece.d2 != chassis.dir)
|
|
||||||
last_piece.d1 = min(last_piece.d2, chassis.dir)
|
|
||||||
last_piece.d2 = max(last_piece.d2, chassis.dir)
|
|
||||||
last_piece.updateicon()
|
|
||||||
PN = last_piece.powernet
|
|
||||||
|
|
||||||
if(!PN)
|
|
||||||
PN = new()
|
|
||||||
PN.add_cable(NC)
|
|
||||||
NC.mergeConnectedNetworks(NC.d2)
|
|
||||||
|
|
||||||
//NC.mergeConnectedNetworksOnTurf()
|
|
||||||
last_piece = NC
|
|
||||||
return 1
|
|
||||||
|
|
||||||
/obj/item/mecha_parts/mecha_equipment/tool/syringe_gun
|
/obj/item/mecha_parts/mecha_equipment/tool/syringe_gun
|
||||||
name = "syringe gun"
|
name = "syringe gun"
|
||||||
desc = "Exosuit-mounted chem synthesizer with syringe gun. Reagents inside are held in stasis, so no reactions will occur. (Can be attached to: Medical Exosuits)"
|
desc = "Equipment for medical exosuits. Exosuit-mounted chem synthesizer with syringe gun, reagents inside are held in stasis, so no reactions will occur."
|
||||||
icon = 'icons/obj/gun.dmi'
|
icon = 'icons/obj/gun.dmi'
|
||||||
icon_state = "syringegun"
|
icon_state = "syringegun"
|
||||||
var/list/syringes
|
var/list/syringes
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/obj/item/mecha_parts/mecha_equipment/tool/hydraulic_clamp
|
/obj/item/mecha_parts/mecha_equipment/tool/hydraulic_clamp
|
||||||
name = "hydraulic clamp"
|
name = "hydraulic clamp"
|
||||||
|
desc = "Equipment for engineering exosuits. Lifts objects and loads them into cargo."
|
||||||
icon_state = "mecha_clamp"
|
icon_state = "mecha_clamp"
|
||||||
equip_cooldown = 15
|
equip_cooldown = 15
|
||||||
energy_drain = 10
|
energy_drain = 10
|
||||||
@@ -69,7 +70,7 @@
|
|||||||
|
|
||||||
/obj/item/mecha_parts/mecha_equipment/tool/drill
|
/obj/item/mecha_parts/mecha_equipment/tool/drill
|
||||||
name = "drill"
|
name = "drill"
|
||||||
desc = "This is the drill that'll pierce the heavens! (Can be attached to: Combat and Engineering Exosuits)"
|
desc = "Equipment for engineering and combat exosuits. This is the drill that'll pierce the heavens!"
|
||||||
icon_state = "mecha_drill"
|
icon_state = "mecha_drill"
|
||||||
equip_cooldown = 30
|
equip_cooldown = 30
|
||||||
energy_drain = 10
|
energy_drain = 10
|
||||||
@@ -126,8 +127,7 @@
|
|||||||
|
|
||||||
/obj/item/mecha_parts/mecha_equipment/tool/drill/diamonddrill
|
/obj/item/mecha_parts/mecha_equipment/tool/drill/diamonddrill
|
||||||
name = "diamond drill"
|
name = "diamond drill"
|
||||||
desc = "This is an upgraded version of the drill that'll pierce the heavens! (Can be attached to: Combat and Engineering Exosuits)"
|
desc = "Equipment for engineering and combat exosuits. This is an upgraded version of the drill that'll pierce the heavens!"
|
||||||
icon_state = "mecha_diamond_drill"
|
|
||||||
origin_tech = list(TECH_MATERIAL = 4, TECH_ENGINEERING = 3)
|
origin_tech = list(TECH_MATERIAL = 4, TECH_ENGINEERING = 3)
|
||||||
equip_cooldown = 20
|
equip_cooldown = 20
|
||||||
force = 15
|
force = 15
|
||||||
@@ -177,7 +177,7 @@
|
|||||||
|
|
||||||
/obj/item/mecha_parts/mecha_equipment/tool/extinguisher
|
/obj/item/mecha_parts/mecha_equipment/tool/extinguisher
|
||||||
name = "extinguisher"
|
name = "extinguisher"
|
||||||
desc = "Exosuit-mounted extinguisher (Can be attached to: Engineering exosuits)"
|
desc = "Equipment for engineering exosuits. A rapid-firing high capacity fire extinguisher."
|
||||||
icon_state = "mecha_exting"
|
icon_state = "mecha_exting"
|
||||||
equip_cooldown = 5
|
equip_cooldown = 5
|
||||||
energy_drain = 0
|
energy_drain = 0
|
||||||
@@ -251,7 +251,7 @@
|
|||||||
|
|
||||||
/obj/item/mecha_parts/mecha_equipment/tool/rcd
|
/obj/item/mecha_parts/mecha_equipment/tool/rcd
|
||||||
name = "mounted RCD"
|
name = "mounted RCD"
|
||||||
desc = "An exosuit-mounted Rapid Construction Device. (Can be attached to: Any exosuit)"
|
desc = "An exosuit-mounted Rapid Construction Device."
|
||||||
icon_state = "mecha_rcd"
|
icon_state = "mecha_rcd"
|
||||||
origin_tech = list(TECH_MATERIAL = 4, TECH_BLUESPACE = 3, TECH_MAGNET = 4, TECH_POWER = 4)
|
origin_tech = list(TECH_MATERIAL = 4, TECH_BLUESPACE = 3, TECH_MAGNET = 4, TECH_POWER = 4)
|
||||||
equip_cooldown = 10
|
equip_cooldown = 10
|
||||||
@@ -906,6 +906,7 @@
|
|||||||
//This is pretty much just for the death-ripley so that it is harmless
|
//This is pretty much just for the death-ripley so that it is harmless
|
||||||
/obj/item/mecha_parts/mecha_equipment/tool/safety_clamp
|
/obj/item/mecha_parts/mecha_equipment/tool/safety_clamp
|
||||||
name = "\improper KILL CLAMP"
|
name = "\improper KILL CLAMP"
|
||||||
|
desc = "Equipment for engineering exosuits. Lifts objects and loads them into cargo."
|
||||||
icon_state = "mecha_clamp"
|
icon_state = "mecha_clamp"
|
||||||
equip_cooldown = 15
|
equip_cooldown = 15
|
||||||
energy_drain = 0
|
energy_drain = 0
|
||||||
@@ -964,6 +965,145 @@
|
|||||||
do_after_cooldown()
|
do_after_cooldown()
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
|
/obj/item/mecha_parts/mecha_equipment/tool/cable_layer
|
||||||
|
name = "cable layer"
|
||||||
|
desc = "Equipment for engineering exosuits. Lays cable along the exosuit's path."
|
||||||
|
icon_state = "mecha_wire"
|
||||||
|
var/datum/mecha_event/event
|
||||||
|
var/turf/old_turf
|
||||||
|
var/obj/structure/cable/last_piece
|
||||||
|
var/obj/item/stack/cable_coil/cable
|
||||||
|
var/max_cable = 1000
|
||||||
|
required_type = /obj/mecha/working
|
||||||
|
|
||||||
|
/obj/item/mecha_parts/mecha_equipment/tool/cable_layer/New()
|
||||||
|
cable = new(src)
|
||||||
|
cable.amount = 0
|
||||||
|
..()
|
||||||
|
|
||||||
|
/obj/item/mecha_parts/mecha_equipment/tool/cable_layer/attach()
|
||||||
|
..()
|
||||||
|
event = chassis.events.addEvent("onMove",src,"layCable")
|
||||||
|
return
|
||||||
|
|
||||||
|
/obj/item/mecha_parts/mecha_equipment/tool/cable_layer/detach()
|
||||||
|
chassis.events.clearEvent("onMove",event)
|
||||||
|
return ..()
|
||||||
|
|
||||||
|
/obj/item/mecha_parts/mecha_equipment/tool/cable_layer/destroy()
|
||||||
|
chassis.events.clearEvent("onMove",event)
|
||||||
|
return ..()
|
||||||
|
|
||||||
|
/obj/item/mecha_parts/mecha_equipment/tool/cable_layer/action(var/obj/item/stack/cable_coil/target)
|
||||||
|
if(!action_checks(target))
|
||||||
|
return
|
||||||
|
var/result = load_cable(target)
|
||||||
|
var/message
|
||||||
|
if(isnull(result))
|
||||||
|
message = "<font color='red'>Unable to load [target] - no cable found.</font>"
|
||||||
|
else if(!result)
|
||||||
|
message = "Reel is full."
|
||||||
|
else
|
||||||
|
message = "[result] meters of cable successfully loaded."
|
||||||
|
send_byjax(chassis.occupant,"exosuit.browser","\ref[src]",src.get_equip_info())
|
||||||
|
occupant_message(message)
|
||||||
|
return
|
||||||
|
|
||||||
|
/obj/item/mecha_parts/mecha_equipment/tool/cable_layer/Topic(href,href_list)
|
||||||
|
..()
|
||||||
|
if(href_list["toggle"])
|
||||||
|
set_ready_state(!equip_ready)
|
||||||
|
occupant_message("[src] [equip_ready?"dea":"a"]ctivated.")
|
||||||
|
log_message("[equip_ready?"Dea":"A"]ctivated.")
|
||||||
|
return
|
||||||
|
if(href_list["cut"])
|
||||||
|
if(cable && cable.amount)
|
||||||
|
var/m = round(input(chassis.occupant,"Please specify the length of cable to cut","Cut cable",min(cable.amount,30)) as num, 1)
|
||||||
|
m = min(m, cable.amount)
|
||||||
|
if(m)
|
||||||
|
use_cable(m)
|
||||||
|
var/obj/item/stack/cable_coil/CC = new (get_turf(chassis))
|
||||||
|
CC.amount = m
|
||||||
|
else
|
||||||
|
occupant_message("There's no more cable on the reel.")
|
||||||
|
return
|
||||||
|
|
||||||
|
/obj/item/mecha_parts/mecha_equipment/tool/cable_layer/get_equip_info()
|
||||||
|
var/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
|
||||||
|
|
||||||
|
/obj/item/mecha_parts/mecha_equipment/tool/cable_layer/proc/load_cable(var/obj/item/stack/cable_coil/CC)
|
||||||
|
if(istype(CC) && CC.amount)
|
||||||
|
var/cur_amount = cable? cable.amount : 0
|
||||||
|
var/to_load = max(max_cable - cur_amount,0)
|
||||||
|
if(to_load)
|
||||||
|
to_load = min(CC.amount, to_load)
|
||||||
|
if(!cable)
|
||||||
|
cable = new(src)
|
||||||
|
cable.amount = 0
|
||||||
|
cable.amount += to_load
|
||||||
|
CC.use(to_load)
|
||||||
|
return to_load
|
||||||
|
else
|
||||||
|
return 0
|
||||||
|
return
|
||||||
|
|
||||||
|
/obj/item/mecha_parts/mecha_equipment/tool/cable_layer/proc/use_cable(amount)
|
||||||
|
if(!cable || cable.amount<1)
|
||||||
|
set_ready_state(1)
|
||||||
|
occupant_message("Cable depleted, [src] deactivated.")
|
||||||
|
log_message("Cable depleted, [src] deactivated.")
|
||||||
|
return
|
||||||
|
if(cable.amount < amount)
|
||||||
|
occupant_message("No enough cable to finish the task.")
|
||||||
|
return
|
||||||
|
cable.use(amount)
|
||||||
|
update_equip_info()
|
||||||
|
return 1
|
||||||
|
|
||||||
|
/obj/item/mecha_parts/mecha_equipment/tool/cable_layer/proc/reset()
|
||||||
|
last_piece = null
|
||||||
|
|
||||||
|
/obj/item/mecha_parts/mecha_equipment/tool/cable_layer/proc/dismantleFloor(var/turf/new_turf)
|
||||||
|
if(istype(new_turf, /turf/simulated/floor))
|
||||||
|
var/turf/simulated/floor/T = new_turf
|
||||||
|
if(!T.is_plating())
|
||||||
|
T.make_plating(!(T.broken || T.burnt))
|
||||||
|
return new_turf.is_plating()
|
||||||
|
|
||||||
|
/obj/item/mecha_parts/mecha_equipment/tool/cable_layer/proc/layCable(var/turf/new_turf)
|
||||||
|
if(equip_ready || !istype(new_turf) || !dismantleFloor(new_turf))
|
||||||
|
return reset()
|
||||||
|
var/fdirn = turn(chassis.dir,180)
|
||||||
|
for(var/obj/structure/cable/LC in new_turf) // check to make sure there's not a cable there already
|
||||||
|
if(LC.d1 == fdirn || LC.d2 == fdirn)
|
||||||
|
return reset()
|
||||||
|
if(!use_cable(1))
|
||||||
|
return reset()
|
||||||
|
var/obj/structure/cable/NC = new(new_turf)
|
||||||
|
NC.cableColor("red")
|
||||||
|
NC.d1 = 0
|
||||||
|
NC.d2 = fdirn
|
||||||
|
NC.updateicon()
|
||||||
|
|
||||||
|
var/datum/powernet/PN
|
||||||
|
if(last_piece && last_piece.d2 != chassis.dir)
|
||||||
|
last_piece.d1 = min(last_piece.d2, chassis.dir)
|
||||||
|
last_piece.d2 = max(last_piece.d2, chassis.dir)
|
||||||
|
last_piece.updateicon()
|
||||||
|
PN = last_piece.powernet
|
||||||
|
|
||||||
|
if(!PN)
|
||||||
|
PN = new()
|
||||||
|
PN.add_cable(NC)
|
||||||
|
NC.mergeConnectedNetworks(NC.d2)
|
||||||
|
|
||||||
|
//NC.mergeConnectedNetworksOnTurf()
|
||||||
|
last_piece = NC
|
||||||
|
return 1
|
||||||
|
|
||||||
/obj/item/mecha_parts/mecha_equipment/tool/passenger
|
/obj/item/mecha_parts/mecha_equipment/tool/passenger
|
||||||
name = "passenger compartment"
|
name = "passenger compartment"
|
||||||
desc = "A mountable passenger compartment for exo-suits. Rather cramped."
|
desc = "A mountable passenger compartment for exo-suits. Rather cramped."
|
||||||
|
|||||||
@@ -61,6 +61,7 @@
|
|||||||
/obj/item/mecha_parts/mecha_equipment/weapon/energy/laser
|
/obj/item/mecha_parts/mecha_equipment/weapon/energy/laser
|
||||||
equip_cooldown = 8
|
equip_cooldown = 8
|
||||||
name = "\improper CH-PS \"Immolator\" laser"
|
name = "\improper CH-PS \"Immolator\" laser"
|
||||||
|
desc = "A weapon for combat exosuits. Shoots basic lasers."
|
||||||
icon_state = "mecha_laser"
|
icon_state = "mecha_laser"
|
||||||
energy_drain = 30
|
energy_drain = 30
|
||||||
projectile = /obj/item/projectile/beam
|
projectile = /obj/item/projectile/beam
|
||||||
@@ -79,6 +80,7 @@
|
|||||||
/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"
|
||||||
|
desc = "A weapon for combat exosuits. Shoots heavy lasers."
|
||||||
icon_state = "mecha_laser"
|
icon_state = "mecha_laser"
|
||||||
energy_drain = 60
|
energy_drain = 60
|
||||||
projectile = /obj/item/projectile/beam/heavylaser
|
projectile = /obj/item/projectile/beam/heavylaser
|
||||||
@@ -87,6 +89,7 @@
|
|||||||
/obj/item/mecha_parts/mecha_equipment/weapon/energy/ion
|
/obj/item/mecha_parts/mecha_equipment/weapon/energy/ion
|
||||||
equip_cooldown = 40
|
equip_cooldown = 40
|
||||||
name = "mkIV ion heavy cannon"
|
name = "mkIV ion heavy cannon"
|
||||||
|
desc = "A weapon for combat exosuits. Shoots ion bolts designated to disable mechanical threats."
|
||||||
icon_state = "mecha_ion"
|
icon_state = "mecha_ion"
|
||||||
energy_drain = 120
|
energy_drain = 120
|
||||||
projectile = /obj/item/projectile/ion
|
projectile = /obj/item/projectile/ion
|
||||||
@@ -96,6 +99,7 @@
|
|||||||
equip_cooldown = 30
|
equip_cooldown = 30
|
||||||
name = "eZ-13 mk2 heavy pulse rifle"
|
name = "eZ-13 mk2 heavy pulse rifle"
|
||||||
icon_state = "mecha_pulse"
|
icon_state = "mecha_pulse"
|
||||||
|
desc = "A weapon for combat exosuits. Shoots powerful pulse-based beams, capable of destroying structures."
|
||||||
energy_drain = 120
|
energy_drain = 120
|
||||||
origin_tech = list(TECH_MATERIAL = 3, TECH_COMBAT = 6, TECH_POWER = 4)
|
origin_tech = list(TECH_MATERIAL = 3, TECH_COMBAT = 6, TECH_POWER = 4)
|
||||||
projectile = /obj/item/projectile/beam/pulse/heavy
|
projectile = /obj/item/projectile/beam/pulse/heavy
|
||||||
@@ -106,106 +110,71 @@
|
|||||||
icon_state = "pulse1_bl"
|
icon_state = "pulse1_bl"
|
||||||
var/life = 20
|
var/life = 20
|
||||||
|
|
||||||
Bump(atom/A)
|
/obj/item/projectile/beam/pulse/heavy/Bump(atom/A)
|
||||||
A.bullet_act(src, def_zone)
|
A.bullet_act(src, def_zone)
|
||||||
src.life -= 10
|
src.life -= 10
|
||||||
if(life <= 0)
|
if(life <= 0)
|
||||||
qdel(src)
|
qdel(src)
|
||||||
return
|
return
|
||||||
|
|
||||||
/obj/item/mecha_parts/mecha_equipment/weapon/energy/taser
|
/obj/item/mecha_parts/mecha_equipment/weapon/energy/taser
|
||||||
name = "\improper PBT \"Pacifier\" mounted taser"
|
name = "\improper PBT \"Pacifier\" mounted taser"
|
||||||
|
desc = "A weapon for combat exosuits. Shoots non-lethal stunning beams."
|
||||||
icon_state = "mecha_taser"
|
icon_state = "mecha_taser"
|
||||||
energy_drain = 20
|
energy_drain = 20
|
||||||
equip_cooldown = 8
|
equip_cooldown = 8
|
||||||
projectile = /obj/item/projectile/beam/stun
|
projectile = /obj/item/projectile/beam/stun
|
||||||
fire_sound = 'sound/weapons/Taser.ogg'
|
fire_sound = 'sound/weapons/Taser.ogg'
|
||||||
|
|
||||||
/* Commenting this out rather than removing it because it may be useful for reference.
|
/obj/item/mecha_parts/mecha_equipment/weapon/energy/plasma
|
||||||
/obj/item/mecha_parts/mecha_equipment/weapon/honker
|
name = "mkII heavy plasma cutter"
|
||||||
name = "\improper HoNkER BlAsT 5000"
|
desc = "A large mining tool capable of expelling concentrated plasma bursts, useful for crushing rocks."
|
||||||
icon_state = "mecha_honker"
|
icon_state = "mecha_plasmacutter"
|
||||||
energy_drain = 200
|
energy_drain = 60
|
||||||
equip_cooldown = 150
|
equip_cooldown = 25
|
||||||
range = MELEE|RANGED
|
projectile = /obj/item/projectile/beam/plasmacutter
|
||||||
construction_time = 500
|
fire_sound = 'sound/weapons/plasma_cutter.ogg'
|
||||||
construction_cost = list("metal"=20000,"bananium"=10000)
|
required_type = list(/obj/mecha/combat, /obj/mecha/working)
|
||||||
|
|
||||||
can_attach(obj/mecha/combat/honker/M as obj)
|
|
||||||
if(!istype(M))
|
|
||||||
return 0
|
|
||||||
return ..()
|
|
||||||
|
|
||||||
action(target)
|
|
||||||
if(!chassis)
|
|
||||||
return 0
|
|
||||||
if(energy_drain && chassis.get_charge() < energy_drain)
|
|
||||||
return 0
|
|
||||||
if(!equip_ready)
|
|
||||||
return 0
|
|
||||||
|
|
||||||
playsound(chassis, 'sound/items/AirHorn.ogg', 100, 1)
|
|
||||||
chassis.occupant_message("<font color='red' size='5'>HONK</font>")
|
|
||||||
for(var/mob/living/carbon/M in ohearers(6, chassis))
|
|
||||||
if(istype(M, /mob/living/carbon/human))
|
|
||||||
var/mob/living/carbon/human/H = M
|
|
||||||
if(istype(H.l_ear, /obj/item/clothing/ears/earmuffs) || istype(H.r_ear, /obj/item/clothing/ears/earmuffs))
|
|
||||||
continue
|
|
||||||
M << "<font color='red' size='7'>HONK</font>"
|
|
||||||
M.sleeping = 0
|
|
||||||
M.stuttering += 20
|
|
||||||
M.ear_deaf += 30
|
|
||||||
M.Weaken(3)
|
|
||||||
if(prob(30))
|
|
||||||
M.Stun(10)
|
|
||||||
M.Paralyse(4)
|
|
||||||
else
|
|
||||||
M.make_jittery(500)
|
|
||||||
chassis.use_power(energy_drain)
|
|
||||||
log_message("Honked from [src.name]. HONK!")
|
|
||||||
do_after_cooldown()
|
|
||||||
return
|
|
||||||
*/
|
|
||||||
|
|
||||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic
|
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic
|
||||||
name = "general ballisic weapon"
|
name = "general ballisic weapon"
|
||||||
var/projectile_energy_cost
|
var/projectile_energy_cost
|
||||||
|
|
||||||
get_equip_info()
|
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/get_equip_info()
|
||||||
return "[..()]\[[src.projectiles]\][(src.projectiles < initial(src.projectiles))?" - <a href='?src=\ref[src];rearm=1'>Rearm</a>":null]"
|
return "[..()]\[[src.projectiles]\][(src.projectiles < initial(src.projectiles))?" - <a href='?src=\ref[src];rearm=1'>Rearm</a>":null]"
|
||||||
|
|
||||||
proc/rearm()
|
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/proc/rearm()
|
||||||
if(projectiles < initial(projectiles))
|
if(projectiles < initial(projectiles))
|
||||||
var/projectiles_to_add = initial(projectiles) - projectiles
|
var/projectiles_to_add = initial(projectiles) - projectiles
|
||||||
while(chassis.get_charge() >= projectile_energy_cost && projectiles_to_add)
|
while(chassis.get_charge() >= projectile_energy_cost && projectiles_to_add)
|
||||||
projectiles++
|
projectiles++
|
||||||
projectiles_to_add--
|
projectiles_to_add--
|
||||||
chassis.use_power(projectile_energy_cost)
|
chassis.use_power(projectile_energy_cost)
|
||||||
send_byjax(chassis.occupant,"exosuit.browser","\ref[src]",src.get_equip_info())
|
send_byjax(chassis.occupant,"exosuit.browser","\ref[src]",src.get_equip_info())
|
||||||
log_message("Rearmed [src.name].")
|
log_message("Rearmed [src.name].")
|
||||||
return
|
return
|
||||||
|
|
||||||
Topic(href, href_list)
|
|
||||||
..()
|
|
||||||
if (href_list["rearm"])
|
|
||||||
src.rearm()
|
|
||||||
return
|
|
||||||
|
|
||||||
|
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/Topic(href, href_list)
|
||||||
|
..()
|
||||||
|
if (href_list["rearm"])
|
||||||
|
src.rearm()
|
||||||
|
return
|
||||||
|
|
||||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/scattershot
|
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/scattershot
|
||||||
name = "\improper LBX AC 10 \"Scattershot\""
|
name = "\improper LBX AC 10 \"Scattershot\""
|
||||||
|
desc = "A weapon for combat exosuits. Shoots a spread of pellets."
|
||||||
icon_state = "mecha_scatter"
|
icon_state = "mecha_scatter"
|
||||||
equip_cooldown = 20
|
equip_cooldown = 20
|
||||||
projectile = /obj/item/projectile/bullet/pistol/medium
|
projectile = /obj/item/projectile/bullet/pellet
|
||||||
fire_sound = 'sound/weapons/Gunshot.ogg'
|
fire_sound = 'sound/weapons/Gunshot.ogg'
|
||||||
fire_volume = 80
|
fire_volume = 80
|
||||||
projectiles = 40
|
projectiles = 40
|
||||||
projectiles_per_shot = 4
|
|
||||||
deviation = 0.7
|
deviation = 0.7
|
||||||
projectile_energy_cost = 25
|
projectile_energy_cost = 25
|
||||||
|
|
||||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/lmg
|
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/lmg
|
||||||
name = "\improper Ultra AC 2"
|
name = "\improper Ultra AC 2"
|
||||||
|
desc = "A weapon for combat exosuits. Shoots a rapid, three shot burst."
|
||||||
icon_state = "mecha_uac2"
|
icon_state = "mecha_uac2"
|
||||||
equip_cooldown = 10
|
equip_cooldown = 10
|
||||||
projectile = /obj/item/projectile/bullet/pistol/medium
|
projectile = /obj/item/projectile/bullet/pistol/medium
|
||||||
@@ -216,6 +185,17 @@
|
|||||||
projectile_energy_cost = 20
|
projectile_energy_cost = 20
|
||||||
fire_cooldown = 2
|
fire_cooldown = 2
|
||||||
|
|
||||||
|
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/incendiary
|
||||||
|
name = "\improper HP-13 incendiary carbine"
|
||||||
|
desc = "A weapon for combat exosuits. Shoots incendiary shells."
|
||||||
|
icon_state = "mecha_carbine"
|
||||||
|
equip_cooldown = 10
|
||||||
|
projectile = /obj/item/projectile/bullet/shotgun/incendiary
|
||||||
|
fire_sound = 'sound/weapons/Gunshot.ogg'
|
||||||
|
projectiles = 50
|
||||||
|
projectile_energy_cost = 40
|
||||||
|
deviation = 0.7
|
||||||
|
|
||||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack
|
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack
|
||||||
var/missile_speed = 2
|
var/missile_speed = 2
|
||||||
var/missile_range = 30
|
var/missile_range = 30
|
||||||
@@ -225,6 +205,7 @@
|
|||||||
|
|
||||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/explosive
|
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/explosive
|
||||||
name = "\improper SRM-8 missile rack"
|
name = "\improper SRM-8 missile rack"
|
||||||
|
desc = "A weapon for combat exosuits. Shoots explosive missiles."
|
||||||
icon_state = "mecha_missilerack"
|
icon_state = "mecha_missilerack"
|
||||||
projectile = /obj/item/missile
|
projectile = /obj/item/missile
|
||||||
fire_sound = 'sound/effects/bang.ogg'
|
fire_sound = 'sound/effects/bang.ogg'
|
||||||
@@ -243,16 +224,17 @@
|
|||||||
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)
|
||||||
else
|
else
|
||||||
..()
|
..()
|
||||||
return
|
return
|
||||||
|
|
||||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/flashbang
|
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/flashbang
|
||||||
name = "\improper SGL-6 grenade launcher"
|
name = "\improper SGL-6 grenade launcher"
|
||||||
|
desc = "A weapon for combat exosuits. Launches primed flashbangs."
|
||||||
icon_state = "mecha_grenadelnchr"
|
icon_state = "mecha_grenadelnchr"
|
||||||
projectile = /obj/item/weapon/grenade/flashbang
|
projectile = /obj/item/weapon/grenade/flashbang
|
||||||
fire_sound = 'sound/effects/bang.ogg'
|
fire_sound = 'sound/effects/bang.ogg'
|
||||||
@@ -270,6 +252,7 @@
|
|||||||
|
|
||||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/flashbang/clusterbang//Because I am a heartless bastard -Sieve
|
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/flashbang/clusterbang//Because I am a heartless bastard -Sieve
|
||||||
name = "\improper SOP-6 grenade launcher"
|
name = "\improper SOP-6 grenade launcher"
|
||||||
|
desc = "A weapon for combat exosuits. Launches primed clusterbangs."
|
||||||
projectile = /obj/item/weapon/grenade/flashbang/clusterbang
|
projectile = /obj/item/weapon/grenade/flashbang/clusterbang
|
||||||
|
|
||||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/flashbang/clusterbang/limited/get_equip_info()//Limited version of the clusterbang launcher that can't reload
|
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/flashbang/clusterbang/limited/get_equip_info()//Limited version of the clusterbang launcher that can't reload
|
||||||
|
|||||||
@@ -525,6 +525,22 @@
|
|||||||
materials = list(DEFAULT_WALL_MATERIAL = 20000, "gold" = 6000, "uranium" = 6000)
|
materials = list(DEFAULT_WALL_MATERIAL = 20000, "gold" = 6000, "uranium" = 6000)
|
||||||
build_path = /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/flashbang/clusterbang/limited
|
build_path = /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/flashbang/clusterbang/limited
|
||||||
|
|
||||||
|
/datum/design/item/mecha/weapon/plasma_cutter
|
||||||
|
name = "mkII heavy plasma cutter"
|
||||||
|
desc = "A large mining tool capable of expelling concentrated plasma bursts, useful for crushing rocks."
|
||||||
|
id = "mecha_plasmacutter"
|
||||||
|
req_tech = list(TECH_MATERIAL = 4, TECH_PHORON = 4, TECH_ENGINEERING = 4)
|
||||||
|
materials = list(DEFAULT_WALL_MATERIAL = 2000, "glass" = 1000, "gold" = 1000, "phoron" = 1000)
|
||||||
|
build_path = /obj/item/mecha_parts/mecha_equipment/weapon/energy/plasma
|
||||||
|
|
||||||
|
/datum/design/item/mecha/weapon/incendiary
|
||||||
|
name = "HP-13 incendiary carbine"
|
||||||
|
desc = "A weapon for combat exosuits. Shoots incendiary shells."
|
||||||
|
id = "mecha_incendiary"
|
||||||
|
req_tech = list(TECH_COMBAT= 4, TECH_MATERIAL = 4, TECH_PHORON = 3)
|
||||||
|
materials = list(DEFAULT_WALL_MATERIAL = 2000, "glass" = 1000, "phoron" = 1000)
|
||||||
|
build_path = /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/incendiary
|
||||||
|
|
||||||
// *** Nonweapon modules
|
// *** Nonweapon modules
|
||||||
/datum/design/item/mecha/wormhole_gen
|
/datum/design/item/mecha/wormhole_gen
|
||||||
name = "Wormhole generator"
|
name = "Wormhole generator"
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 17 KiB |
Reference in New Issue
Block a user