Merge branch 'master' into Projectile_Rework

This commit is contained in:
Lin
2022-04-09 04:19:56 +00:00
committed by GitHub
410 changed files with 7476 additions and 7443 deletions
+3 -4
View File
@@ -270,7 +270,7 @@
var/a_incidence_s = abs(incidence_s)
if(a_incidence_s > 90 && a_incidence_s < 270)
return FALSE
if((P.flag in list("bullet", "bomb")) && P.ricochet_incidence_leeway)
if((P.flag in list(BULLET, BOMB)) && P.ricochet_incidence_leeway)
if((a_incidence_s < 90 && a_incidence_s < 90 - P.ricochet_incidence_leeway) || (a_incidence_s > 270 && a_incidence_s -270 > P.ricochet_incidence_leeway))
return FALSE
var/new_angle_s = SIMPLIFY_DEGREES(face_angle + incidence_s)
@@ -924,9 +924,6 @@
SEND_SIGNAL(src, COMSIG_ATOM_DIR_CHANGE, dir, newdir)
dir = newdir
/atom/proc/mech_melee_attack(obj/mecha/M)
return
//If a mob logouts/logins in side of an object you can use this proc
/atom/proc/on_log(login)
if(loc)
@@ -1190,6 +1187,8 @@
log_game(log_text)
if(LOG_GAME)
log_game(log_text)
if(LOG_MECHA)
log_mecha(log_text)
if(LOG_SHUTTLE)
log_shuttle(log_text)
else
+8 -17
View File
@@ -17,7 +17,7 @@
desc = "advanced clown shoes that protect the wearer and render them nearly immune to slipping on their own peels. They also squeak at 100% capacity."
clothing_flags = NOSLIP
slowdown = SHOES_SLOWDOWN
armor = list("melee" = 25, "bullet" = 25, "laser" = 25, "energy" = 25, "bomb" = 50, "bio" = 10, "rad" = 0, "fire" = 70, "acid" = 50)
armor = list(MELEE = 25, BULLET = 25, LASER = 25, ENERGY = 25, BOMB = 50, BIO = 10, RAD = 0, FIRE = 70, ACID = 50)
strip_delay = 70
resistance_flags = NONE
permeability_coefficient = 0.05
@@ -28,7 +28,7 @@
name = "mk-honk combat shoes"
desc = "The culmination of years of clown combat research, these shoes leave a trail of chaos in their wake. They will slowly recharge themselves over time, or can be manually charged with bananium."
slowdown = SHOES_SLOWDOWN
armor = list("melee" = 25, "bullet" = 25, "laser" = 25, "energy" = 25, "bomb" = 50, "bio" = 10, "rad" = 0, "fire" = 70, "acid" = 50)
armor = list(MELEE = 25, BULLET = 25, LASER = 25, ENERGY = 25, BOMB = 50, BIO = 10, RAD = 0, FIRE = 70, ACID = 50)
strip_delay = 70
resistance_flags = NONE
permeability_coefficient = 0.05
@@ -243,7 +243,7 @@
projectiles = 8
projectile_energy_cost = 1000
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/launcher/banana_mortar/bombanana/can_attach(obj/mecha/combat/honker/M)
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/launcher/banana_mortar/bombanana/can_attach(obj/vehicle/sealed/mecha/combat/honker/M)
if(..())
if(istype(M))
return TRUE
@@ -261,42 +261,33 @@
equip_cooldown = 60
det_time = 20
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/launcher/flashbang/tearstache/can_attach(obj/mecha/combat/honker/M)
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/launcher/flashbang/tearstache/can_attach(obj/vehicle/sealed/mecha/combat/honker/M)
if(..())
if(istype(M))
return TRUE
return FALSE
/obj/mecha/combat/honker/dark
/obj/vehicle/sealed/mecha/combat/honker/dark
desc = "Produced by \"Tyranny of Honk, INC\", this exosuit is designed as heavy clown-support. This one has been painted black for maximum fun. HONK!"
name = "\improper Dark H.O.N.K"
icon_state = "darkhonker"
max_integrity = 300
deflect_chance = 15
armor = list("melee" = 40, "bullet" = 40, "laser" = 50, "energy" = 35, "bomb" = 20, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 100)
armor = list(MELEE = 40, BULLET = 40, LASER = 50, ENERGY = 35, BOMB = 20, BIO = 0, RAD = 0, FIRE = 100, ACID = 100)
max_temperature = 35000
operation_req_access = list(ACCESS_SYNDICATE)
internals_req_access = list(ACCESS_SYNDICATE)
wreckage = /obj/structure/mecha_wreckage/honker/dark
max_equip = 3
/obj/mecha/combat/honker/dark/GrantActions(mob/living/user, human_occupant = 0)
..()
thrusters_action.Grant(user, src)
/obj/mecha/combat/honker/dark/RemoveActions(mob/living/user, human_occupant = 0)
..()
thrusters_action.Remove(user)
/obj/mecha/combat/honker/dark/add_cell(obj/item/stock_parts/cell/C)
/obj/vehicle/sealed/mecha/combat/honker/dark/add_cell(obj/item/stock_parts/cell/C)
if(C)
C.forceMove(src)
cell = C
return
cell = new /obj/item/stock_parts/cell/hyper(src)
/obj/mecha/combat/honker/dark/loaded/Initialize()
/obj/vehicle/sealed/mecha/combat/honker/dark/loaded/Initialize()
. = ..()
var/obj/item/mecha_parts/mecha_equipment/ME = new /obj/item/mecha_parts/mecha_equipment/weapon/honker()
ME.attach(src)
+4 -4
View File
@@ -137,7 +137,7 @@ Class Procs:
/obj/machinery/Initialize()
if(!armor)
armor = list("melee" = 25, "bullet" = 10, "laser" = 10, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 70)
armor = list(MELEE = 25, BULLET = 10, LASER = 10, ENERGY = 0, BOMB = 0, BIO = 0, RAD = 0, FIRE = 50, ACID = 70)
. = ..()
GLOB.machines += src
@@ -371,7 +371,7 @@ Class Procs:
user.DelayNextAction(CLICK_CD_MELEE)
user.do_attack_animation(src, ATTACK_EFFECT_PUNCH)
user.visible_message("<span class='danger'>[user.name] smashes against \the [src.name] with its paws.</span>", null, null, COMBAT_MESSAGE_RANGE)
take_damage(4, BRUTE, "melee", 1)
take_damage(4, BRUTE, MELEE, 1)
/obj/machinery/attack_robot(mob/user)
if(!(interaction_flags_machine & INTERACT_MACHINE_ALLOW_SILICON) && !IsAdminGhost(user))
@@ -597,7 +597,7 @@ Class Procs:
if(prob(85) && (zap_flags & ZAP_MACHINE_EXPLOSIVE))
explosion(src, 1, 2, 4, flame_range = 2, adminlog = FALSE, smoke = FALSE)
else if(zap_flags & ZAP_OBJ_DAMAGE)
take_damage(power/2000, BURN, "energy")
take_damage(power/2000, BURN, ENERGY)
if(prob(40))
emp_act(50)
@@ -621,7 +621,7 @@ Class Procs:
AM.pixel_y = -8 + (round( . / 3)*8)
/obj/machinery/rust_heretic_act()
take_damage(500, BRUTE, "melee", 1)
take_damage(500, BRUTE, MELEE, 1)
/**
* Alerts the AI that a hack is in progress.
+1 -1
View File
@@ -6,7 +6,7 @@
layer = PROJECTILE_HIT_THRESHHOLD_LAYER
plane = FLOOR_PLANE
max_integrity = 200
armor = list("melee" = 50, "bullet" = 20, "laser" = 20, "energy" = 20, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 30)
armor = list(MELEE = 50, BULLET = 20, LASER = 20, ENERGY = 20, BOMB = 0, BIO = 0, RAD = 0, FIRE = 50, ACID = 30)
var/uses = 20
var/cooldown = 0
+1 -1
View File
@@ -10,7 +10,7 @@
var/device_type = null
var/id = null
var/initialized_button = 0
armor = list("melee" = 50, "bullet" = 50, "laser" = 50, "energy" = 50, "bomb" = 10, "bio" = 100, "rad" = 100, "fire" = 90, "acid" = 70)
armor = list(MELEE = 50, BULLET = 50, LASER = 50, ENERGY = 50, BOMB = 10, BIO = 100, RAD = 100, FIRE = 90, ACID = 70)
use_power = IDLE_POWER_USE
idle_power_usage = 2
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF
+2 -2
View File
@@ -15,7 +15,7 @@
resistance_flags = FIRE_PROOF
armor = list("melee" = 50, "bullet" = 20, "laser" = 20, "energy" = 20, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 90, "acid" = 50)
armor = list(MELEE = 50, BULLET = 20, LASER = 20, ENERGY = 20, BOMB = 0, BIO = 0, RAD = 0, FIRE = 90, ACID = 50)
max_integrity = 100
integrity_failure = 0.5
var/list/network = list("ss13")
@@ -273,7 +273,7 @@
return ..()
/obj/machinery/camera/run_obj_armor(damage_amount, damage_type, damage_flag = 0, attack_dir)
if(damage_flag == "melee" && damage_amount < 12 && !(stat & BROKEN))
if(damage_flag == MELEE && damage_amount < 12 && !(stat & BROKEN))
return 0
. = ..()
+3 -3
View File
@@ -8,7 +8,7 @@
active_power_usage = 300
max_integrity = 200
integrity_failure = 0.5
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 40, "acid" = 20)
armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, BIO = 0, RAD = 0, FIRE = 40, ACID = 20)
var/brightness_on = 1
var/icon_keyboard = "generic_key"
var/icon_screen = "generic"
@@ -101,10 +101,10 @@
switch(severity)
if(1)
if(prob(50))
obj_break("energy")
obj_break(ENERGY)
if(2)
if(prob(10))
obj_break("energy")
obj_break(ENERGY)
/obj/machinery/computer/deconstruct(disassembled = TRUE, mob/user)
on_deconstruction()
@@ -6,7 +6,7 @@
name = "gas sensor"
icon = 'icons/obj/stationobjs.dmi'
icon_state = "gsensor1"
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 0)
armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, BIO = 0, RAD = 0, FIRE = 100, ACID = 0)
var/on = TRUE
+1 -1
View File
@@ -114,7 +114,7 @@
anchored = FALSE
max_integrity = 180
proj_pass_rate = 20
armor = list("melee" = 10, "bullet" = 50, "laser" = 50, "energy" = 50, "bomb" = 10, "bio" = 100, "rad" = 100, "fire" = 10, "acid" = 0)
armor = list(MELEE = 10, BULLET = 50, LASER = 50, ENERGY = 50, BOMB = 10, BIO = 100, RAD = 100, FIRE = 10, ACID = 0)
var/deploy_time = 40
var/deploy_message = TRUE
+1 -1
View File
@@ -576,7 +576,7 @@
desc = "An airlock hastily corrupted by blood magic, it is unusually brittle in this state."
normal_integrity = 150
damage_deflection = 5
armor = list("melee" = 0, "bullet" = 0, "laser" = 0,"energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 0, "acid" = 0)
armor = list(MELEE = 0, BULLET = 0, LASER = 0,ENERGY = 0, BOMB = 0, BIO = 0, RAD = 0, FIRE = 0, ACID = 0)
//Pinion airlocks: Clockwork doors that only let servants of Ratvar through.
/obj/machinery/door/airlock/clockwork
+2 -15
View File
@@ -10,7 +10,7 @@
power_channel = ENVIRON
max_integrity = 350
damage_deflection = 10
armor = list("melee" = 30, "bullet" = 30, "laser" = 20, "energy" = 20, "bomb" = 10, "bio" = 100, "rad" = 100, "fire" = 80, "acid" = 70)
armor = list(MELEE = 30, BULLET = 30, LASER = 20, ENERGY = 20, BOMB = 10, BIO = 100, RAD = 100, FIRE = 80, ACID = 70)
CanAtmosPass = ATMOS_PASS_DENSITY
flags_1 = PREVENT_CLICK_UNDER_1|DEFAULT_RICOCHET_1
ricochet_chance_mod = 0.8
@@ -107,19 +107,6 @@
return
bumpopen(M)
return
if(ismecha(AM))
var/obj/mecha/mecha = AM
if(density)
if(mecha.occupant)
if(world.time - mecha.occupant.last_bumped <= 10)
return
mecha.occupant.last_bumped = world.time
if(mecha.occupant && (src.allowed(mecha.occupant) || src.check_access_list(mecha.operation_req_access)))
open()
else
do_animate("deny")
return
return
/obj/machinery/door/Move()
@@ -366,7 +353,7 @@
C.bleed(DOOR_CRUSH_DAMAGE)
else
L.add_splatter_floor(location)
for(var/obj/mecha/M in get_turf(src))
for(var/obj/vehicle/sealed/mecha/M in get_turf(src))
M.take_damage(DOOR_CRUSH_DAMAGE)
/obj/machinery/door/proc/autoclose()
+1 -1
View File
@@ -21,7 +21,7 @@
layer = BELOW_OPEN_DOOR_LAYER
closingLayer = CLOSED_FIREDOOR_LAYER
assemblytype = /obj/structure/firelock_frame
armor = list("melee" = 30, "bullet" = 30, "laser" = 20, "energy" = 20, "bomb" = 10, "bio" = 100, "rad" = 100, "fire" = 95, "acid" = 70)
armor = list(MELEE = 30, BULLET = 30, LASER = 20, ENERGY = 20, BOMB = 10, BIO = 100, RAD = 100, FIRE = 95, ACID = 70)
interaction_flags_machine = INTERACT_MACHINE_WIRES_IF_OPEN | INTERACT_MACHINE_ALLOW_SILICON | INTERACT_MACHINE_OPEN_SILICON | INTERACT_MACHINE_REQUIRES_SILICON | INTERACT_MACHINE_OPEN
air_tight = TRUE
attack_hand_is_action = TRUE
+1 -1
View File
@@ -6,7 +6,7 @@
explosion_block = 3
heat_proof = TRUE
max_integrity = 600
armor = list("melee" = 100, "bullet" = 100, "laser" = 100, "energy" = 100, "bomb" = 100, "bio" = 100, "rad" = 100, "fire" = 100, "acid" = 100)
armor = list(MELEE = 100, BULLET = 100, LASER = 100, ENERGY = 100, BOMB = 100, BIO = 100, RAD = 100, FIRE = 100, ACID = 100)
resistance_flags = INDESTRUCTIBLE | FIRE_PROOF | ACID_PROOF | LAVA_PROOF
damage_deflection = 70
var/password = "Swordfish"
+1 -1
View File
@@ -13,7 +13,7 @@
heat_proof = TRUE
safe = FALSE
max_integrity = 600
armor = list("melee" = 50, "bullet" = 100, "laser" = 100, "energy" = 100, "bomb" = 50, "bio" = 100, "rad" = 100, "fire" = 100, "acid" = 70)
armor = list(MELEE = 50, BULLET = 100, LASER = 100, ENERGY = 100, BOMB = 50, BIO = 100, RAD = 100, FIRE = 100, ACID = 70)
resistance_flags = FIRE_PROOF
damage_deflection = 70
poddoor = TRUE
+2 -2
View File
@@ -5,7 +5,7 @@
icon = 'icons/obj/doors/shutters.dmi'
layer = SHUTTER_LAYER
closingLayer = SHUTTER_LAYER
armor = list("melee" = 20, "bullet" = 20, "laser" = 20, "energy" = 75, "bomb" = 25, "bio" = 100, "rad" = 100, "fire" = 100, "acid" = 70)
armor = list(MELEE = 20, BULLET = 20, LASER = 20, ENERGY = 75, BOMB = 25, BIO = 100, RAD = 100, FIRE = 100, ACID = 70)
damage_deflection = 20
max_integrity = 100
@@ -24,7 +24,7 @@
desc = "These shutters have an armoured frame; it looks like plasteel. These shutters look robust enough to survive explosions."
icon = 'icons/obj/doors/shutters_old.dmi'
icon_state = "closed"
armor = list("melee" = 30, "bullet" = 30, "laser" = 30, "energy" = 75, "bomb" = 30, "bio" = 100, "rad" = 100, "fire" = 100, "acid" = 70)
armor = list(MELEE = 30, BULLET = 30, LASER = 30, ENERGY = 75, BOMB = 30, BIO = 100, RAD = 100, FIRE = 100, ACID = 70)
max_integrity = 300
/obj/machinery/door/poddoor/shutters/old/preopen
+8 -6
View File
@@ -9,7 +9,7 @@
var/base_state = "left"
max_integrity = 150 //If you change this, consider changing ../door/window/brigdoor/ max_integrity at the bottom of this .dm file
integrity_failure = 0
armor = list("melee" = 20, "bullet" = 50, "laser" = 50, "energy" = 50, "bomb" = 10, "bio" = 100, "rad" = 100, "fire" = 70, "acid" = 100)
armor = list(MELEE = 20, BULLET = 50, LASER = 50, ENERGY = 50, BOMB = 10, BIO = 100, RAD = 100, FIRE = 70, ACID = 100)
visible = FALSE
flags_1 = ON_BORDER_1|DEFAULT_RICOCHET_1
pass_flags_self = PASSGLASS
@@ -78,11 +78,13 @@
return
if (!( ismob(AM) ))
if(ismecha(AM))
var/obj/mecha/mecha = AM
if(mecha.occupant && src.allowed(mecha.occupant))
open_and_close()
else
do_animate("deny")
var/obj/vehicle/sealed/mecha/mecha = AM
for(var/O in mecha.occupants)
var/mob/living/occupant = O
if(allowed(occupant))
open_and_close()
return
do_animate("deny")
return
if (!( SSticker ))
return
+1 -1
View File
@@ -20,7 +20,7 @@
plane = ABOVE_WALL_PLANE
max_integrity = 250
integrity_failure = 0.4
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 100, "rad" = 100, "fire" = 90, "acid" = 30)
armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, BIO = 100, RAD = 100, FIRE = 90, ACID = 30)
use_power = IDLE_POWER_USE
idle_power_usage = 2
active_power_usage = 6
+1 -1
View File
@@ -93,7 +93,7 @@
return flash()
/obj/machinery/flasher/run_obj_armor(damage_amount, damage_type, damage_flag = 0, attack_dir)
if(damage_flag == "melee" && damage_amount < 10) //any melee attack below 10 dmg does nothing
if(damage_flag == MELEE && damage_amount < 10) //any melee attack below 10 dmg does nothing
return 0
. = ..()
+1 -1
View File
@@ -40,7 +40,7 @@ Possible to do for anyone motivated enough:
idle_power_usage = 5
active_power_usage = 100
max_integrity = 300
armor = list("melee" = 50, "bullet" = 20, "laser" = 20, "energy" = 20, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 0)
armor = list(MELEE = 50, BULLET = 20, LASER = 20, ENERGY = 20, BOMB = 0, BIO = 0, RAD = 0, FIRE = 50, ACID = 0)
circuit = /obj/item/circuitboard/machine/holopad
/// List of living mobs that use the holopad
var/list/masters
+1 -1
View File
@@ -8,7 +8,7 @@
idle_power_usage = 2
active_power_usage = 4
max_integrity = 300
armor = list("melee" = 50, "bullet" = 30, "laser" = 70, "energy" = 50, "bomb" = 20, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 70)
armor = list(MELEE = 50, BULLET = 30, LASER = 70, ENERGY = 50, BOMB = 20, BIO = 0, RAD = 0, FIRE = 100, ACID = 70)
resistance_flags = FIRE_PROOF
var/id = null
var/on = FALSE
+1 -1
View File
@@ -10,7 +10,7 @@
level = 1 // underfloor
layer = LOW_OBJ_LAYER
max_integrity = 500
armor = list("melee" = 70, "bullet" = 70, "laser" = 70, "energy" = 70, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 80, "acid" = 80)
armor = list(MELEE = 70, BULLET = 70, LASER = 70, ENERGY = 70, BOMB = 0, BIO = 0, RAD = 0, FIRE = 80, ACID = 80)
var/open = FALSE // true if cover is open
var/locked = TRUE // true if controls are locked
@@ -28,7 +28,7 @@
power_channel = EQUIP //drains power from the EQUIPMENT channel
max_integrity = 160 //the turret's health
integrity_failure = 0.5
armor = list("melee" = 50, "bullet" = 30, "laser" = 30, "energy" = 30, "bomb" = 30, "bio" = 0, "rad" = 0, "fire" = 90, "acid" = 90)
armor = list(MELEE = 50, BULLET = 30, LASER = 30, ENERGY = 30, BOMB = 30, BIO = 0, RAD = 0, FIRE = 90, ACID = 90)
/// Base turret icon state
base_icon_state = "standard"
/// Scan range of the turret for locating targets
@@ -478,10 +478,12 @@
for(var/A in GLOB.mechas_list)
if((get_dist(A, base) < scan_range) && can_see(base, A, scan_range))
var/obj/mecha/Mech = A
if(Mech.occupant && !in_faction(Mech.occupant)) //If there is a user and they're not in our faction
if(assess_perp(Mech.occupant) >= 4)
targets += Mech
var/obj/vehicle/sealed/mecha/mech = A
for(var/O in mech.occupants)
var/mob/living/occupant = O
if(!in_faction(occupant)) //If there is a user and they're not in our faction
if(assess_perp(occupant) >= 4)
targets += mech
if((turret_flags & TURRET_FLAG_SHOOT_ANOMALOUS) && GLOB.blobs.len && (mode == TURRET_LETHAL))
for(var/obj/structure/blob/B in view(scan_range, base))
@@ -774,7 +776,7 @@
/obj/machinery/porta_turret/syndicate/energy/pirate
max_integrity = 260
integrity_failure = 0.08
armor = list("melee" = 50, "bullet" = 30, "laser" = 30, "energy" = 30, "bomb" = 50, "bio" = 0, "rad" = 0, "fire" = 90, "acid" = 90)
armor = list(MELEE = 50, BULLET = 30, LASER = 30, ENERGY = 30, BOMB = 50, BIO = 0, RAD = 0, FIRE = 90, ACID = 90)
/obj/machinery/porta_turret/syndicate/energy/raven
stun_projectile = /obj/item/projectile/beam/laser
@@ -794,7 +796,7 @@
lethal_projectile = /obj/item/projectile/bullet/p50/penetrator/shuttle
lethal_projectile_sound = 'sound/weapons/gunshot_smg.ogg'
stun_projectile_sound = 'sound/weapons/gunshot_smg.ogg'
armor = list("melee" = 50, "bullet" = 30, "laser" = 30, "energy" = 30, "bomb" = 80, "bio" = 0, "rad" = 0, "fire" = 90, "acid" = 90)
armor = list(MELEE = 50, BULLET = 30, LASER = 30, ENERGY = 30, BOMB = 80, BIO = 0, RAD = 0, FIRE = 90, ACID = 90)
/obj/machinery/porta_turret/syndicate/pod/toolbox
max_integrity = 100
+1 -1
View File
@@ -55,7 +55,7 @@ GLOBAL_LIST_EMPTY(allConsoles)
var/emergency //If an emergency has been called by this device. Acts as both a cooldown and lets the responder know where it the emergency was triggered from
var/receive_ore_updates = FALSE //If ore redemption machines will send an update when it receives new ores.
max_integrity = 300
armor = list("melee" = 70, "bullet" = 30, "laser" = 30, "energy" = 30, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 90, "acid" = 90)
armor = list(MELEE = 70, BULLET = 30, LASER = 30, ENERGY = 30, BOMB = 0, BIO = 0, RAD = 0, FIRE = 90, ACID = 90)
/obj/machinery/requests_console/power_change()
..()
+1 -1
View File
@@ -28,7 +28,7 @@
if(severity >= 70)
qdel(src)
else
take_damage(severity/1.3, BRUTE, "energy", 0)
take_damage(severity/1.3, BRUTE, ENERGY, 0)
/obj/structure/emergency_shield/play_attack_sound(damage, damage_type = BRUTE, damage_flag = 0)
switch(damage_type)
@@ -22,7 +22,7 @@
density = TRUE
max_integrity = 400
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 100, "bomb" = 0, "bio" = 100, "rad" = 100, "fire" = 100, "acid" = 30)
armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 100, BOMB = 0, BIO = 100, RAD = 100, FIRE = 100, ACID = 30)
layer = OBJ_LAYER
showpipe = TRUE
+1 -1
View File
@@ -12,7 +12,7 @@
name = "space heater"
desc = "Made by Space Amish using traditional space techniques, this heater/cooler is guaranteed not to set the station on fire. Warranty void if used in engines."
max_integrity = 250
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 100, "rad" = 100, "fire" = 80, "acid" = 10)
armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, BIO = 100, RAD = 100, FIRE = 80, ACID = 10)
circuit = /obj/item/circuitboard/machine/space_heater
var/obj/item/stock_parts/cell/cell
var/on = FALSE
+142
View File
@@ -0,0 +1,142 @@
#define STASIS_TOGGLE_COOLDOWN 50
/obj/machinery/stasis
name = "Lifeform Stasis Unit"
desc = "A not so comfortable looking bed with some nozzles at the top and bottom. It will keep someone in stasis."
icon = 'icons/obj/machines/stasis.dmi'
icon_state = "stasis"
density = FALSE
can_buckle = TRUE
buckle_lying = 90
circuit = /obj/item/circuitboard/machine/stasis
idle_power_usage = 40
active_power_usage = 340
fair_market_price = 10
payment_department = ACCOUNT_MED
var/stasis_enabled = TRUE
var/last_stasis_sound = FALSE
var/stasis_can_toggle = 0
var/mattress_state = "stasis_on"
var/obj/effect/overlay/vis/mattress_on
/obj/machinery/stasis/examine(mob/user)
..()
var/turn_on_or_off = stasis_enabled ? "turn off" : "turn on"
to_chat(user, "<span class='notice'>Alt-click to [turn_on_or_off] the machine.</span>")
/obj/machinery/stasis/proc/play_power_sound()
var/_running = stasis_running()
if(last_stasis_sound != _running)
var/sound_freq = rand(5120, 8800)
if(_running)
playsound(src, 'sound/machines/synth_yes.ogg', 50, TRUE, frequency = sound_freq)
else
playsound(src, 'sound/machines/synth_no.ogg', 50, TRUE, frequency = sound_freq)
last_stasis_sound = _running
/obj/machinery/stasis/AltClick(mob/user)
if(world.time >= stasis_can_toggle && user.canUseTopic(src))
stasis_enabled = !stasis_enabled
stasis_can_toggle = world.time + STASIS_TOGGLE_COOLDOWN
playsound(src, 'sound/machines/click.ogg', 60, TRUE)
play_power_sound()
update_icon()
/obj/machinery/stasis/Exited(atom/movable/AM, atom/newloc)
if(AM == occupant)
var/mob/living/L = AM
if(IS_IN_STASIS(L))
thaw_them(L)
. = ..()
/obj/machinery/stasis/proc/stasis_running()
return stasis_enabled && is_operational()
/obj/machinery/stasis/update_icon()
. = ..()
var/_running = stasis_running()
var/list/overlays_to_remove = managed_vis_overlays
if(mattress_state)
if(!mattress_on || !managed_vis_overlays)
mattress_on = SSvis_overlays.add_vis_overlay(src, icon, mattress_state, layer, plane, dir, alpha = 0, unique = TRUE)
if(mattress_on.alpha ? !_running : _running) //check the inverse of _running compared to truthy alpha, to see if they differ
var/new_alpha = _running ? 255 : 0
var/easing_direction = _running ? EASE_OUT : EASE_IN
animate(mattress_on, alpha = new_alpha, time = 50, easing = CUBIC_EASING|easing_direction)
overlays_to_remove = managed_vis_overlays - mattress_on
SSvis_overlays.remove_vis_overlay(src, overlays_to_remove)
if(occupant)
SSvis_overlays.add_vis_overlay(src, 'icons/obj/machines/stasis.dmi', "tubes", LYING_MOB_LAYER + 0.1, plane, dir) //using vis_overlays instead of normal overlays for mouse_opacity here
if(stat & BROKEN)
icon_state = "stasis_broken"
return
if(panel_open || stat & MAINT)
icon_state = "stasis_maintenance"
return
icon_state = "stasis"
/obj/machinery/stasis/obj_break(damage_flag)
. = ..()
play_power_sound()
update_icon()
/obj/machinery/stasis/power_change()
. = ..()
play_power_sound()
update_icon()
/obj/machinery/stasis/proc/chill_out(mob/living/target)
if(target != occupant)
return
var/freq = rand(24750, 26550)
playsound(src, 'sound/effects/spray.ogg', 5, TRUE, 2, frequency = freq)
target.apply_status_effect(/datum/status_effect/grouped/stasis, STASIS_MACHINE_EFFECT)
target.ExtinguishMob()
use_power = ACTIVE_POWER_USE
/obj/machinery/stasis/proc/thaw_them(mob/living/target)
target.remove_status_effect(/datum/status_effect/grouped/stasis, STASIS_MACHINE_EFFECT)
if(target == occupant)
use_power = IDLE_POWER_USE
/obj/machinery/stasis/post_buckle_mob(mob/living/L)
if(!can_be_occupant(L))
return
occupant = L
if(stasis_running() && check_nap_violations())
chill_out(L)
update_icon()
/obj/machinery/stasis/post_unbuckle_mob(mob/living/L)
thaw_them(L)
if(L == occupant)
occupant = null
update_icon()
/obj/machinery/stasis/process()
if( !( occupant && isliving(occupant) && check_nap_violations() ) )
use_power = IDLE_POWER_USE
return
var/mob/living/L_occupant = occupant
if(stasis_running())
if(!IS_IN_STASIS(L_occupant))
chill_out(L_occupant)
else if(IS_IN_STASIS(L_occupant))
thaw_them(L_occupant)
/obj/machinery/stasis/screwdriver_act(mob/living/user, obj/item/I)
. = default_deconstruction_screwdriver(user, "stasis_maintenance", "stasis", I)
update_icon()
/obj/machinery/stasis/crowbar_act(mob/living/user, obj/item/I)
return default_deconstruction_crowbar(I)
/obj/machinery/stasis/nap_violation(mob/violator)
unbuckle_mob(violator, TRUE)
#undef STASIS_TOGGLE_COOLDOWN
@@ -14,7 +14,7 @@
use_power = IDLE_POWER_USE
idle_power_usage = 10
active_power_usage = 100
armor = list("melee" = 25, "bullet" = 10, "laser" = 10, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 70)
armor = list(MELEE = 25, BULLET = 10, LASER = 10, ENERGY = 0, BOMB = 0, BIO = 0, RAD = 0, FIRE = 50, ACID = 70)
var/obj/item/stored
/obj/machinery/blackbox_recorder/Initialize()
-11
View File
@@ -1,11 +0,0 @@
/obj/mecha/combat
force = 30
internal_damage_threshold = 50
armor = list("melee" = 30, "bullet" = 30, "laser" = 15, "energy" = 20, "bomb" = 20, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 100)
mouse_pointer = 'icons/mecha/mecha_mouse.dmi'
/obj/mecha/combat/proc/max_ammo() //Max the ammo stored for Nuke Ops mechs, or anyone else that calls this
for(var/obj/item/I in equipment)
if(istype(I, /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/))
var/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/gun = I
gun.projectiles_cache = gun.projectiles_cache_max
-21
View File
@@ -1,21 +0,0 @@
/obj/mecha/combat/durand
desc = "An aging combat exosuit utilized by the Nanotrasen corporation. Originally developed to combat hostile alien lifeforms."
name = "\improper Durand"
icon_state = "durand"
step_in = 4
dir_in = 1 //Facing North.
max_integrity = 400
deflect_chance = 20
armor = list("melee" = 40, "bullet" = 35, "laser" = 15, "energy" = 10, "bomb" = 20, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 100)
max_temperature = 30000
infra_luminosity = 8
force = 40
wreckage = /obj/structure/mecha_wreckage/durand
/obj/mecha/combat/durand/GrantActions(mob/living/user, human_occupant = 0)
..()
defense_action.Grant(user, src)
/obj/mecha/combat/durand/RemoveActions(mob/living/user, human_occupant = 0)
..()
defense_action.Remove(user)
-21
View File
@@ -1,21 +0,0 @@
/obj/mecha/combat/five_stars
desc = "A state of the art tank deployed by the Spinward Stellar Coalition National Guard."
name = "\improper Tank"
icon = 'icons/mecha/mecha_96x96.dmi'
icon_state = "five_stars"
armor = list("melee" = 100, "bullet" = 50, "laser" = 35, "energy" = 35, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 100)
step_in = 4
dir_in = 1 //Facing North.
max_integrity = 800
pixel_x = -32
pixel_y = -32
/obj/mecha/combat/five_stars/Initialize()
. = ..()
var/obj/item/mecha_parts/mecha_equipment/ME = new /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/spacecops(src)
ME.attach(src)
ME = new /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/lmg(src)
ME.attach(src)
ME = new /obj/item/mecha_parts/mecha_equipment/tesla_energy_relay(src)
ME.attach(src)
max_ammo()
-68
View File
@@ -1,68 +0,0 @@
/obj/mecha/combat/gygax
desc = "A lightweight, security exosuit. Popular among private and corporate security."
name = "\improper Gygax"
icon_state = "gygax"
step_in = 3
dir_in = 1 //Facing North.
max_integrity = 250
deflect_chance = 5
force = 20
armor = list("melee" = 25, "bullet" = 20, "laser" = 30, "energy" = 15, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 100)
max_temperature = 25000
infra_luminosity = 6
wreckage = /obj/structure/mecha_wreckage/gygax
internal_damage_threshold = 35
max_equip = 3
step_energy_drain = 3
leg_overload_coeff = 300
/obj/mecha/combat/gygax/dark
desc = "A lightweight exosuit, painted in a dark scheme. This model appears to have some modifications."
name = "\improper Dark Gygax"
icon_state = "darkgygax"
max_integrity = 300
deflect_chance = 15
force = 25
armor = list("melee" = 40, "bullet" = 40, "laser" = 50, "energy" = 35, "bomb" = 20, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 100)
max_temperature = 35000
leg_overload_coeff = 100
operation_req_access = list(ACCESS_SYNDICATE)
internals_req_access = list(ACCESS_SYNDICATE)
wreckage = /obj/structure/mecha_wreckage/gygax/dark
max_equip = 4
/obj/mecha/combat/gygax/dark/loaded/Initialize()
. = ..()
var/obj/item/mecha_parts/mecha_equipment/ME = new /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/carbine
ME.attach(src)
ME = new /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/launcher/flashbang
ME.attach(src)
ME = new /obj/item/mecha_parts/mecha_equipment/teleporter
ME.attach(src)
ME = new /obj/item/mecha_parts/mecha_equipment/tesla_energy_relay
ME.attach(src)
max_ammo()
/obj/mecha/combat/gygax/dark/add_cell(obj/item/stock_parts/cell/C=null)
if(C)
C.forceMove(src)
cell = C
return
cell = new /obj/item/stock_parts/cell/hyper(src)
/obj/mecha/combat/gygax/GrantActions(mob/living/user, human_occupant = 0)
..()
overload_action.Grant(user, src)
/obj/mecha/combat/gygax/dark/GrantActions(mob/living/user, human_occupant = 0)
..()
thrusters_action.Grant(user, src)
/obj/mecha/combat/gygax/RemoveActions(mob/living/user, human_occupant = 0)
..()
overload_action.Remove(user)
/obj/mecha/combat/gygax/dark/RemoveActions(mob/living/user, human_occupant = 0)
..()
thrusters_action.Remove(user)
-158
View File
@@ -1,158 +0,0 @@
/obj/mecha/combat/honker
desc = "Produced by \"Tyranny of Honk, INC\", this exosuit is designed as heavy clown-support. Used to spread the fun and joy of life. HONK!"
name = "\improper H.O.N.K"
icon_state = "honker"
step_in = 3
max_integrity = 140
deflect_chance = 60
internal_damage_threshold = 60
armor = list("melee" = -20, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 100)
max_temperature = 25000
infra_luminosity = 5
operation_req_access = list(ACCESS_THEATRE)
internals_req_access = list(ACCESS_THEATRE, ACCESS_ROBOTICS)
wreckage = /obj/structure/mecha_wreckage/honker
add_req_access = 0
max_equip = 3
var/squeak = 0
/obj/mecha/combat/honker/get_stats_part()
var/integrity = obj_integrity/max_integrity*100
var/cell_charge = get_charge()
var/datum/gas_mixture/int_tank_air = internal_tank.return_air()
var/tank_pressure = internal_tank ? round(int_tank_air.return_pressure(),0.01) : "None"
var/tank_temperature = internal_tank ? int_tank_air.return_temperature() : "Unknown"
var/cabin_pressure = round(return_pressure(),0.01)
var/output = {"[report_internal_damage()]
[integrity<30?"<font color='red'><b>DAMAGE LEVEL CRITICAL</b></font><br>":null]
[internal_damage&MECHA_INT_TEMP_CONTROL?"<font color='red'><b>CLOWN SUPPORT SYSTEM MALFUNCTION</b></font><br>":null]
[internal_damage&MECHA_INT_TANK_BREACH?"<font color='red'><b>GAS TANK HONK</b></font><br>":null]
[internal_damage&MECHA_INT_CONTROL_LOST?"<font color='red'><b>HONK-A-DOODLE</b></font> - <a href='?src=[REF(src)];repair_int_control_lost=1'>Recalibrate</a><br>":null]
<b>IntegriHONK: </b> [integrity]%<br>
<b>PowerHONK charge: </b>[isnull(cell_charge)?"No powercell installed":"[cell.percent()]%"]<br>
<b>Air source: </b>[use_internal_tank?"Internal Airtank":"Environment"]<br>
<b>AirHONK pressure: </b>[tank_pressure]kPa<br>
<b>AirHONK temperature: </b>[tank_temperature]&deg;K|[tank_temperature - T0C]&deg;C<br>
<b>HONK pressure: </b>[cabin_pressure>WARNING_HIGH_PRESSURE ? "<font color='red'>[cabin_pressure]</font>": cabin_pressure]kPa<br>
<b>HONK temperature: </b> [return_temperature()]&deg;K|[return_temperature() - T0C]&deg;C<br>
<b>Lights: </b>[lights?"on":"off"]<br>
[dna_lock?"<b>DNA-locked:</b><br> <span style='font-size:10px;letter-spacing:-1px;'>[dna_lock]</span> \[<a href='?src=[REF(src)];reset_dna=1'>Reset</a>\]<br>":null]
"}
return output
/obj/mecha/combat/honker/get_stats_html()
var/output = {"<html>
<head>
<meta http-equiv='Content-Type' content='text/html; charset=UTF-8'>
<title>[src.name] data</title>
<style>
body {color: #00ff00; background: #32CD32; font-family:"Courier",monospace; font-size: 12px;}
hr {border: 1px solid #0f0; color: #fff; background-color: #000;}
a {padding:2px 5px;;color:#0f0;}
.wr {margin-bottom: 5px;}
.header {cursor:pointer;}
.open, .closed {background: #32CD32; color:#000; padding:1px 2px;}
.links a {margin-bottom: 2px;padding-top:3px;}
.visible {display: block;}
.hidden {display: none;}
</style>
<script language='javascript' type='text/javascript'>
[js_byjax]
[js_dropdowns]
function SSticker() {
setInterval(function(){
window.location='byond://?src=[REF(src)]&update_content=1';
document.body.style.color = get_rand_color_string();
document.body.style.background = get_rand_color_string();
}, 1000);
}
function get_rand_color_string() {
var color = new Array;
for(var i=0;i<3;i++){
color.push(Math.floor(Math.random()*255));
}
return "rgb("+color.toString()+")";
}
window.onload = function() {
dropdowns();
SSticker();
}
</script>
</head>
<body>
<div id='content'>
[src.get_stats_part()]
</div>
<div id='eq_list'>
[src.get_equipment_list()]
</div>
<hr>
<div id='commands'>
[src.get_commands()]
</div>
</body>
</html>
"}
return output
/obj/mecha/combat/honker/get_commands()
var/output = {"<div class='wr'>
<div class='header'>Sounds of HONK:</div>
<div class='links'>
<a href='?src=[REF(src)];play_sound=sadtrombone'>Sad Trombone</a>
<a href='?src=[REF(src)];play_sound=bikehorn'>Bike Horn</a>
<a href='?src=[REF(src)];play_sound=airhorn2'>Air Horn</a>
<a href='?src=[REF(src)];play_sound=carhorn'>Car Horn</a>
<a href='?src=[REF(src)];play_sound=party_horn'>Party Horn</a>
</div>
</div>
"}
output += ..()
return output
/obj/mecha/combat/honker/get_equipment_list()
if(!equipment.len)
return
var/output = "<b>Honk-ON-Systems:</b><div style=\"margin-left: 15px;\">"
for(var/obj/item/mecha_parts/mecha_equipment/MT in equipment)
output += "<div id='[REF(MT)]'>[MT.get_equip_info()]</div>"
output += "</div>"
return output
/obj/mecha/combat/honker/mechstep(direction)
var/result = step(src,direction)
if(result)
if(!squeak)
playsound(src, "clownstep", 70, 1)
squeak = 1
else
squeak = 0
return result
/obj/mecha/combat/honker/Topic(href, href_list)
..()
if (href_list["play_sound"])
switch(href_list["play_sound"])
if("sadtrombone")
playsound(src, 'sound/misc/sadtrombone.ogg', 50)
if("bikehorn")
playsound(src, 'sound/items/bikehorn.ogg', 50)
if("airhorn2")
playsound(src, 'sound/items/airhorn2.ogg', 40) //soundfile has higher than average volume
if("carhorn")
playsound(src, 'sound/items/carhorn.ogg', 80) //soundfile has lower than average volume
if("party_horn")
playsound(src, 'sound/items/party_horn.ogg', 50)
return
/proc/rand_hex_color()
var/list/colors = list("0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f")
var/color=""
for (var/i=0;i<6;i++)
color = color+pick(colors)
return color
-96
View File
@@ -1,96 +0,0 @@
/obj/mecha/combat/marauder
desc = "Heavy-duty, combat exosuit, developed after the Durand model. Rarely found among civilian populations."
name = "\improper Marauder"
icon_state = "marauder"
step_in = 5
max_integrity = 500
deflect_chance = 25
armor = list("melee" = 50, "bullet" = 55, "laser" = 40, "energy" = 30, "bomb" = 30, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 100)
max_temperature = 60000
resistance_flags = LAVA_PROOF | FIRE_PROOF | ACID_PROOF
infra_luminosity = 3
operation_req_access = list(ACCESS_CENT_SPECOPS)
internals_req_access = list(ACCESS_CENT_SPECOPS, ACCESS_ROBOTICS)
wreckage = /obj/structure/mecha_wreckage/marauder
add_req_access = 0
internal_damage_threshold = 25
force = 45
max_equip = 4
bumpsmash = 1
/obj/mecha/combat/marauder/GrantActions(mob/living/user, human_occupant = 0)
..()
smoke_action.Grant(user, src)
thrusters_action.Grant(user, src)
zoom_action.Grant(user, src)
/obj/mecha/combat/marauder/RemoveActions(mob/living/user, human_occupant = 0)
..()
smoke_action.Remove(user)
thrusters_action.Remove(user)
zoom_action.Remove(user)
/obj/mecha/combat/marauder/loaded/Initialize()
. = ..()
var/obj/item/mecha_parts/mecha_equipment/ME = new /obj/item/mecha_parts/mecha_equipment/weapon/energy/pulse(src)
ME.attach(src)
ME = new /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack(src)
ME.attach(src)
ME = new /obj/item/mecha_parts/mecha_equipment/tesla_energy_relay(src)
ME.attach(src)
ME = new /obj/item/mecha_parts/mecha_equipment/antiproj_armor_booster(src)
ME.attach(src)
max_ammo()
/obj/mecha/combat/marauder/seraph
desc = "Heavy-duty, command-type exosuit. This is a custom model, utilized only by high-ranking military personnel."
name = "\improper Seraph"
icon_state = "seraph"
operation_req_access = list(ACCESS_CENT_SPECOPS)
internals_req_access = list(ACCESS_CENT_SPECOPS, ACCESS_ROBOTICS)
step_in = 3
max_integrity = 550
wreckage = /obj/structure/mecha_wreckage/seraph
internal_damage_threshold = 20
force = 55
max_equip = 5
/obj/mecha/combat/marauder/seraph/Initialize()
. = ..()
var/obj/item/mecha_parts/mecha_equipment/ME
ME = new /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/scattershot(src)
ME.attach(src)
ME = new /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack(src)
ME.attach(src)
ME = new /obj/item/mecha_parts/mecha_equipment/teleporter(src)
ME.attach(src)
ME = new /obj/item/mecha_parts/mecha_equipment/tesla_energy_relay(src)
ME.attach(src)
ME = new /obj/item/mecha_parts/mecha_equipment/antiproj_armor_booster(src)
ME.attach(src)
max_ammo()
/obj/mecha/combat/marauder/mauler
desc = "Heavy-duty, combat exosuit, developed off of the existing Marauder model."
name = "\improper Mauler"
icon_state = "mauler"
operation_req_access = list(ACCESS_SYNDICATE)
internals_req_access = list(ACCESS_SYNDICATE)
wreckage = /obj/structure/mecha_wreckage/mauler
max_equip = 5
/obj/mecha/combat/marauder/mauler/loaded/Initialize()
. = ..()
var/obj/item/mecha_parts/mecha_equipment/ME = new /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/lmg(src)
ME.attach(src)
ME = new /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/scattershot(src)
ME.attach(src)
ME = new /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack(src)
ME.attach(src)
ME = new /obj/item/mecha_parts/mecha_equipment/tesla_energy_relay(src)
ME.attach(src)
ME = new /obj/item/mecha_parts/mecha_equipment/antiproj_armor_booster(src)
ME.attach(src)
max_ammo()
-103
View File
@@ -1,103 +0,0 @@
/obj/mecha/combat/neovgre
name = "Neovgre, the Anima Bulwark"
desc = "Nezbere's most powerful creation, a mighty war machine of unmatched power said to have ended wars in a single night."
icon = 'icons/mecha/neovgre.dmi'
icon_state = "neovgre"
max_integrity = 500 //This is THE ratvarian superweaon, its deployment is an investment
armor = list("melee" = 50, "bullet" = 40, "laser" = 25, "energy" = 25, "bomb" = 50, "bio" = 100, "rad" = 100, "fire" = 100, "acid" = 100) //Its similar to the clockwork armour albeit with a few buffs becuase RATVARIAN SUPERWEAPON!!
force = 50 //SMASHY SMASHY!!
internal_damage_threshold = 0
step_in = 3
pixel_x = -16
layer = ABOVE_MOB_LAYER
breach_time = 100 //ten seconds till all goes to shit
recharge_rate = 100
internals_req_access = list()
add_req_access = 0
wreckage = /obj/structure/mecha_wreckage/durand/neovgre
stepsound = 'sound/mecha/neostep2.ogg'
turnsound = 'sound/mecha/powerloader_step.ogg'
/obj/mecha/combat/neovgre/GrantActions(mob/living/user, human_occupant = 0) //No Eject action for you sonny jim, your life for Ratvar!
internals_action.Grant(user, src)
cycle_action.Grant(user, src)
lights_action.Grant(user, src)
stats_action.Grant(user, src)
strafing_action.Grant(user, src)
/obj/mecha/combat/neovgre/RemoveActions(mob/living/user, human_occupant = 0)
internals_action.Remove(user)
cycle_action.Remove(user)
lights_action.Remove(user)
stats_action.Remove(user)
strafing_action.Remove(user)
/obj/mecha/combat/neovgre/MouseDrop_T(mob/M, mob/user)
if(!is_servant_of_ratvar(user))
to_chat(user, "<span class='neovgre'>BEGONE HEATHEN!</span>")
return
else
..()
/obj/mecha/combat/neovgre/moved_inside(mob/living/carbon/human/H)
var/list/Itemlist = H.get_contents()
for(var/obj/item/clockwork/slab/W in Itemlist)
to_chat(H, "<span class='brass'>You safely store [W] inside [src].</span>")
qdel(W)
. = ..()
/obj/mecha/combat/neovgre/obj_destruction()
for(var/mob/M in src)
to_chat(M, "<span class='brass'>You are consumed by the fires raging within Neovgre...</span>")
M.dust()
playsound(src, 'sound/effects/neovgre_exploding.ogg', 100, 0)
src.visible_message("<span class = 'userdanger'>The reactor has gone critical, its going to blow!</span>")
addtimer(CALLBACK(src,.proc/go_critical),breach_time)
/obj/mecha/combat/neovgre/proc/go_critical()
explosion(get_turf(loc), 3, 5, 10, 20, 30)
Destroy(src)
/obj/mecha/combat/neovgre/container_resist(mob/living/user)
to_chat(user, "<span class='brass'>Neovgre requires a lifetime commitment friend, no backing out now!</span>")
return
/obj/mecha/combat/neovgre/process()
..()
if(!obj_integrity) //Integrity is zero but we would heal out of that state if we went into this before it recognises it being zero
return
if(GLOB.ratvar_awakens) // At this point only timley intervention by lord singulo could hope to stop the superweapon
cell.charge = INFINITY
max_integrity = INFINITY
obj_integrity = max_integrity
else
if(cell.charge < cell.maxcharge)
for(var/obj/effect/clockwork/sigil/transmission/T in range(SIGIL_ACCESS_RANGE, src))
var/delta = min(recharge_rate, cell.maxcharge - cell.charge)
if (get_clockwork_power() >= delta)
cell.charge += delta
adjust_clockwork_power(-delta)
if(obj_integrity < max_integrity && istype(loc, /turf/open/floor/clockwork))
obj_integrity += min(max_integrity - obj_integrity, max_integrity / 200)
/obj/mecha/combat/neovgre/Initialize()
.=..()
GLOB.neovgre_exists ++
var/obj/item/mecha_parts/mecha_equipment/weapon/energy/laser/heavy/neovgre/N = new
N.attach(src)
/obj/structure/mecha_wreckage/durand/neovgre
name = "\improper Neovgre wreckage?"
desc = "On closer inspection this looks like the wreck of a durand with some spraypainted cardboard duct taped to it!"
/obj/item/mecha_parts/mecha_equipment/weapon/energy/laser/heavy/neovgre
equip_cooldown = 8 //Rapid fire heavy laser cannon, simple yet elegant
energy_drain = 30
name = "Arbiter Laser Cannon"
desc = "Please re-attach this to neovgre and stop asking questions about why it looks like a normal Nanotrasen issue Solaris laser cannon - Nezbere"
fire_sound = 'sound/weapons/neovgre_laser.ogg'
/obj/item/mecha_parts/mecha_equipment/weapon/energy/laser/heavy/neovgre/can_attach(obj/mecha/combat/neovgre/M)
if(istype(M))
return 1
return 0
-29
View File
@@ -1,29 +0,0 @@
/obj/mecha/combat/phazon
desc = "This is a Phazon exosuit. The pinnacle of scientific research and pride of Nanotrasen, it uses cutting edge bluespace technology and expensive materials."
name = "\improper Phazon"
icon_state = "phazon"
step_in = 2
dir_in = 2 //Facing South.
step_energy_drain = 3
max_integrity = 200
deflect_chance = 30
armor = list("melee" = 30, "bullet" = 30, "laser" = 30, "energy" = 30, "bomb" = 30, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 100)
max_temperature = 25000
infra_luminosity = 3
wreckage = /obj/structure/mecha_wreckage/phazon
add_req_access = 1
internal_damage_threshold = 25
force = 15
max_equip = 3
phase_state = "phazon-phase"
/obj/mecha/combat/phazon/GrantActions(mob/living/user, human_occupant = 0)
..()
switch_damtype_action.Grant(user, src)
phasing_action.Grant(user, src)
/obj/mecha/combat/phazon/RemoveActions(mob/living/user, human_occupant = 0)
..()
switch_damtype_action.Remove(user)
phasing_action.Remove(user)
-28
View File
@@ -1,28 +0,0 @@
/obj/mecha/combat/reticence
desc = "A silent, fast, and nigh-invisible miming exosuit. Popular among mimes and mime assassins."
name = "\improper reticence"
icon_state = "reticence"
step_in = 2
dir_in = 1 //Facing North.
max_integrity = 100
deflect_chance = 3
armor = list("melee" = 25, "bullet" = 20, "laser" = 30, "energy" = 15, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 100)
max_temperature = 15000
wreckage = /obj/structure/mecha_wreckage/reticence
operation_req_access = list(ACCESS_THEATRE)
internals_req_access = list(ACCESS_THEATRE, ACCESS_ROBOTICS)
add_req_access = 0
internal_damage_threshold = 25
max_equip = 2
step_energy_drain = 3
color = "#87878715"
stepsound = null
turnsound = null
opacity = 0
/obj/mecha/combat/reticence/loaded/Initialize()
. = ..()
var/obj/item/mecha_parts/mecha_equipment/ME = new /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/silenced
ME.attach(src)
ME = new /obj/item/mecha_parts/mecha_equipment/rcd //HAHA IT MAKES WALLS GET IT
ME.attach(src)
@@ -1,171 +0,0 @@
//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.
/obj/item/mecha_parts/mecha_equipment
name = "mecha equipment"
icon = 'icons/mecha/mecha_equipment.dmi'
icon_state = "mecha_equip"
force = 5
max_integrity = 300
var/equip_cooldown = 0 // cooldown after use
var/equip_ready = 1 //whether the equipment is ready for use. (or deactivated/activated for static stuff)
var/energy_drain = 0
var/obj/mecha/chassis = null
/// Bitflag. Determines the range of the equipment.
var/range = MELEE
/// Bitflag. Used by exosuit fabricator to assign sub-categories based on which exosuits can equip this.
var/mech_flags = NONE
var/salvageable = 1
//var/detachable = TRUE // Set to FALSE for built-in equipment that cannot be removed
var/selectable = 1 // Set to 0 for passive equipment such as mining scanner or armor plates
var/harmful = FALSE //Controls if equipment can be used to attack by a pacifist.
//var/destroy_sound = 'sound/mecha/critdestr.ogg'
/obj/item/mecha_parts/mecha_equipment/proc/update_chassis_page()
if(chassis)
send_byjax(chassis.occupant,"exosuit.browser","eq_list",chassis.get_equipment_list())
send_byjax(chassis.occupant,"exosuit.browser","equipment_menu",chassis.get_equipment_menu(),"dropdowns")
return 1
return
/obj/item/mecha_parts/mecha_equipment/proc/update_equip_info()
if(chassis)
send_byjax(chassis.occupant,"exosuit.browser","[REF(src)]",get_equip_info())
return 1
return
/obj/item/mecha_parts/mecha_equipment/Destroy()
if(chassis)
chassis.equipment -= src
if(chassis.selected == src)
chassis.selected = null
src.update_chassis_page()
//log_message("[src] is destroyed.", LOG_MECHA)
chassis.log_append_to_last("[src] is destroyed.",1)
if(chassis.occupant)
chassis.occupant_message("<span class='danger'>[src] is destroyed!</span>")
SEND_SOUND(chassis.occupant, sound(istype(src, /obj/item/mecha_parts/mecha_equipment/weapon) ? 'sound/mecha/weapdestr.ogg' : 'sound/mecha/critdestr.ogg', volume=50))
//chassis.occupant.playsound_local(chassis, destroy_sound, 50)
//if(!detachable) //If we're a built-in nondetachable equipment, let's lock up the slot that we were in.
// chassis.max_equip--
chassis = null
return ..()
/obj/item/mecha_parts/mecha_equipment/proc/critfail()
if(chassis)
mecha_log_message("Critical failure", color="red")
/obj/item/mecha_parts/mecha_equipment/proc/get_equip_info()
if(!chassis)
return
var/txt = "<span style=\"color:[equip_ready?"#0f0":"#f00"];\">*</span>&nbsp;"
if(chassis.selected == src)
txt += "<b>[src.name]</b>"
else if(selectable)
txt += "<a href='?src=[REF(chassis)];select_equip=[REF(src)]'>[src.name]</a>"
else
txt += "[src.name]"
return txt
/obj/item/mecha_parts/mecha_equipment/proc/is_ranged()//add a distance restricted equipment. Why not?
return range&RANGED //rename to MECHA_RANGE and MECHA_MELEE
/obj/item/mecha_parts/mecha_equipment/proc/is_melee()
return range&MELEE
/obj/item/mecha_parts/mecha_equipment/proc/action_checks(atom/target)
if(!target)
return 0
if(!chassis)
return 0
if(!equip_ready)
return 0
if(energy_drain && !chassis.has_charge(energy_drain))
return 0
if(crit_fail)
return 0
if(chassis.equipment_disabled)
to_chat(chassis.occupant, "<span=warn>Error -- Equipment control unit is unresponsive.</span>")
return 0
return 1
/obj/item/mecha_parts/mecha_equipment/proc/action(atom/target)
return 0
/obj/item/mecha_parts/mecha_equipment/proc/start_cooldown()
set_ready_state(0)
chassis.use_power(energy_drain)
addtimer(CALLBACK(src, .proc/set_ready_state, 1), equip_cooldown)
/obj/item/mecha_parts/mecha_equipment/proc/do_after_cooldown(atom/target)
if(!chassis)
return
var/C = chassis.loc
set_ready_state(0)
chassis.use_power(energy_drain)
. = do_after(chassis.occupant, equip_cooldown, target=target)
set_ready_state(1)
if(!chassis || chassis.loc != C || src != chassis.selected || !(get_dir(chassis, target)&chassis.dir))
return 0
/obj/item/mecha_parts/mecha_equipment/proc/do_after_mecha(atom/target, delay)
if(!chassis)
return
var/C = chassis.loc
. = do_after(chassis.occupant, delay, target=target)
if(!chassis || chassis.loc != C || src != chassis.selected || !(get_dir(chassis, target)&chassis.dir))
return 0
/obj/item/mecha_parts/mecha_equipment/proc/can_attach(obj/mecha/M)
if(M.equipment.len<M.max_equip)
return 1
/obj/item/mecha_parts/mecha_equipment/proc/attach(obj/mecha/M)
M.equipment += src
chassis = M
forceMove(M)
M.mecha_log_message("[src] initialized.")
src.update_chassis_page()
return
/obj/item/mecha_parts/mecha_equipment/proc/detach(atom/moveto=null)
moveto = moveto || get_turf(chassis)
if(src.Move(moveto))
chassis.equipment -= src
if(chassis.selected == src)
chassis.selected = null
update_chassis_page()
chassis.mecha_log_message("[src] removed from equipment.")
chassis = null
set_ready_state(1)
return
/obj/item/mecha_parts/mecha_equipment/Topic(href,href_list)
if(href_list["detach"])
detach()
/obj/item/mecha_parts/mecha_equipment/proc/set_ready_state(state)
equip_ready = state
if(chassis)
send_byjax(chassis.occupant,"exosuit.browser","[REF(src)]",src.get_equip_info())
return
/obj/item/mecha_parts/mecha_equipment/proc/occupant_message(message)
if(chassis)
chassis.occupant_message("[icon2html(src, chassis.occupant)] [message]")
return
/obj/item/mecha_parts/mecha_equipment/proc/mecha_log_message(message, color) //on tg this just overrides log_message
log_message(message, LOG_GAME, color) //pass to default admin logging too
if(chassis)
chassis.mecha_log_message(message, color) //and pass to our chassis
//Used for reloading weapons/tools etc. that use some form of resource
/obj/item/mecha_parts/mecha_equipment/proc/rearm()
return 0
/obj/item/mecha_parts/mecha_equipment/proc/needs_rearm()
return 0
@@ -1,556 +0,0 @@
// Sleeper, Medical Beam, and Syringe gun
/obj/item/mecha_parts/mecha_equipment/medical
mech_flags = EXOSUIT_MODULE_MEDICAL
/obj/item/mecha_parts/mecha_equipment/medical/Initialize()
. = ..()
START_PROCESSING(SSobj, src)
/obj/item/mecha_parts/mecha_equipment/medical/can_attach(obj/mecha/medical/M)
if(..() && istype(M))
return 1
/obj/item/mecha_parts/mecha_equipment/medical/attach(obj/mecha/M)
..()
START_PROCESSING(SSobj, src)
/obj/item/mecha_parts/mecha_equipment/medical/Destroy()
STOP_PROCESSING(SSobj, src)
return ..()
/obj/item/mecha_parts/mecha_equipment/medical/process()
if(!chassis)
STOP_PROCESSING(SSobj, src)
return 1
/obj/item/mecha_parts/mecha_equipment/medical/mechmedbeam/detach()
STOP_PROCESSING(SSobj, src)
return ..()
/obj/item/mecha_parts/mecha_equipment/medical/sleeper
name = "mounted sleeper"
desc = "Equipment for medical exosuits. A mounted sleeper that stabilizes patients and can inject reagents in the exosuit's reserves."
icon = 'icons/obj/machines/sleeper.dmi'
icon_state = "sleeper"
energy_drain = 20
range = MELEE
equip_cooldown = 20
var/mob/living/carbon/patient = null
var/inject_amount = 10
salvageable = 0
/obj/item/mecha_parts/mecha_equipment/medical/sleeper/Destroy()
for(var/atom/movable/AM in src)
AM.forceMove(get_turf(src))
return ..()
/obj/item/mecha_parts/mecha_equipment/medical/sleeper/Exit(atom/movable/O)
return 0
/obj/item/mecha_parts/mecha_equipment/medical/sleeper/action(mob/living/carbon/target)
if(!action_checks(target))
return
if(!istype(target))
return
if(!patient_insertion_check(target))
return
occupant_message("<span class='notice'>You start putting [target] into [src]...</span>")
chassis.visible_message("<span class='warning'>[chassis] starts putting [target] into \the [src].</span>")
if(do_after_cooldown(target))
if(!patient_insertion_check(target))
return
target.forceMove(src)
patient = target
START_PROCESSING(SSobj, src)
update_equip_info()
occupant_message("<span class='notice'>[target] successfully loaded into [src]. Life support functions engaged.</span>")
chassis.visible_message("<span class='warning'>[chassis] loads [target] into [src].</span>")
mecha_log_message("[target] loaded. Life support functions engaged.")
/obj/item/mecha_parts/mecha_equipment/medical/sleeper/proc/patient_insertion_check(mob/living/carbon/target)
if(target.buckled)
occupant_message("<span class='warning'>[target] will not fit into the sleeper because [target.p_theyre()] buckled to [target.buckled]!</span>")
return
if(target.has_buckled_mobs())
occupant_message("<span class='warning'>[target] will not fit into the sleeper because of the creatures attached to it!</span>")
return
if(patient)
occupant_message("<span class='warning'>The sleeper is already occupied!</span>")
return
return 1
/obj/item/mecha_parts/mecha_equipment/medical/sleeper/proc/go_out()
if(!patient)
return
patient.forceMove(get_turf(src))
occupant_message("[patient] ejected. Life support functions disabled.")
mecha_log_message("[patient] ejected. Life support functions disabled.")
STOP_PROCESSING(SSobj, src)
patient = null
update_equip_info()
/obj/item/mecha_parts/mecha_equipment/medical/sleeper/detach()
if(patient)
occupant_message("<span class='warning'>Unable to detach [src] - equipment occupied!</span>")
return
STOP_PROCESSING(SSobj, src)
return ..()
/obj/item/mecha_parts/mecha_equipment/medical/sleeper/get_equip_info()
var/output = ..()
if(output)
var/temp = ""
if(patient)
temp = "<br />\[Occupant: [patient] ([patient.stat > 1 ? "*DECEASED*" : "Health: [patient.health]%"])\]<br /><a href='?src=[REF(src)];view_stats=1'>View stats</a>|<a href='?src=[REF(src)];eject=1'>Eject</a>"
return "[output] [temp]"
return
/obj/item/mecha_parts/mecha_equipment/medical/sleeper/Topic(href,href_list)
..()
if(href_list["eject"])
go_out()
if(href_list["view_stats"])
chassis.occupant << browse(get_patient_stats(),"window=msleeper")
onclose(chassis.occupant, "msleeper")
return
if(href_list["inject"])
var/obj/item/mecha_parts/mecha_equipment/medical/syringe_gun/SG = locate() in chassis
var/datum/reagent/R = locate(href_list["inject"]) in SG.reagents.reagent_list
if (istype(R))
inject_reagent(R, SG)
/obj/item/mecha_parts/mecha_equipment/medical/sleeper/proc/get_patient_stats()
if(!patient)
return
return {"<html>
<head>
<meta http-equiv='Content-Type' content='text/html; charset=UTF-8'>
<title>[patient] statistics</title>
<script language='javascript' type='text/javascript'>
[js_byjax]
</script>
<style>
h3 {margin-bottom:2px;font-size:14px;}
#lossinfo, #reagents, #injectwith {padding-left:15px;}
</style>
</head>
<body>
<h3>Health statistics</h3>
<div id="lossinfo">
[get_patient_dam()]
</div>
<h3>Reagents in bloodstream</h3>
<div id="reagents">
[get_patient_reagents()]
</div>
<div id="injectwith">
[get_available_reagents()]
</div>
</body>
</html>"}
/obj/item/mecha_parts/mecha_equipment/medical/sleeper/proc/get_patient_dam()
var/t1
switch(patient.stat)
if(0)
t1 = "Conscious"
if(1)
t1 = "Unconscious"
if(2)
t1 = "*dead*"
else
t1 = "Unknown"
return {"<font color="[patient.health > 50 ? "#3d5bc3" : "#c51e1e"]"><b>Health:</b> [patient.stat > 1 ? "[t1]" : "[patient.health]% ([t1])"]</font><br />
<font color="[patient.bodytemperature > 50 ? "#3d5bc3" : "#c51e1e"]"><b>Core Temperature:</b> [patient.bodytemperature-T0C]&deg;C ([patient.bodytemperature*1.8-459.67]&deg;F)</font><br />
<font color="[patient.getBruteLoss() < 60 ? "#3d5bc3" : "#c51e1e"]"><b>Brute Damage:</b> [patient.getBruteLoss()]%</font><br />
<font color="[patient.getOxyLoss() < 60 ? "#3d5bc3" : "#c51e1e"]"><b>Respiratory Damage:</b> [patient.getOxyLoss()]%</font><br />
<font color="[patient.getToxLoss() < 60 ? "#3d5bc3" : "#c51e1e"]"><b>Toxin Content:</b> [patient.getToxLoss()]%</font><br />
<font color="[patient.getFireLoss() < 60 ? "#3d5bc3" : "#c51e1e"]"><b>Burn Severity:</b> [patient.getFireLoss()]%</font><br />
<span class='danger'>[patient.getCloneLoss() ? "Subject appears to have cellular damage." : ""]</span><br />
<span class='danger'>[patient.getOrganLoss(ORGAN_SLOT_BRAIN) ? "Significant brain damage detected." : ""]</span><br />
<span class='danger'>[length(patient.get_traumas()) ? "Brain Traumas detected." : ""]</span><br />
"}
/obj/item/mecha_parts/mecha_equipment/medical/sleeper/proc/get_patient_reagents()
if(patient.reagents)
for(var/datum/reagent/R in patient.reagents.reagent_list)
if(R.volume > 0)
. += "[R]: [round(R.volume,0.01)]<br />"
return . || "None"
/obj/item/mecha_parts/mecha_equipment/medical/sleeper/proc/get_available_reagents()
var/output
var/obj/item/mecha_parts/mecha_equipment/medical/syringe_gun/SG = locate(/obj/item/mecha_parts/mecha_equipment/medical/syringe_gun) in chassis
if(SG && SG.reagents && islist(SG.reagents.reagent_list))
for(var/datum/reagent/R in SG.reagents.reagent_list)
if(R.volume > 0)
output += "<a href=\"?src=[REF(src)];inject=[REF(R)];source=[REF(SG)]\">Inject [R.name]</a><br />"
return output
/obj/item/mecha_parts/mecha_equipment/medical/sleeper/proc/inject_reagent(datum/reagent/R,obj/item/mecha_parts/mecha_equipment/medical/syringe_gun/SG)
if(!R || !patient || !SG || !(SG in chassis.equipment))
return 0
var/to_inject = min(R.volume, inject_amount)
if(to_inject && patient.reagents.get_reagent_amount(R.type) + to_inject <= inject_amount*2)
occupant_message("Injecting [patient] with [to_inject] units of [R.name].")
mecha_log_message("Injecting [patient] with [to_inject] units of [R.name].")
log_combat(chassis.occupant, patient, "injected", "[name] ([R] - [to_inject] units)")
SG.reagents.trans_id_to(patient,R.type,to_inject)
update_equip_info()
return
/obj/item/mecha_parts/mecha_equipment/medical/sleeper/update_equip_info()
if(..())
if(patient)
send_byjax(chassis.occupant,"msleeper.browser","lossinfo",get_patient_dam())
send_byjax(chassis.occupant,"msleeper.browser","reagents",get_patient_reagents())
send_byjax(chassis.occupant,"msleeper.browser","injectwith",get_available_reagents())
return 1
return
/obj/item/mecha_parts/mecha_equipment/medical/sleeper/container_resist(mob/living/user)
go_out()
/obj/item/mecha_parts/mecha_equipment/medical/sleeper/process()
if(..())
return
if(!chassis.has_charge(energy_drain))
set_ready_state(1)
mecha_log_message("Deactivated.")
occupant_message("[src] deactivated - no power.")
STOP_PROCESSING(SSobj, src)
return
var/mob/living/carbon/M = patient
if(!M)
return
if(M.health > 0)
M.adjustOxyLoss(-1)
M.AdjustAllImmobility(-80)
M.AdjustUnconscious(-80)
if(M.reagents.get_reagent_amount(/datum/reagent/medicine/epinephrine) < 5)
M.reagents.add_reagent(/datum/reagent/medicine/epinephrine, 5)
chassis.use_power(energy_drain)
update_equip_info()
///////////////////////////////// Syringe Gun ///////////////////////////////////////////////////////////////
/obj/item/mecha_parts/mecha_equipment/medical/syringe_gun
name = "exosuit syringe gun"
desc = "Equipment for medical exosuits. A chem synthesizer with syringe gun. Reagents inside are held in stasis, so no reactions will occur."
icon = 'icons/obj/guns/projectile.dmi'
icon_state = "syringegun"
var/list/syringes
var/list/known_reagents
var/list/processed_reagents
var/max_syringes = 10
var/max_volume = 75 //max reagent volume
var/synth_speed = 5 //[num] reagent units per cycle
energy_drain = 10
var/mode = 0 //0 - fire syringe, 1 - analyze reagents.
range = MELEE|RANGED
equip_cooldown = 10
/obj/item/mecha_parts/mecha_equipment/medical/syringe_gun/Initialize()
. = ..()
create_reagents(max_volume, NO_REACT)
syringes = new
known_reagents = list(/datum/reagent/medicine/epinephrine = "Epinephrine", /datum/reagent/medicine/charcoal = "Charcoal", /datum/reagent/medicine/prussian_blue = "Prussian Blue", \
/datum/reagent/medicine/dexalin = "Dexalin", /datum/reagent/medicine/insulin = "Insulin", /datum/reagent/medicine/kelotane = "Kelotane", /datum/reagent/medicine/bicaridine = "Bicaridine")
processed_reagents = new
/obj/item/mecha_parts/mecha_equipment/medical/syringe_gun/detach()
STOP_PROCESSING(SSobj, src)
return ..()
/obj/item/mecha_parts/mecha_equipment/medical/syringe_gun/Destroy()
STOP_PROCESSING(SSobj, src)
return ..()
/obj/item/mecha_parts/mecha_equipment/medical/syringe_gun/critfail()
..()
if(reagents)
reagents.reagents_holder_flags &= ~(NO_REACT)
/obj/item/mecha_parts/mecha_equipment/medical/syringe_gun/can_attach(obj/mecha/medical/M)
if(..())
if(istype(M))
return 1
return 0
/obj/item/mecha_parts/mecha_equipment/medical/syringe_gun/get_equip_info()
var/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
/obj/item/mecha_parts/mecha_equipment/medical/syringe_gun/action(atom/movable/target)
if(!action_checks(target))
return
if(istype(target, /obj/item/reagent_containers/syringe))
return load_syringe(target)
if(istype(target, /obj/item/storage))//Loads syringes from boxes
for(var/obj/item/reagent_containers/syringe/S in target.contents)
load_syringe(S)
return
if(mode)
return analyze_reagents(target)
if(!syringes.len)
occupant_message("<span class=\"alert\">No syringes loaded.</span>")
return
if(reagents.total_volume<=0)
occupant_message("<span class=\"alert\">No available reagents to load syringe with.</span>")
return
var/turf/trg = get_turf(target)
var/obj/item/reagent_containers/syringe/mechsyringe = syringes[1]
mechsyringe.forceMove(get_turf(chassis))
reagents.trans_to(mechsyringe, min(mechsyringe.volume, reagents.total_volume))
syringes -= mechsyringe
mechsyringe.icon = 'icons/obj/chemical.dmi'
mechsyringe.icon_state = "syringeproj"
playsound(chassis, 'sound/items/syringeproj.ogg', 50, 1)
mecha_log_message("Launched [mechsyringe] from [src], targeting [target].")
var/mob/originaloccupant = chassis.occupant
spawn(0)
src = null //if src is deleted, still process the syringe
for(var/i=0, i<6, i++)
if(!mechsyringe)
break
if(step_towards(mechsyringe,trg))
var/list/mobs = new
for(var/mob/living/carbon/M in mechsyringe.loc)
mobs += M
var/mob/living/carbon/M = safepick(mobs)
if(M)
var/R
mechsyringe.visible_message("<span class=\"attack\"> [M] was hit by the syringe!</span>")
if(M.can_inject(null, 1))
if(mechsyringe.reagents)
for(var/datum/reagent/A in mechsyringe.reagents.reagent_list)
R += "[A.name] ([num2text(A.volume)]"
mechsyringe.icon_state = initial(mechsyringe.icon_state)
mechsyringe.icon = initial(mechsyringe.icon)
mechsyringe.reagents.reaction(M, INJECT)
mechsyringe.reagents.trans_to(M, mechsyringe.reagents.total_volume)
M.take_bodypart_damage(2)
log_combat(originaloccupant, M, "shot", "syringegun")
break
else if(mechsyringe.loc == trg)
mechsyringe.icon_state = initial(mechsyringe.icon_state)
mechsyringe.icon = initial(mechsyringe.icon)
mechsyringe.update_icon()
break
else
mechsyringe.icon_state = initial(mechsyringe.icon_state)
mechsyringe.icon = initial(mechsyringe.icon)
mechsyringe.update_icon()
break
sleep(1)
return 1
/obj/item/mecha_parts/mecha_equipment/medical/syringe_gun/Topic(href,href_list)
..()
if (href_list["toggle_mode"])
mode = !mode
update_equip_info()
return
if (href_list["select_reagents"])
processed_reagents.len = 0
var/m = 0
var/message
for(var/i=1 to known_reagents.len)
if(m>=synth_speed)
break
var/reagent = text2path(href_list["reagent_[i]"])
if(reagent && (reagent in known_reagents))
message = "[m ? ", " : null][known_reagents[reagent]]"
processed_reagents += reagent
m++
if(processed_reagents.len)
message += " added to production"
START_PROCESSING(SSobj, src)
occupant_message(message)
occupant_message("<span class='notice'>Reagent processing started.</span>")
mecha_log_message("Reagent processing started.")
return
if (href_list["show_reagents"])
chassis.occupant << browse(get_reagents_page(),"window=msyringegun")
if (href_list["purge_reagent"])
var/reagent = href_list["purge_reagent"]
if(reagent)
reagents.del_reagent(reagent)
return
if (href_list["purge_all"])
reagents.clear_reagents()
/obj/item/mecha_parts/mecha_equipment/medical/syringe_gun/proc/get_reagents_page()
var/output = {"<html>
<head>
<meta http-equiv='Content-Type' content='text/html; charset=UTF-8'>
<title>Reagent Synthesizer</title>
<script language='javascript' type='text/javascript'>
[js_byjax]
</script>
<style>
h3 {margin-bottom:2px;font-size:14px;}
#reagents, #reagents_form {}
form {width: 90%; margin:10px auto; border:1px dotted #999; padding:6px;}
#submit {margin-top:5px;}
</style>
</head>
<body>
<h3>Current reagents:</h3>
<div id="reagents">
[get_current_reagents()]
</div>
<h3>Reagents production:</h3>
<div id="reagents_form">
[get_reagents_form()]
</div>
</body>
</html>
"}
return output
/obj/item/mecha_parts/mecha_equipment/medical/syringe_gun/proc/get_reagents_form()
var/r_list = get_reagents_list()
var/inputs
if(r_list)
inputs += "<input type=\"hidden\" name=\"src\" value=\"[REF(src)]\">"
inputs += "<input type=\"hidden\" name=\"select_reagents\" value=\"1\">"
inputs += "<input id=\"submit\" type=\"submit\" value=\"Apply settings\">"
var/output = {"<form action="byond://" method="get">
[r_list || "No known reagents"]
[inputs]
</form>
[r_list? "<span style=\"font-size:80%;\">Only the first [synth_speed] selected reagent\s will be added to production</span>" : null]
"}
return output
/obj/item/mecha_parts/mecha_equipment/medical/syringe_gun/proc/get_reagents_list()
var/output
for(var/i=1 to known_reagents.len)
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 />"}
return output
/obj/item/mecha_parts/mecha_equipment/medical/syringe_gun/proc/get_current_reagents()
var/output
for(var/datum/reagent/R in reagents.reagent_list)
if(R.volume > 0)
output += "[R]: [round(R.volume,0.001)] - <a href=\"?src=[REF(src)];purge_reagent=[R.type]\">Purge Reagent</a><br />"
if(output)
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"
/obj/item/mecha_parts/mecha_equipment/medical/syringe_gun/proc/load_syringe(obj/item/reagent_containers/syringe/S)
if(syringes.len<max_syringes)
if(get_dist(src,S) >= 2)
occupant_message("The syringe is too far away.")
return 0
for(var/obj/structure/D in S.loc)//Basic level check for structures in the way (Like grilles and windows)
if(!(D.CanPass(S,src.loc)))
occupant_message("Unable to load syringe.")
return 0
for(var/obj/machinery/door/D in S.loc)//Checks for doors
if(!(D.CanPass(S,src.loc)))
occupant_message("Unable to load syringe.")
return 0
S.reagents.trans_to(src, S.reagents.total_volume)
S.forceMove(src)
syringes += S
occupant_message("Syringe loaded.")
update_equip_info()
return 1
occupant_message("[src]'s syringe chamber is full.")
return 0
/obj/item/mecha_parts/mecha_equipment/medical/syringe_gun/proc/analyze_reagents(atom/A)
if(get_dist(src,A) >= 4)
occupant_message("The object is too far away.")
return 0
if(!A.reagents || ismob(A))
occupant_message("<span class=\"alert\">No reagent info gained from [A].</span>")
return 0
occupant_message("Analyzing reagents...")
for(var/datum/reagent/R in A.reagents.reagent_list)
if(R.can_synth && add_known_reagent(R.type,R.name))
occupant_message("Reagent analyzed, identified as [R.name] and added to database.")
send_byjax(chassis.occupant,"msyringegun.browser","reagents_form",get_reagents_form())
occupant_message("Analyzis complete.")
return 1
/obj/item/mecha_parts/mecha_equipment/medical/syringe_gun/proc/add_known_reagent(r_id,r_name)
if(!(r_id in known_reagents))
known_reagents += r_id
known_reagents[r_id] = r_name
return 1
return 0
/obj/item/mecha_parts/mecha_equipment/medical/syringe_gun/update_equip_info()
if(..())
send_byjax(chassis.occupant,"msyringegun.browser","reagents",get_current_reagents())
send_byjax(chassis.occupant,"msyringegun.browser","reagents_form",get_reagents_form())
return 1
return
/obj/item/mecha_parts/mecha_equipment/medical/syringe_gun/on_reagent_change(changetype)
..()
update_equip_info()
return
/obj/item/mecha_parts/mecha_equipment/medical/syringe_gun/process()
if(..())
return
if(!processed_reagents.len || reagents.total_volume >= reagents.maximum_volume || !chassis.has_charge(energy_drain))
occupant_message("<span class=\"alert\">Reagent processing stopped.</a>")
mecha_log_message("Reagent processing stopped.")
STOP_PROCESSING(SSobj, src)
return
var/amount = synth_speed / processed_reagents.len
for(var/reagent in processed_reagents)
reagents.add_reagent(reagent,amount)
chassis.use_power(energy_drain)
///////////////////////////////// Medical Beam ///////////////////////////////////////////////////////////////
/obj/item/mecha_parts/mecha_equipment/medical/mechmedbeam
name = "exosuit medical beamgun"
desc = "Equipment for medical exosuits. Generates a focused beam of medical nanites."
icon_state = "mecha_medigun"
energy_drain = 10
range = MELEE|RANGED
equip_cooldown = 0
var/obj/item/gun/medbeam/mech/medigun
custom_materials = list(/datum/material/iron = 15000, /datum/material/glass = 8000, /datum/material/plasma = 3000, /datum/material/gold = 8000, /datum/material/diamond = 2000)
/obj/item/mecha_parts/mecha_equipment/medical/mechmedbeam/Initialize()
. = ..()
medigun = new(src)
/obj/item/mecha_parts/mecha_equipment/medical/mechmedbeam/Destroy()
qdel(medigun)
return ..()
/obj/item/mecha_parts/mecha_equipment/medical/mechmedbeam/process()
if(..())
return
medigun.process()
/obj/item/mecha_parts/mecha_equipment/medical/mechmedbeam/action(atom/target)
medigun.process_fire(target, loc)
/obj/item/mecha_parts/mecha_equipment/medical/mechmedbeam/detach()
STOP_PROCESSING(SSobj, src)
medigun.LoseTarget()
return ..()
@@ -1,179 +0,0 @@
// Drill, Diamond drill, Mining scanner
#define DRILL_BASIC 1
#define DRILL_HARDENED 2
/obj/item/mecha_parts/mecha_equipment/drill
name = "exosuit drill"
desc = "Equipment for engineering and combat exosuits. This is the drill that'll pierce the heavens!"
icon_state = "mecha_drill"
equip_cooldown = 15
energy_drain = 10
force = 15
harmful = TRUE
tool_behaviour = TOOL_DRILL
toolspeed = 0.9
var/drill_delay = 7
var/drill_level = DRILL_BASIC
mech_flags = EXOSUIT_MODULE_WORKING | EXOSUIT_MODULE_COMBAT
/obj/item/mecha_parts/mecha_equipment/drill/Initialize()
. = ..()
AddComponent(/datum/component/butchering, 50, 100, null, null, TRUE)
/obj/item/mecha_parts/mecha_equipment/drill/action(atom/target)
if(!action_checks(target))
return
if(isspaceturf(target))
return
if(isobj(target))
var/obj/target_obj = target
if(target_obj.resistance_flags & UNACIDABLE)
return
target.visible_message("<span class='warning'>[chassis] starts to drill [target].</span>", \
"<span class='userdanger'>[chassis] starts to drill [target]...</span>", \
"<span class='italics'>You hear drilling.</span>")
if(do_after_cooldown(target))
set_ready_state(FALSE)
mecha_log_message("Started drilling [target]")
if(isturf(target))
var/turf/T = target
T.drill_act(src)
set_ready_state(TRUE)
return
while(do_after_mecha(target, drill_delay))
if(isliving(target))
drill_mob(target, chassis.occupant)
playsound(src,'sound/weapons/drill.ogg',40,1)
else if(isobj(target))
var/obj/O = target
O.take_damage(15, BRUTE, 0, FALSE, get_dir(chassis, target))
playsound(src,'sound/weapons/drill.ogg',40,1)
else
set_ready_state(TRUE)
return
set_ready_state(TRUE)
/turf/proc/drill_act(obj/item/mecha_parts/mecha_equipment/drill/drill)
return
/turf/closed/wall/drill_act(obj/item/mecha_parts/mecha_equipment/drill/drill)
if(drill.do_after_mecha(src, 60 / drill.drill_level))
drill.mecha_log_message("Drilled through [src]")
dismantle_wall(TRUE, FALSE)
/turf/closed/wall/r_wall/drill_act(obj/item/mecha_parts/mecha_equipment/drill/drill)
if(drill.drill_level >= DRILL_HARDENED)
if(drill.do_after_mecha(src, 120 / drill.drill_level))
drill.mecha_log_message("Drilled through [src]")
dismantle_wall(TRUE, FALSE)
else
drill.occupant_message("<span class='danger'>[src] is too durable to drill through.</span>")
/turf/closed/mineral/drill_act(obj/item/mecha_parts/mecha_equipment/drill/drill)
for(var/turf/closed/mineral/M in range(drill.chassis,1))
if(get_dir(drill.chassis,M)&drill.chassis.dir)
M.gets_drilled()
drill.mecha_log_message("Drilled through [src]")
drill.move_ores()
/turf/open/floor/plating/asteroid/drill_act(obj/item/mecha_parts/mecha_equipment/drill/drill)
for(var/turf/open/floor/plating/asteroid/M in range(1, drill.chassis))
if((get_dir(drill.chassis,M)&drill.chassis.dir) && !M.dug)
M.getDug()
drill.mecha_log_message("Drilled through [src]")
drill.move_ores()
/obj/item/mecha_parts/mecha_equipment/drill/proc/move_ores()
if(locate(/obj/item/mecha_parts/mecha_equipment/hydraulic_clamp) in chassis.equipment && istype(chassis, /obj/mecha/working/ripley))
var/obj/mecha/working/ripley/R = chassis //we could assume that it's a ripley because it has a clamp, but that's ~unsafe~ and ~bad practice~
R.collect_ore()
/obj/item/mecha_parts/mecha_equipment/drill/can_attach(obj/mecha/M as obj)
if(..())
if(istype(M, /obj/mecha/working) || istype(M, /obj/mecha/combat))
return 1
return 0
/obj/item/mecha_parts/mecha_equipment/drill/attach(obj/mecha/M)
..()
var/datum/component/butchering/butchering = src.GetComponent(/datum/component/butchering)
butchering.butchering_enabled = TRUE
/obj/item/mecha_parts/mecha_equipment/drill/detach(atom/moveto)
..()
var/datum/component/butchering/butchering = src.GetComponent(/datum/component/butchering)
butchering.butchering_enabled = FALSE
/obj/item/mecha_parts/mecha_equipment/drill/proc/drill_mob(mob/living/target, mob/user)
target.visible_message("<span class='danger'>[chassis] is drilling [target] with [src]!</span>", \
"<span class='userdanger'>[chassis] is drilling you with [src]!</span>")
log_combat(user, target, "drilled", "[name]", "(INTENT: [uppertext(user.a_intent)]) (DAMTYPE: [uppertext(damtype)])")
if(target.stat == DEAD && target.getBruteLoss() >= 200)
log_combat(user, target, "gibbed", name)
if(LAZYLEN(target.butcher_results) || LAZYLEN(target.guaranteed_butcher_results))
var/datum/component/butchering/butchering = src.GetComponent(/datum/component/butchering)
butchering.Butcher(chassis, target)
else
target.gib()
else
//drill makes a hole
var/obj/item/bodypart/target_part = target.get_bodypart(ran_zone(BODY_ZONE_CHEST))
target.apply_damage(10, BRUTE, BODY_ZONE_CHEST, target.run_armor_check(target_part, "melee"))
//blood splatters
var/splatter_dir = get_dir(chassis, target)
if(isalien(target))
new /obj/effect/temp_visual/dir_setting/bloodsplatter/xenosplatter(target.drop_location(), splatter_dir)
else
if(ishuman(target))
var/mob/living/carbon/human/H = target
new /obj/effect/temp_visual/dir_setting/bloodsplatter(target.drop_location(), splatter_dir, H.dna.species.exotic_blood_color)
else
new /obj/effect/temp_visual/dir_setting/bloodsplatter(target.drop_location(), splatter_dir)
//organs go everywhere
if(target_part && prob(10 * drill_level))
target_part.dismember(BRUTE)
/obj/item/mecha_parts/mecha_equipment/drill/diamonddrill
name = "diamond-tipped exosuit drill"
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"
equip_cooldown = 10
drill_delay = 4
drill_level = DRILL_HARDENED
force = 15
toolspeed = 0.7
/obj/item/mecha_parts/mecha_equipment/mining_scanner
name = "exosuit mining scanner"
desc = "Equipment for engineering and combat exosuits. It will automatically check surrounding rock for useful minerals."
icon_state = "mecha_analyzer"
selectable = 0
equip_cooldown = 15
var/scanning_time = 0
mech_flags = EXOSUIT_MODULE_WORKING
/obj/item/mecha_parts/mecha_equipment/mining_scanner/Initialize()
. = ..()
START_PROCESSING(SSfastprocess, src)
/obj/item/mecha_parts/mecha_equipment/mining_scanner/process()
if(!loc)
STOP_PROCESSING(SSfastprocess, src)
qdel(src)
if(istype(loc, /obj/mecha/working) && scanning_time <= world.time)
var/obj/mecha/working/mecha = loc
if(!mecha.occupant)
return
scanning_time = world.time + equip_cooldown
mineral_scan_pulse(get_turf(src))
#undef DRILL_BASIC
#undef DRILL_HARDENED
@@ -1,480 +0,0 @@
// Teleporter, Wormhole generator, Gravitational catapult, Armor booster modules,
// Repair droid, Tesla Energy relay, Generators
////////////////////////////////////////////// TELEPORTER ///////////////////////////////////////////////
/obj/item/mecha_parts/mecha_equipment/teleporter
name = "mounted teleporter"
desc = "An exosuit module that allows exosuits to teleport to any position in view."
icon_state = "mecha_teleport"
equip_cooldown = 150
energy_drain = 1000
range = RANGED
/obj/item/mecha_parts/mecha_equipment/teleporter/action(atom/target)
if(!action_checks(target) || is_centcom_level(loc.z))
return
var/turf/T = get_turf(target)
if(T)
do_teleport(chassis, T, 4, channel = TELEPORT_CHANNEL_BLUESPACE)
return 1
////////////////////////////////////////////// WORMHOLE GENERATOR //////////////////////////////////////////
/obj/item/mecha_parts/mecha_equipment/wormhole_generator
name = "mounted wormhole generator"
desc = "An exosuit module that allows generating of small quasi-stable wormholes."
icon_state = "mecha_wholegen"
equip_cooldown = 50
energy_drain = 300
range = RANGED
/obj/item/mecha_parts/mecha_equipment/wormhole_generator/action(atom/target)
if(!action_checks(target) || is_centcom_level(loc.z))
return
var/list/theareas = get_areas_in_range(100, chassis)
if(!theareas.len)
return
var/area/thearea = pick(theareas)
var/list/L = list()
var/turf/pos = get_turf(src)
for(var/turf/T in get_area_turfs(thearea.type))
if(!T.density && pos.z == T.z)
var/clear = 1
for(var/obj/O in T)
if(O.density)
clear = 0
break
if(clear)
L+=T
if(!L.len)
return
var/turf/target_turf = pick(L)
if(!target_turf)
return
var/list/obj/effect/portal/created = create_portal_pair(get_turf(src), target_turf, 300, 1, /obj/effect/portal/anom)
var/turf/T = get_turf(target)
message_admins("[ADMIN_LOOKUPFLW(chassis.occupant)] used a Wormhole Generator in [ADMIN_VERBOSEJMP(T)]")
log_game("[key_name(chassis.occupant)] used a Wormhole Generator in [AREACOORD(T)]")
src = null
QDEL_LIST_IN(created, rand(150,300))
return 1
/////////////////////////////////////// GRAVITATIONAL CATAPULT ///////////////////////////////////////////
/obj/item/mecha_parts/mecha_equipment/gravcatapult
name = "mounted gravitational catapult"
desc = "An exosuit mounted Gravitational Catapult."
icon_state = "mecha_teleport"
equip_cooldown = 10
energy_drain = 100
range = MELEE|RANGED
var/atom/movable/locked
var/mode = 1 //1 - gravsling 2 - gravpush
/obj/item/mecha_parts/mecha_equipment/gravcatapult/action(atom/movable/target)
if(!action_checks(target))
return
switch(mode)
if(1)
if(!locked)
if(!istype(target) || target.anchored || target.move_resist >= MOVE_FORCE_EXTREMELY_STRONG)
occupant_message("Unable to lock on [target]")
return
locked = target
occupant_message("Locked on [target]")
send_byjax(chassis.occupant,"exosuit.browser","[REF(src)]",src.get_equip_info())
else if(target!=locked)
if(locked in view(chassis))
var/turf/targ = get_turf(target)
var/turf/orig = get_turf(locked)
locked.throw_at(target, 14, 1.5)
locked = null
send_byjax(chassis.occupant,"exosuit.browser","[REF(src)]",src.get_equip_info())
log_game("[key_name(chassis.occupant)] used a Gravitational Catapult to throw [locked] (From [AREACOORD(orig)]) at [target] ([AREACOORD(targ)]).")
return TRUE
else
locked = null
occupant_message("Lock on [locked] disengaged.")
send_byjax(chassis.occupant,"exosuit.browser","[REF(src)]",src.get_equip_info())
if(2)
var/list/atoms = list()
if(isturf(target))
atoms = range(3, target)
else
atoms = orange(3, target)
for(var/atom/movable/A in atoms)
if(A.anchored || A.move_resist >= MOVE_FORCE_EXTREMELY_STRONG)
continue
spawn(0)
var/iter = 5-get_dist(A,target)
for(var/i=0 to iter)
step_away(A,target)
sleep(2)
var/turf/T = get_turf(target)
log_game("[key_name(chassis.occupant)] used a Gravitational Catapult repulse wave on [AREACOORD(T)]")
return TRUE
/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>\]"
/obj/item/mecha_parts/mecha_equipment/gravcatapult/Topic(href, href_list)
..()
if(href_list["mode"])
mode = text2num(href_list["mode"])
send_byjax(chassis.occupant,"exosuit.browser","[REF(src)]",src.get_equip_info())
return
//////////////////////////// ARMOR BOOSTER MODULES //////////////////////////////////////////////////////////
/obj/item/mecha_parts/mecha_equipment/anticcw_armor_booster //what is that noise? A BAWWW from TK mutants.
name = "armor booster module (Close Combat Weaponry)"
desc = "Boosts exosuit armor against armed melee attacks. Requires energy to operate."
icon_state = "mecha_abooster_ccw"
equip_cooldown = 10
energy_drain = 50
range = 0
var/deflect_coeff = 1.15
var/damage_coeff = 0.8
selectable = 0
/obj/item/mecha_parts/mecha_equipment/anticcw_armor_booster/proc/attack_react()
if(action_checks(src))
start_cooldown()
return 1
/obj/item/mecha_parts/mecha_equipment/antiproj_armor_booster
name = "armor booster module (Ranged Weaponry)"
desc = "Boosts exosuit armor against ranged attacks. Completely blocks taser shots. Requires energy to operate."
icon_state = "mecha_abooster_proj"
equip_cooldown = 10
energy_drain = 50
range = 0
var/deflect_coeff = 1.15
var/damage_coeff = 0.8
selectable = 0
/obj/item/mecha_parts/mecha_equipment/antiproj_armor_booster/proc/projectile_react()
if(action_checks(src))
start_cooldown()
return 1
////////////////////////////////// REPAIR DROID //////////////////////////////////////////////////
/obj/item/mecha_parts/mecha_equipment/repair_droid
name = "exosuit repair droid"
desc = "An automated repair droid for exosuits. Scans for damage and repairs it. Can fix almost all types of external or internal damage."
icon_state = "repair_droid"
energy_drain = 50
range = 0
var/health_boost = 1
var/icon/droid_overlay
var/list/repairable_damage = list(MECHA_INT_TEMP_CONTROL,MECHA_INT_TANK_BREACH)
selectable = 0
/obj/item/mecha_parts/mecha_equipment/repair_droid/Destroy()
STOP_PROCESSING(SSobj, src)
if(chassis)
chassis.cut_overlay(droid_overlay)
return ..()
/obj/item/mecha_parts/mecha_equipment/repair_droid/attach(obj/mecha/M as obj)
..()
droid_overlay = new(src.icon, icon_state = "repair_droid")
M.add_overlay(droid_overlay)
/obj/item/mecha_parts/mecha_equipment/repair_droid/detach()
chassis.cut_overlay(droid_overlay)
STOP_PROCESSING(SSobj, src)
..()
/obj/item/mecha_parts/mecha_equipment/repair_droid/get_equip_info()
if(!chassis)
return
return "<span style=\"color:[equip_ready?"#0f0":"#f00"];\">*</span>&nbsp; [src.name] - <a href='?src=[REF(src)];toggle_repairs=1'>[equip_ready?"A":"Dea"]ctivate</a>"
/obj/item/mecha_parts/mecha_equipment/repair_droid/Topic(href, href_list)
..()
if(href_list["toggle_repairs"])
chassis.cut_overlay(droid_overlay)
if(equip_ready)
START_PROCESSING(SSobj, src)
droid_overlay = new(src.icon, icon_state = "repair_droid_a")
mecha_log_message("Activated.")
set_ready_state(0)
else
STOP_PROCESSING(SSobj, src)
droid_overlay = new(src.icon, icon_state = "repair_droid")
mecha_log_message("Deactivated.")
set_ready_state(1)
chassis.add_overlay(droid_overlay)
send_byjax(chassis.occupant,"exosuit.browser","[REF(src)]",src.get_equip_info())
/obj/item/mecha_parts/mecha_equipment/repair_droid/process()
if(!chassis)
STOP_PROCESSING(SSobj, src)
set_ready_state(1)
return
var/h_boost = health_boost
var/repaired = 0
if(chassis.internal_damage & MECHA_INT_SHORT_CIRCUIT)
h_boost *= -2
else if(chassis.internal_damage && prob(15))
for(var/int_dam_flag in repairable_damage)
if(chassis.internal_damage & int_dam_flag)
chassis.clearInternalDamage(int_dam_flag)
repaired = 1
break
if(health_boost<0 || chassis.obj_integrity < chassis.max_integrity)
chassis.obj_integrity += min(health_boost, chassis.max_integrity-chassis.obj_integrity)
repaired = 1
if(repaired)
if(!chassis.use_power(energy_drain))
STOP_PROCESSING(SSobj, src)
set_ready_state(1)
else //no repair needed, we turn off
STOP_PROCESSING(SSobj, src)
set_ready_state(1)
chassis.cut_overlay(droid_overlay)
droid_overlay = new(src.icon, icon_state = "repair_droid")
chassis.add_overlay(droid_overlay)
/////////////////////////////////// TESLA ENERGY RELAY ////////////////////////////////////////////////
/obj/item/mecha_parts/mecha_equipment/tesla_energy_relay
name = "exosuit energy relay"
desc = "An exosuit module that wirelessly drains energy from any available power channel in area. The performance index is quite low."
icon_state = "tesla"
energy_drain = 0
range = 0
var/coeff = 100
var/list/use_channels = list(EQUIP,ENVIRON,LIGHT)
selectable = 0
/obj/item/mecha_parts/mecha_equipment/tesla_energy_relay/Destroy()
STOP_PROCESSING(SSobj, src)
return ..()
/obj/item/mecha_parts/mecha_equipment/tesla_energy_relay/detach()
STOP_PROCESSING(SSobj, src)
..()
return
/obj/item/mecha_parts/mecha_equipment/tesla_energy_relay/proc/get_charge()
if(equip_ready) //disabled
return
var/area/A = get_area(chassis)
var/pow_chan = get_MUTATION_POWER_channel(A)
if(pow_chan)
return 1000 //making magic
/obj/item/mecha_parts/mecha_equipment/tesla_energy_relay/proc/get_MUTATION_POWER_channel(var/area/A)
var/pow_chan
if(A)
for(var/c in use_channels)
if(A.powered(c))
pow_chan = c
break
return pow_chan
/obj/item/mecha_parts/mecha_equipment/tesla_energy_relay/Topic(href, href_list)
..()
if(href_list["toggle_relay"])
if(equip_ready) //inactive
START_PROCESSING(SSobj, src)
set_ready_state(0)
mecha_log_message("Activated.")
else
STOP_PROCESSING(SSobj, src)
set_ready_state(1)
mecha_log_message("Deactivated.")
/obj/item/mecha_parts/mecha_equipment/tesla_energy_relay/get_equip_info()
if(!chassis)
return
return "<span style=\"color:[equip_ready?"#0f0":"#f00"];\">*</span>&nbsp; [src.name] - <a href='?src=[REF(src)];toggle_relay=1'>[equip_ready?"A":"Dea"]ctivate</a>"
/obj/item/mecha_parts/mecha_equipment/tesla_energy_relay/process()
if(!chassis || chassis.internal_damage & MECHA_INT_SHORT_CIRCUIT)
STOP_PROCESSING(SSobj, src)
set_ready_state(1)
return
var/cur_charge = chassis.get_charge()
if(isnull(cur_charge) || !chassis.cell)
STOP_PROCESSING(SSobj, src)
set_ready_state(1)
occupant_message("No powercell detected.")
return
if(cur_charge < chassis.cell.maxcharge)
var/area/A = get_base_area(chassis)
if(A)
var/pow_chan
for(var/c in list(EQUIP,ENVIRON,LIGHT))
if(A.powered(c))
pow_chan = c
break
if(pow_chan)
var/delta = min(20, chassis.cell.maxcharge-cur_charge)
chassis.give_power(delta)
A.use_power(delta*coeff, pow_chan)
/////////////////////////////////////////// GENERATOR /////////////////////////////////////////////
/obj/item/mecha_parts/mecha_equipment/generator
name = "exosuit plasma converter"
desc = "An exosuit module that generates power using solid plasma as fuel. Pollutes the environment."
icon_state = "tesla"
range = MELEE
var/coeff = 100
var/obj/item/stack/sheet/fuel
var/max_fuel = 150000
var/fuel_per_cycle_idle = 25
var/fuel_per_cycle_active = 200
var/power_per_cycle = 20
/obj/item/mecha_parts/mecha_equipment/generator/Initialize()
. = ..()
generator_init()
/obj/item/mecha_parts/mecha_equipment/generator/Destroy()
STOP_PROCESSING(SSobj, src)
return ..()
/obj/item/mecha_parts/mecha_equipment/generator/proc/generator_init()
fuel = new /obj/item/stack/sheet/mineral/plasma(src, 0)
/obj/item/mecha_parts/mecha_equipment/generator/detach()
STOP_PROCESSING(SSobj, src)
..()
/obj/item/mecha_parts/mecha_equipment/generator/Topic(href, href_list)
..()
if(href_list["toggle"])
if(equip_ready) //inactive
set_ready_state(0)
START_PROCESSING(SSobj, src)
mecha_log_message("Activated.")
else
set_ready_state(1)
STOP_PROCESSING(SSobj, src)
mecha_log_message("Deactivated.")
/obj/item/mecha_parts/mecha_equipment/generator/get_equip_info()
var/output = ..()
if(output)
return "[output] \[[fuel]: [round(fuel.amount*MINERAL_MATERIAL_AMOUNT,0.1)] cm<sup>3</sup>\] - <a href='?src=[REF(src)];toggle=1'>[equip_ready?"A":"Dea"]ctivate</a>"
/obj/item/mecha_parts/mecha_equipment/generator/action(target)
if(chassis)
var/result = load_fuel(target)
if(result)
send_byjax(chassis.occupant,"exosuit.browser","[REF(src)]",src.get_equip_info())
/obj/item/mecha_parts/mecha_equipment/generator/proc/load_fuel(var/obj/item/stack/sheet/P)
if(P.type == fuel.type && P.amount > 0)
var/to_load = max(max_fuel - fuel.amount*MINERAL_MATERIAL_AMOUNT,0)
if(to_load)
var/units = min(max(round(to_load / MINERAL_MATERIAL_AMOUNT),1),P.amount)
fuel.amount += units
P.use(units)
occupant_message("[units] unit\s of [fuel] successfully loaded.")
return units
else
occupant_message("Unit is full.")
return 0
else
occupant_message("<span class='warning'>[fuel] traces in target minimal! [P] cannot be used as fuel.</span>")
return
/obj/item/mecha_parts/mecha_equipment/generator/attackby(weapon,mob/user, params)
load_fuel(weapon)
/obj/item/mecha_parts/mecha_equipment/generator/critfail()
..()
var/turf/open/T = get_turf(src)
if(!istype(T))
return
var/datum/gas_mixture/GM = new
if(prob(10))
GM.adjust_moles(GAS_PLASMA,100)
GM.set_temperature(1500+T0C) //should be enough to start a fire
T.visible_message("[src] suddenly disgorges a cloud of heated plasma.")
qdel(src)
else
GM.adjust_moles(GAS_PLASMA,5)
GM.set_temperature(istype(T) ? T.air.return_temperature() : T20C)
T.visible_message("[src] suddenly disgorges a cloud of plasma.")
T.assume_air(GM)
return
/obj/item/mecha_parts/mecha_equipment/generator/process()
if(!chassis)
STOP_PROCESSING(SSobj, src)
set_ready_state(1)
return
if(fuel.amount<=0)
STOP_PROCESSING(SSobj, src)
mecha_log_message("Deactivated - no fuel.")
set_ready_state(1)
return
var/cur_charge = chassis.get_charge()
if(isnull(cur_charge))
set_ready_state(1)
occupant_message("No powercell detected.")
mecha_log_message("Deactivated.")
STOP_PROCESSING(SSobj, src)
return
var/use_fuel = fuel_per_cycle_idle
if(cur_charge < chassis.cell.maxcharge)
use_fuel = fuel_per_cycle_active
chassis.give_power(power_per_cycle)
fuel.amount -= min(use_fuel/MINERAL_MATERIAL_AMOUNT,fuel.amount)
update_equip_info()
return 1
/obj/item/mecha_parts/mecha_equipment/generator/nuclear
name = "exonuclear reactor"
desc = "An exosuit module that generates power using uranium as fuel. Pollutes the environment."
icon_state = "tesla"
max_fuel = 50000
fuel_per_cycle_idle = 10
fuel_per_cycle_active = 30
power_per_cycle = 50
var/rad_per_cycle = 30
/obj/item/mecha_parts/mecha_equipment/generator/nuclear/generator_init()
fuel = new /obj/item/stack/sheet/mineral/uranium(src, 0)
/obj/item/mecha_parts/mecha_equipment/generator/nuclear/critfail()
return
/obj/item/mecha_parts/mecha_equipment/generator/nuclear/process()
if(..())
radiation_pulse(get_turf(src), rad_per_cycle)
@@ -1,480 +0,0 @@
//Hydraulic clamp, Kill clamp, Extinguisher, RCD, Cable layer.
/obj/item/mecha_parts/mecha_equipment/hydraulic_clamp
name = "hydraulic clamp"
desc = "Equipment for engineering exosuits. Lifts objects and loads them into cargo."
icon_state = "mecha_clamp"
equip_cooldown = 15
energy_drain = 10
tool_behaviour = TOOL_RETRACTOR
toolspeed = 0.8
var/dam_force = 20
var/obj/mecha/working/ripley/cargo_holder
harmful = TRUE
mech_flags = EXOSUIT_MODULE_RIPLEY
/obj/item/mecha_parts/mecha_equipment/hydraulic_clamp/can_attach(obj/mecha/working/ripley/M as obj)
if(..())
if(istype(M))
return 1
return 0
/obj/item/mecha_parts/mecha_equipment/hydraulic_clamp/attach(obj/mecha/M as obj)
..()
cargo_holder = M
return
/obj/item/mecha_parts/mecha_equipment/hydraulic_clamp/detach(atom/moveto = null)
..()
cargo_holder = null
/obj/item/mecha_parts/mecha_equipment/hydraulic_clamp/action(atom/target)
if(!action_checks(target))
return
if(!cargo_holder)
return
if(ismecha(target))
var/obj/mecha/M = target
var/have_ammo
for(var/obj/item/mecha_ammo/box in cargo_holder.cargo)
if(istype(box, /obj/item/mecha_ammo) && box.rounds)
have_ammo = TRUE
if(M.ammo_resupply(box, chassis.occupant, TRUE))
return
if(have_ammo)
to_chat(chassis.occupant, "No further supplies can be provided to [M].")
else
to_chat(chassis.occupant, "No providable supplies found in cargo hold")
return
if(isobj(target))
var/obj/O = target
if(!O.anchored)
if(cargo_holder.cargo.len < cargo_holder.cargo_capacity)
chassis.visible_message("[chassis] lifts [target] and starts to load it into cargo compartment.")
O.anchored = TRUE
if(do_after_cooldown(target))
cargo_holder.cargo += O
O.forceMove(chassis)
O.anchored = FALSE
occupant_message("<span class='notice'>[target] successfully loaded.</span>")
mecha_log_message("Loaded [O]. Cargo compartment capacity: [cargo_holder.cargo_capacity - cargo_holder.cargo.len]")
else
O.anchored = initial(O.anchored)
else
occupant_message("<span class='warning'>Not enough room in cargo compartment!</span>")
else
occupant_message("<span class='warning'>[target] is firmly secured!</span>")
else if(isliving(target))
var/mob/living/M = target
if(M.stat == DEAD)
return
if(chassis.occupant.a_intent == INTENT_HARM)
M.take_overall_damage(dam_force)
if(!M)
return
M.adjustOxyLoss(round(dam_force/2))
M.updatehealth()
target.visible_message("<span class='danger'>[chassis] squeezes [target].</span>", \
"<span class='userdanger'>[chassis] squeezes [target].</span>",\
"<span class='italics'>You hear something crack.</span>")
log_combat(chassis.occupant, M, "attacked", "[name]", "(INTENT: [uppertext(chassis.occupant.a_intent)]) (DAMTYE: [uppertext(damtype)])")
else
step_away(M,chassis)
occupant_message("You push [target] out of the way.")
chassis.visible_message("[chassis] pushes [target] out of the way.")
return 1
//This is pretty much just for the death-ripley
/obj/item/mecha_parts/mecha_equipment/hydraulic_clamp/kill
name = "\improper KILL CLAMP"
desc = "They won't know what clamped them!"
energy_drain = 0
dam_force = 0
var/real_clamp = FALSE
/obj/item/mecha_parts/mecha_equipment/hydraulic_clamp/kill/real
desc = "They won't know what clamped them! This time for real!"
energy_drain = 10
dam_force = 20
real_clamp = TRUE
/obj/item/mecha_parts/mecha_equipment/hydraulic_clamp/kill/action(atom/target)
if(!action_checks(target))
return
if(!cargo_holder)
return
if(isobj(target))
var/obj/O = target
if(!O.anchored)
if(cargo_holder.cargo.len < cargo_holder.cargo_capacity)
chassis.visible_message("[chassis] lifts [target] and starts to load it into cargo compartment.")
O.anchored = TRUE
if(do_after_cooldown(target))
cargo_holder.cargo += O
O.forceMove(chassis)
O.anchored = FALSE
occupant_message("<span class='notice'>[target] successfully loaded.</span>")
mecha_log_message("Loaded [O]. Cargo compartment capacity: [cargo_holder.cargo_capacity - cargo_holder.cargo.len]")
else
O.anchored = initial(O.anchored)
else
occupant_message("<span class='warning'>Not enough room in cargo compartment!</span>")
else
occupant_message("<span class='warning'>[target] is firmly secured!</span>")
else if(isliving(target))
var/mob/living/M = target
if(M.stat == DEAD)
return
if(chassis.occupant.a_intent == INTENT_HARM)
if(real_clamp)
M.take_overall_damage(dam_force)
if(!M)
return
M.adjustOxyLoss(round(dam_force/2))
M.updatehealth()
target.visible_message("<span class='danger'>[chassis] destroys [target] in an unholy fury.</span>", \
"<span class='userdanger'>[chassis] destroys [target] in an unholy fury.</span>")
log_combat(chassis.occupant, M, "attacked", "[name]", "(INTENT: [uppertext(chassis.occupant.a_intent)]) (DAMTYE: [uppertext(damtype)])")
else
target.visible_message("<span class='danger'>[chassis] destroys [target] in an unholy fury.</span>", \
"<span class='userdanger'>[chassis] destroys [target] in an unholy fury.</span>")
else if(chassis.occupant.a_intent == INTENT_DISARM)
if(real_clamp)
var/mob/living/carbon/C = target
var/play_sound = FALSE
var/limbs_gone = ""
var/obj/item/bodypart/affected = C.get_bodypart(BODY_ZONE_L_ARM)
if(affected != null)
affected.dismember(damtype)
play_sound = TRUE
limbs_gone = ", [affected]"
affected = C.get_bodypart(BODY_ZONE_R_ARM)
if(affected != null)
affected.dismember(damtype)
play_sound = TRUE
limbs_gone = "[limbs_gone], [affected]"
if(play_sound)
playsound(src, get_dismember_sound(), 80, TRUE)
target.visible_message("<span class='danger'>[chassis] rips [target]'s arms off.</span>", \
"<span class='userdanger'>[chassis] rips [target]'s arms off.</span>")
log_combat(chassis.occupant, M, "dismembered of[limbs_gone],", "[name]", "(INTENT: [uppertext(chassis.occupant.a_intent)]) (DAMTYE: [uppertext(damtype)])")
else
target.visible_message("<span class='danger'>[chassis] rips [target]'s arms off.</span>", \
"<span class='userdanger'>[chassis] rips [target]'s arms off.</span>")
else
step_away(M,chassis)
target.visible_message("[chassis] tosses [target] like a piece of paper.")
return 1
/obj/item/mecha_parts/mecha_equipment/extinguisher
name = "exosuit extinguisher"
desc = "Equipment for engineering exosuits. A rapid-firing high capacity fire extinguisher."
icon_state = "mecha_exting"
equip_cooldown = 5
energy_drain = 0
range = MELEE|RANGED
mech_flags = EXOSUIT_MODULE_WORKING
/obj/item/mecha_parts/mecha_equipment/extinguisher/Initialize()
. = ..()
create_reagents(1000)
reagents.add_reagent(/datum/reagent/water, 1000)
/obj/item/mecha_parts/mecha_equipment/extinguisher/action(atom/target) //copypasted from extinguisher. TODO: Rewrite from scratch.
if(!action_checks(target) || get_dist(chassis, target)>3)
return
if(istype(target, /obj/structure/reagent_dispensers/watertank) && get_dist(chassis,target) <= 1)
var/obj/structure/reagent_dispensers/watertank/WT = target
WT.reagents.trans_to(src, 1000)
occupant_message("<span class='notice'>Extinguisher refilled.</span>")
playsound(chassis, 'sound/effects/refill.ogg', 50, 1, -6)
else
if(reagents.total_volume > 0)
playsound(chassis, 'sound/effects/extinguish.ogg', 75, 1, -3)
var/direction = get_dir(chassis,target)
var/turf/T = get_turf(target)
var/turf/T1 = get_step(T,turn(direction, 90))
var/turf/T2 = get_step(T,turn(direction, -90))
var/list/the_targets = list(T,T1,T2)
spawn(0)
for(var/a=0, a<5, a++)
var/obj/effect/particle_effect/water/W = new /obj/effect/particle_effect/water(get_turf(chassis))
if(!W)
return
var/turf/my_target = pick(the_targets)
var/datum/reagents/R = new/datum/reagents(5)
W.reagents = R
R.my_atom = W
reagents.trans_to(W,1)
for(var/b=0, b<4, b++)
if(!W)
return
step_towards(W,my_target)
if(!W)
return
var/turf/W_turf = get_turf(W)
W.reagents.reaction(W_turf)
for(var/atom/atm in W_turf)
W.reagents.reaction(atm)
if(W.loc == my_target)
break
sleep(2)
return 1
/obj/item/mecha_parts/mecha_equipment/extinguisher/get_equip_info()
return "[..()] \[[src.reagents.total_volume]\]"
/obj/item/mecha_parts/mecha_equipment/extinguisher/can_attach(obj/mecha/working/M as obj)
if(..())
if(istype(M))
return 1
return 0
/obj/item/mecha_parts/mecha_equipment/rcd
name = "mounted RCD"
desc = "An exosuit-mounted Rapid Construction Device."
icon_state = "mecha_rcd"
equip_cooldown = 10
energy_drain = 250
range = MELEE|RANGED
item_flags = NO_MAT_REDEMPTION
var/mode = 0 //0 - deconstruct, 1 - wall or floor, 2 - airlock.
/obj/item/mecha_parts/mecha_equipment/rcd/Initialize()
. = ..()
GLOB.rcd_list += src
/obj/item/mecha_parts/mecha_equipment/rcd/Destroy()
GLOB.rcd_list -= src
return ..()
/obj/item/mecha_parts/mecha_equipment/rcd/action(atom/target)
if(istype(target, /turf/open/space/transit))//>implying these are ever made -Sieve
return
if(!isturf(target) && !istype(target, /obj/machinery/door/airlock))
target = get_turf(target)
if(!action_checks(target) || get_dist(chassis, target)>3)
return
playsound(chassis, 'sound/machines/click.ogg', 50, 1)
switch(mode)
if(0)
if(iswallturf(target))
var/turf/closed/wall/W = target
occupant_message("Deconstructing [W]...")
if(do_after_cooldown(W))
chassis.spark_system.start()
W.ScrapeAway(flags = CHANGETURF_INHERIT_AIR)
playsound(W, 'sound/items/deconstruct.ogg', 50, 1)
else if(isfloorturf(target))
var/turf/open/floor/F = target
occupant_message("Deconstructing [F]...")
if(do_after_cooldown(target))
chassis.spark_system.start()
F.ScrapeAway(flags = CHANGETURF_INHERIT_AIR)
playsound(F, 'sound/items/deconstruct.ogg', 50, 1)
else if (istype(target, /obj/machinery/door/airlock))
occupant_message("Deconstructing [target]...")
if(do_after_cooldown(target))
chassis.spark_system.start()
qdel(target)
playsound(target, 'sound/items/deconstruct.ogg', 50, 1)
if(1)
if(isspaceturf(target))
var/turf/open/space/S = target
occupant_message("Building Floor...")
if(do_after_cooldown(S))
S.PlaceOnTop(/turf/open/floor/plating, flags = CHANGETURF_INHERIT_AIR)
playsound(S, 'sound/items/deconstruct.ogg', 50, 1)
chassis.spark_system.start()
else if(isfloorturf(target))
var/turf/open/floor/F = target
occupant_message("Building Wall...")
if(do_after_cooldown(F))
F.PlaceOnTop(/turf/closed/wall)
playsound(F, 'sound/items/deconstruct.ogg', 50, 1)
chassis.spark_system.start()
if(2)
if(isfloorturf(target))
occupant_message("Building Airlock...")
if(do_after_cooldown(target))
chassis.spark_system.start()
var/obj/machinery/door/airlock/T = new /obj/machinery/door/airlock(target)
T.autoclose = TRUE
playsound(target, 'sound/items/deconstruct.ogg', 50, 1)
playsound(target, 'sound/effects/sparks2.ogg', 50, 1)
/obj/item/mecha_parts/mecha_equipment/rcd/do_after_cooldown(var/atom/target)
. = ..()
/obj/item/mecha_parts/mecha_equipment/rcd/Topic(href,href_list)
..()
if(href_list["mode"])
mode = text2num(href_list["mode"])
switch(mode)
if(0)
occupant_message("Switched RCD to Deconstruct.")
energy_drain = initial(energy_drain)
if(1)
occupant_message("Switched RCD to Construct.")
energy_drain = 2*initial(energy_drain)
if(2)
occupant_message("Switched RCD to Construct Airlock.")
energy_drain = 2*initial(energy_drain)
return
/obj/item/mecha_parts/mecha_equipment/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>\]"
/obj/item/mecha_parts/mecha_equipment/cable_layer
name = "cable layer"
desc = "Equipment for engineering exosuits. Lays cable along the exosuit's path."
icon_state = "mecha_wire"
var/datum/callback/event
var/turf/old_turf
var/obj/structure/cable/last_piece
var/obj/item/stack/cable_coil/cable
var/max_cable = 1000
/obj/item/mecha_parts/mecha_equipment/cable_layer/Initialize()
. = ..()
cable = new(src, 0)
/obj/item/mecha_parts/mecha_equipment/cable_layer/can_attach(obj/mecha/working/M)
if(..())
if(istype(M))
return 1
return 0
/obj/item/mecha_parts/mecha_equipment/cable_layer/attach()
..()
event = chassis.events.addEvent("onMove", CALLBACK(src, .proc/layCable))
return
/obj/item/mecha_parts/mecha_equipment/cable_layer/detach()
chassis.events.clearEvent("onMove",event)
return ..()
/obj/item/mecha_parts/mecha_equipment/cable_layer/Destroy()
if(chassis)
chassis.events.clearEvent("onMove",event)
return ..()
/obj/item/mecha_parts/mecha_equipment/cable_layer/action(var/obj/item/stack/cable_coil/target)
if(!action_checks(target))
return
if(istype(target) && target.amount)
var/cur_amount = cable? cable.amount : 0
var/to_load = max(max_cable - cur_amount,0)
if(to_load)
to_load = min(target.amount, to_load)
if(!cable)
cable = new(src, 0)
cable.amount += to_load
target.use(to_load)
occupant_message("<span class='notice'>[to_load] meters of cable successfully loaded.</span>")
send_byjax(chassis.occupant,"exosuit.browser","[REF(src)]",src.get_equip_info())
else
occupant_message("<span class='warning'>Reel is full.</span>")
else
occupant_message("<span class='warning'>Unable to load [target] - no cable found.</span>")
/obj/item/mecha_parts/mecha_equipment/cable_layer/Topic(href,href_list)
..()
if(href_list["toggle"])
set_ready_state(!equip_ready)
occupant_message("[src] [equip_ready?"dea":"a"]ctivated.")
mecha_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)
new /obj/item/stack/cable_coil(get_turf(chassis), m)
else
occupant_message("There's no more cable on the reel.")
return
/obj/item/mecha_parts/mecha_equipment/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/cable_layer/proc/use_cable(amount)
if(!cable || cable.amount<1)
set_ready_state(1)
occupant_message("Cable depleted, [src] deactivated.")
mecha_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/cable_layer/proc/reset()
last_piece = null
/obj/item/mecha_parts/mecha_equipment/cable_layer/proc/dismantleFloor(var/turf/new_turf)
if(isfloorturf(new_turf))
var/turf/open/floor/T = new_turf
if(!isplatingturf(T))
if(!T.broken && !T.burnt)
new T.floor_tile(T)
T.make_plating()
return !new_turf.intact
/obj/item/mecha_parts/mecha_equipment/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, "red")
NC.d1 = 0
NC.d2 = fdirn
NC.update_icon()
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.update_icon()
PN = last_piece.powernet
if(!PN)
PN = new()
GLOB.powernets += PN
NC.powernet = PN
PN.cables += NC
NC.mergeConnectedNetworks(NC.d2)
//NC.mergeConnectedNetworksOnTurf()
last_piece = NC
return 1
@@ -1,94 +0,0 @@
/obj/item/mecha_ammo
name = "generic ammo box"
desc = "A box of ammo for an unknown weapon."
w_class = WEIGHT_CLASS_BULKY
icon = 'icons/mecha/mecha_ammo.dmi'
icon_state = "empty"
lefthand_file = 'icons/mob/inhands/equipment/medical_lefthand.dmi'
righthand_file = 'icons/mob/inhands/equipment/medical_righthand.dmi'
var/rounds = 0
var/round_term = "round"
var/direct_load //For weapons where we re-load the weapon itself rather than adding to the ammo storage.
var/load_audio = "sound/weapons/gun_magazine_insert_empty_1.ogg"
var/ammo_type
/obj/item/mecha_ammo/update_name()
if(!rounds)
name = "empty ammo box"
desc = "An exosuit ammuniton box that has since been emptied. Please recycle."
icon_state = "empty"
/obj/item/mecha_ammo/attack_self(mob/user)
..()
if(rounds)
to_chat(user, "<span class='warning'>You cannot flatten the ammo box until it's empty!</span>")
return
to_chat(user, "<span class='notice'>You fold [src] flat.</span>")
var/I = new /obj/item/stack/sheet/metal(user.loc)
qdel(src)
user.put_in_hands(I)
/obj/item/mecha_ammo/examine(mob/user)
. = ..()
if(rounds)
. += "There [rounds > 1?"are":"is"] [rounds] [round_term][rounds > 1?"s":""] left."
/obj/item/mecha_ammo/incendiary
name = "incendiary ammo"
desc = "A box of incendiary ammunition for use with exosuit weapons."
icon_state = "incendiary"
rounds = 24
ammo_type = "incendiary"
/obj/item/mecha_ammo/scattershot
name = "scattershot ammo"
desc = "A box of scaled-up buckshot, for use in exosuit shotguns."
icon_state = "scattershot"
rounds = 40
ammo_type = "scattershot"
/obj/item/mecha_ammo/lmg
name = "machine gun ammo"
desc = "A box of linked ammunition, designed for the Ultra AC 2 exosuit weapon."
icon_state = "lmg"
rounds = 300
ammo_type = "lmg"
/obj/item/mecha_ammo/missiles_br
name = "breaching missiles"
desc = "A box of large missiles, ready for loading into a BRM-6 exosuit missile rack."
icon_state = "missile_br"
rounds = 6
round_term = "missile"
direct_load = TRUE
load_audio = "sound/weapons/bulletinsert.ogg"
ammo_type = "missiles_br"
/obj/item/mecha_ammo/missiles_he
name = "anti-armor missiles"
desc = "A box of large missiles, ready for loading into an SRM-8 exosuit missile rack."
icon_state = "missile_he"
rounds = 8
round_term = "missile"
direct_load = TRUE
load_audio = "sound/weapons/bulletinsert.ogg"
ammo_type = "missiles_he"
/obj/item/mecha_ammo/flashbang
name = "launchable flashbangs"
desc = "A box of smooth flashbangs, for use with a large exosuit launcher. Cannot be primed by hand."
icon_state = "flashbang"
rounds = 6
round_term = "grenade"
ammo_type = "flashbang"
/obj/item/mecha_ammo/clusterbang
name = "launchable flashbang clusters"
desc = "A box of clustered flashbangs, for use with a specialized exosuit cluster launcher. Cannot be primed by hand."
icon_state = "clusterbang"
rounds = 3
round_term = "cluster"
direct_load = TRUE
ammo_type = "clusterbang"
@@ -1,496 +0,0 @@
/obj/item/mecha_parts/mecha_equipment/weapon
name = "mecha weapon"
range = RANGED
var/projectile
var/fire_sound
var/projectiles_per_shot = 1
var/variance = 0
var/randomspread = 0 //use random spread for machineguns, instead of shotgun scatter
var/projectile_delay = 0
var/firing_effect_type = /obj/effect/temp_visual/dir_setting/firing_effect //the visual effect appearing when the weapon is fired.
var/kickback = TRUE //Will using this weapon in no grav push mecha back.
mech_flags = EXOSUIT_MODULE_COMBAT
/obj/item/mecha_parts/mecha_equipment/weapon/can_attach(obj/mecha/combat/M)
if(..())
if(istype(M))
return 1
return 0
/obj/item/mecha_parts/mecha_equipment/weapon/proc/get_shot_amount()
return projectiles_per_shot
/obj/item/mecha_parts/mecha_equipment/weapon/action(atom/target, params)
if(!action_checks(target))
return 0
var/turf/curloc = get_turf(chassis)
var/turf/targloc = get_turf(target)
if (!targloc || !istype(targloc) || !curloc)
return 0
if (targloc == curloc)
return 0
set_ready_state(0)
for(var/i=1 to get_shot_amount())
var/obj/item/projectile/A = new projectile(curloc)
A.firer = chassis.occupant
A.original = target
if(!A.suppressed && firing_effect_type)
new firing_effect_type(get_turf(src), chassis.dir)
var/spread = 0
if(variance)
if(randomspread)
spread = round((rand() - 0.5) * variance)
else
spread = round((i / projectiles_per_shot - 0.5) * variance)
A.preparePixelProjectile(target, chassis.occupant, params, spread)
A.fire()
playsound(chassis, fire_sound, 50, 1)
sleep(max(0, projectile_delay))
if(kickback)
chassis.newtonian_move(turn(chassis.dir,180))
chassis.mecha_log_message("Fired from [src.name], targeting [target].")
return 1
//Base energy weapon type
/obj/item/mecha_parts/mecha_equipment/weapon/energy
name = "general energy weapon"
firing_effect_type = /obj/effect/temp_visual/dir_setting/firing_effect/energy
/obj/item/mecha_parts/mecha_equipment/weapon/energy/get_shot_amount()
return min(round(chassis.cell.charge / energy_drain), projectiles_per_shot)
/obj/item/mecha_parts/mecha_equipment/weapon/energy/start_cooldown()
set_ready_state(0)
chassis.use_power(energy_drain*get_shot_amount())
addtimer(CALLBACK(src, .proc/set_ready_state, 1), equip_cooldown)
/obj/item/mecha_parts/mecha_equipment/weapon/energy/laser
equip_cooldown = 8
name = "\improper CH-PS \"Immolator\" laser"
desc = "A weapon for combat exosuits. Shoots basic lasers."
icon_state = "mecha_laser"
energy_drain = 30
projectile = /obj/item/projectile/beam/laser
fire_sound = 'sound/weapons/laser.ogg'
harmful = TRUE
/obj/item/mecha_parts/mecha_equipment/weapon/energy/laser/heavy
equip_cooldown = 15
name = "\improper CH-LC \"Solaris\" laser cannon"
desc = "A weapon for combat exosuits. Shoots heavy lasers."
icon_state = "mecha_laser"
energy_drain = 60
projectile = /obj/item/projectile/beam/laser/heavylaser
fire_sound = 'sound/weapons/lasercannonfire.ogg'
/obj/item/mecha_parts/mecha_equipment/weapon/energy/ion
equip_cooldown = 20
name = "\improper MKIV ion heavy cannon"
desc = "A weapon for combat exosuits. Shoots technology-disabling ion beams. Don't catch yourself in the blast!"
icon_state = "mecha_ion"
energy_drain = 120
projectile = /obj/item/projectile/ion
fire_sound = 'sound/weapons/IonRifle.ogg'
/obj/item/mecha_parts/mecha_equipment/weapon/energy/tesla
equip_cooldown = 35
name = "\improper MKI Tesla Cannon"
desc = "A weapon for combat exosuits. Fires bolts of electricity similar to the experimental tesla engine."
icon_state = "mecha_ion"
energy_drain = 500
projectile = /obj/item/projectile/energy/tesla/cannon
fire_sound = 'sound/magic/lightningbolt.ogg'
harmful = TRUE
/obj/item/mecha_parts/mecha_equipment/weapon/energy/pulse
equip_cooldown = 30
name = "eZ-13 MK2 heavy pulse rifle"
desc = "A weapon for combat exosuits. Shoots powerful destructive blasts capable of demolishing obstacles."
icon_state = "mecha_pulse"
energy_drain = 120
projectile = /obj/item/projectile/beam/pulse/heavy
fire_sound = 'sound/weapons/marauder.ogg'
harmful = TRUE
/obj/item/mecha_parts/mecha_equipment/weapon/energy/plasma
equip_cooldown = 10
name = "217-D Heavy Plasma Cutter"
desc = "A device that shoots resonant plasma bursts at extreme velocity. The blasts are capable of crushing rock and demolishing solid obstacles."
icon_state = "mecha_plasmacutter"
item_state = "plasmacutter"
lefthand_file = 'icons/mob/inhands/weapons/guns_lefthand.dmi'
righthand_file = 'icons/mob/inhands/weapons/guns_righthand.dmi'
energy_drain = 30
projectile = /obj/item/projectile/plasma/adv/mech
fire_sound = 'sound/weapons/plasma_cutter.ogg'
harmful = TRUE
/obj/item/mecha_parts/mecha_equipment/weapon/energy/plasma/can_attach(obj/mecha/working/M)
if(..()) //combat mech
return 1
else if(M.equipment.len < M.max_equip && istype(M))
return 1
return 0
/obj/item/mecha_parts/mecha_equipment/weapon/energy/taser
name = "\improper PBT \"Pacifier\" mounted taser"
desc = "A weapon for combat exosuits. Shoots non-lethal stunning electrodes."
icon_state = "mecha_taser"
energy_drain = 20
equip_cooldown = 8
projectile = /obj/item/projectile/energy/electrode
fire_sound = 'sound/weapons/taser.ogg'
/obj/item/mecha_parts/mecha_equipment/weapon/honker
name = "\improper HoNkER BlAsT 5000"
desc = "Equipment for clown exosuits. Spreads fun and joy to everyone around. Honk!"
icon_state = "mecha_honker"
energy_drain = 200
equip_cooldown = 150
range = MELEE|RANGED
kickback = FALSE
/obj/item/mecha_parts/mecha_equipment/weapon/honker/can_attach(obj/mecha/combat/honker/M)
if(..())
if(istype(M))
return 1
return 0
/obj/item/mecha_parts/mecha_equipment/weapon/honker/action(target, params)
if(!action_checks(target))
return
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(ishuman(M))
var/mob/living/carbon/human/H = M
if(istype(H.ears, /obj/item/clothing/ears/earmuffs))
continue
to_chat(M, "<font color='red' size='7'>HONK</font>")
M.SetSleeping(0)
M.stuttering += 20
M.adjustEarDamage(0, 30)
M.DefaultCombatKnockdown(60)
if(prob(30))
M.Stun(200)
M.Unconscious(80)
else
M.Jitter(500)
mecha_log_message("Honked from [src.name]. HONK!")
var/turf/T = get_turf(src)
message_admins("[ADMIN_LOOKUPFLW(chassis.occupant)] used a Mecha Honker in [ADMIN_VERBOSEJMP(T)]")
log_game("[key_name(chassis.occupant)] used a Mecha Honker in [AREACOORD(T)]")
return 1
//Base ballistic weapon type
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic
name = "general ballistic weapon"
fire_sound = 'sound/weapons/lmgshot.ogg'
var/projectiles
var/projectiles_cache //ammo to be loaded in, if possible.
var/projectiles_cache_max
var/projectile_energy_cost
var/disabledreload //For weapons with no cache (like the rockets) which are reloaded by hand
var/ammo_type
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/get_shot_amount()
return min(projectiles, projectiles_per_shot)
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/action_checks(target)
if(!..())
return 0
if(projectiles <= 0)
return 0
return 1
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/get_equip_info()
return "[..()] \[[src.projectiles][projectiles_cache_max &&!projectile_energy_cost?"/[projectiles_cache]":""]\][!disabledreload &&(src.projectiles < initial(src.projectiles))?" - <a href='?src=[REF(src)];rearm=1'>Rearm</a>":null]"
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/rearm()
if(projectiles < initial(projectiles))
var/projectiles_to_add = initial(projectiles) - projectiles
if(projectile_energy_cost)
while(chassis.get_charge() >= projectile_energy_cost && projectiles_to_add)
projectiles++
projectiles_to_add--
chassis.use_power(projectile_energy_cost)
else
if(!projectiles_cache)
return FALSE
if(projectiles_to_add <= projectiles_cache)
projectiles = projectiles + projectiles_to_add
projectiles_cache = projectiles_cache - projectiles_to_add
else
projectiles = projectiles + projectiles_cache
projectiles_cache = 0
send_byjax(chassis.occupant,"exosuit.browser","[REF(src)]",src.get_equip_info())
return TRUE
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/needs_rearm()
. = !(projectiles > 0)
/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/action(atom/target)
if(..())
projectiles -= get_shot_amount()
send_byjax(chassis.occupant,"exosuit.browser","[REF(src)]",src.get_equip_info())
return 1
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/carbine
name = "\improper FNX-99 \"Hades\" Carbine"
desc = "A weapon for combat exosuits. Shoots incendiary bullets."
icon_state = "mecha_carbine"
equip_cooldown = 10
projectile = /obj/item/projectile/bullet/incendiary/fnx99
projectiles = 24
projectiles_cache = 24
projectiles_cache_max = 96
harmful = TRUE
ammo_type = "incendiary"
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/silenced
name = "\improper S.H.H. \"Quietus\" Carbine"
desc = "A weapon for combat exosuits. A mime invention, field tests have shown that targets cannot even scream before going down."
fire_sound = 'sound/weapons/gunshot_silenced.ogg'
icon_state = "mecha_mime"
equip_cooldown = 30
projectile = /obj/item/projectile/bullet/mime
projectiles = 6
projectile_energy_cost = 50
harmful = TRUE
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/scattershot
name = "\improper LBX AC 10 \"Scattershot\""
desc = "A weapon for combat exosuits. Shoots a spread of pellets."
fire_sound = 'sound/weapons/gunshotshotgunshot.ogg'
icon_state = "mecha_scatter"
equip_cooldown = 20
projectile = /obj/item/projectile/bullet/scattershot
projectiles = 40
projectiles_cache = 40
projectiles_cache_max = 160
projectiles_per_shot = 4
variance = 25
harmful = TRUE
ammo_type = "scattershot"
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/seedscatter
name = "\improper Melon Seed \"Scattershot\""
desc = "A weapon for combat exosuits. Shoots a spread of pellets, shaped as seed."
fire_sound = 'sound/weapons/gunshotshotgunshot.ogg'
icon_state = "mecha_scatter"
equip_cooldown = 20
projectile = /obj/item/projectile/bullet/seed
projectiles = 20
projectiles_cache = 20
projectiles_cache_max = 160
projectiles_per_shot = 10
variance = 25
harmful = TRUE
ammo_type = "scattershot"
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/lmg
name = "\improper Ultra AC 2"
desc = "A weapon for combat exosuits. Shoots a rapid, three shot burst."
icon_state = "mecha_uac2"
equip_cooldown = 10
projectile = /obj/item/projectile/bullet/lmg
projectiles = 300
projectiles_cache = 300
projectiles_cache_max = 1200
projectiles_per_shot = 3
variance = 6
randomspread = 1
projectile_delay = 2
harmful = TRUE
ammo_type = "lmg"
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack
name = "\improper SRM-8 missile rack"
desc = "A weapon for combat exosuits. Launches light explosive missiles."
icon_state = "mecha_missilerack"
projectile = /obj/item/projectile/bullet/a84mm_he
fire_sound = 'sound/weapons/rocketlaunch.ogg'
projectiles = 8
projectiles_cache = 0
projectiles_cache_max = 0
disabledreload = TRUE
equip_cooldown = 60
harmful = TRUE
ammo_type = "missiles_he"
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/spacecops
projectiles = 420
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/breaching
name = "\improper BRM-6 missile rack"
desc = "A weapon for combat exosuits. Launches low-explosive breaching missiles designed to explode only when striking a sturdy target."
icon_state = "mecha_missilerack_six"
projectile = /obj/item/projectile/bullet/a84mm_br
fire_sound = 'sound/weapons/rocketlaunch.ogg'
projectiles = 6
projectiles_cache = 0
projectiles_cache_max = 0
disabledreload = TRUE
equip_cooldown = 60
harmful = TRUE
ammo_type = "missiles_br"
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/launcher
var/missile_speed = 2
var/missile_range = 30
var/diags_first = FALSE
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/launcher/action(target)
if(!action_checks(target))
return
var/obj/O = new projectile(chassis.loc)
playsound(chassis, fire_sound, 50, 1)
mecha_log_message("Launched a [O.name] from [name], targeting [target].")
projectiles--
proj_init(O)
O.throw_at(target, missile_range, missile_speed, chassis.occupant, FALSE, diagonals_first = diags_first)
return 1
//used for projectile initilisation (priming flashbang) and additional logging
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/launcher/proc/proj_init(var/obj/O)
return
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/launcher/flashbang
name = "\improper SGL-6 grenade launcher"
desc = "A weapon for combat exosuits. Launches primed flashbangs."
icon_state = "mecha_grenadelnchr"
projectile = /obj/item/grenade/flashbang
fire_sound = 'sound/weapons/grenadelaunch.ogg'
projectiles = 6
projectiles_cache = 6
projectiles_cache_max = 24
missile_speed = 1.5
equip_cooldown = 60
var/det_time = 20
ammo_type = "flashbang"
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/launcher/flashbang/proj_init(var/obj/item/grenade/flashbang/F)
var/turf/T = get_turf(src)
message_admins("[ADMIN_LOOKUPFLW(chassis.occupant)] fired a [src] in [ADMIN_VERBOSEJMP(T)]")
log_game("[key_name(chassis.occupant)] fired a [src] in [AREACOORD(T)]")
addtimer(CALLBACK(F, /obj/item/grenade/flashbang.proc/prime), det_time)
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/launcher/flashbang/clusterbang //Because I am a heartless bastard -Sieve //Heartless? for making the poor man's honkblast? - Kaze
name = "\improper SOB-3 grenade launcher"
desc = "A weapon for combat exosuits. Launches primed clusterbangs. You monster."
projectiles = 3
projectiles_cache = 0
projectiles_cache_max = 0
disabledreload = TRUE
projectile = /obj/item/grenade/clusterbuster
equip_cooldown = 90
ammo_type = "clusterbang"
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/launcher/banana_mortar
name = "banana mortar"
desc = "Equipment for clown exosuits. Launches banana peels."
icon_state = "mecha_bananamrtr"
projectile = /obj/item/grown/bananapeel
fire_sound = 'sound/items/bikehorn.ogg'
projectiles = 15
missile_speed = 1.5
projectile_energy_cost = 100
equip_cooldown = 20
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/launcher/banana_mortar/can_attach(obj/mecha/combat/honker/M)
if(..())
if(istype(M))
return 1
return 0
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/launcher/mousetrap_mortar
name = "mousetrap mortar"
desc = "Equipment for clown exosuits. Launches armed mousetraps."
icon_state = "mecha_mousetrapmrtr"
projectile = /obj/item/assembly/mousetrap/armed
fire_sound = 'sound/items/bikehorn.ogg'
projectiles = 15
missile_speed = 1.5
projectile_energy_cost = 100
equip_cooldown = 10
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/launcher/mousetrap_mortar/can_attach(obj/mecha/combat/honker/M)
if(..())
if(istype(M))
return 1
return 0
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/launcher/mousetrap_mortar/proj_init(var/obj/item/assembly/mousetrap/armed/M)
M.secured = 1
//Classic extending punching glove, but weaponised!
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/launcher/punching_glove
name = "\improper Oingo Boingo Punch-face"
desc = "Equipment for clown exosuits. Delivers fun right to your face!"
icon_state = "mecha_punching_glove"
energy_drain = 250
equip_cooldown = 20
range = MELEE|RANGED
missile_range = 5
projectile = /obj/item/punching_glove
fire_sound = 'sound/items/bikehorn.ogg'
projectiles = 10
projectile_energy_cost = 500
diags_first = TRUE
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/launcher/punching_glove/can_attach(obj/mecha/combat/honker/M)
if(..())
if(istype(M))
return 1
return 0
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/launcher/punching_glove/action(target)
. = ..()
if(.)
chassis.occupant_message("<font color='red' size='5'>HONK</font>")
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/launcher/punching_glove/proj_init(obj/item/punching_glove/PG)
if(!istype(PG))
return
//has to be low sleep or it looks weird, the beam doesn't exist for very long so it's a non-issue
chassis.Beam(PG, icon_state = "chain", time = missile_range * 20, maxdistance = missile_range + 2, beam_sleep_time = 1)
/obj/item/punching_glove
name = "punching glove"
desc = "INCOMING HONKS"
throwforce = 35
icon_state = "punching_glove"
/obj/item/punching_glove/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
if(!..())
if(ismovable(hit_atom))
var/atom/movable/AM = hit_atom
AM.safe_throw_at(get_edge_target_turf(AM,get_dir(src, AM)), 7, 2)
qdel(src)
-138
View File
@@ -1,138 +0,0 @@
/turf/open/floor/mech_bay_recharge_floor // Whos idea it was
name = "mech bay recharge station" // Recharging turfs
desc = "Parking a mech on this station will recharge its internal power cell."
icon = 'icons/turf/floors.dmi' // That are set in stone to check the west turf for recharge port
icon_state = "recharge_floor" // Some people just want to watch the world burn i guess
/turf/open/floor/mech_bay_recharge_floor/break_tile()
ScrapeAway()
/turf/open/floor/mech_bay_recharge_floor/airless
icon_state = "recharge_floor_asteroid"
initial_gas_mix = AIRLESS_ATMOS
/obj/machinery/mech_bay_recharge_port
name = "mech bay power port"
desc = "This port recharges a mech's internal power cell."
density = TRUE
dir = EAST
icon = 'icons/mecha/mech_bay.dmi'
icon_state = "recharge_port"
circuit = /obj/item/circuitboard/machine/mech_recharger
var/obj/mecha/recharging_mech
var/obj/machinery/computer/mech_bay_power_console/recharge_console
var/max_charge = 50
var/on = FALSE
var/repairability = 0
var/turf/recharging_turf = null
/obj/machinery/mech_bay_recharge_port/Initialize()
. = ..()
recharging_turf = get_step(loc, dir)
/obj/machinery/mech_bay_recharge_port/RefreshParts()
var/MC
for(var/obj/item/stock_parts/capacitor/C in component_parts)
MC += C.rating
max_charge = MC * 25
/obj/machinery/mech_bay_recharge_port/examine(mob/user)
. = ..()
if(in_range(user, src) || isobserver(user))
. += "<span class='notice'>The status display reads: Base recharge rate at <b>[max_charge]J</b> per cycle.</span>"
/obj/machinery/mech_bay_recharge_port/process()
if(stat & NOPOWER || !recharge_console)
return
if(!recharging_mech)
recharging_mech = locate(/obj/mecha) in recharging_turf
if(recharging_mech)
recharge_console.update_icon()
if(recharging_mech && recharging_mech.cell)
if(recharging_mech.cell.charge < recharging_mech.cell.maxcharge)
var/delta = min(max_charge, recharging_mech.cell.maxcharge - recharging_mech.cell.charge)
recharging_mech.give_power(delta)
use_power(delta*150)
else
recharge_console.update_icon()
if(recharging_mech.loc != recharging_turf)
recharging_mech = null
recharge_console.update_icon()
/obj/machinery/mech_bay_recharge_port/attackby(obj/item/I, mob/user, params)
if(default_deconstruction_screwdriver(user, "recharge_port-o", "recharge_port", I))
return
if(default_change_direction_wrench(user, I))
recharging_turf = get_step(loc, dir)
return
if(default_deconstruction_crowbar(I))
return
return ..()
/obj/machinery/computer/mech_bay_power_console
name = "mech bay power control console"
desc = "Displays the status of mechs connected to the recharge station."
icon_screen = "recharge_comp"
icon_keyboard = "rd_key"
circuit = /obj/item/circuitboard/computer/mech_bay_power_console
var/obj/machinery/mech_bay_recharge_port/recharge_port
light_color = LIGHT_COLOR_PINK
/obj/machinery/computer/mech_bay_power_console/ui_interact(mob/user, datum/tgui/ui)
ui = SStgui.try_update_ui(user, src, ui)
if(!ui)
ui = new(user, src, "MechBayPowerConsole", name)
ui.open()
/obj/machinery/computer/mech_bay_power_console/ui_act(action, params)
if(..())
return
switch(action)
if("reconnect")
reconnect()
. = TRUE
update_icon()
/obj/machinery/computer/mech_bay_power_console/ui_data(mob/user)
var/list/data = list()
if(recharge_port && !QDELETED(recharge_port))
data["recharge_port"] = list("mech" = null)
if(recharge_port.recharging_mech && !QDELETED(recharge_port.recharging_mech))
data["recharge_port"]["mech"] = list("health" = recharge_port.recharging_mech.obj_integrity, "maxhealth" = recharge_port.recharging_mech.max_integrity, "cell" = null, "name" = recharge_port.recharging_mech.name,)
if(recharge_port.recharging_mech.cell && !QDELETED(recharge_port.recharging_mech.cell))
data["recharge_port"]["mech"]["cell"] = list(
"charge" = recharge_port.recharging_mech.cell.charge,
"maxcharge" = recharge_port.recharging_mech.cell.maxcharge
)
return data
/obj/machinery/computer/mech_bay_power_console/proc/reconnect()
if(recharge_port)
return
recharge_port = locate(/obj/machinery/mech_bay_recharge_port) in range(1)
if(!recharge_port )
for(var/D in GLOB.cardinals)
var/turf/A = get_step(src, D)
A = get_step(A, D)
recharge_port = locate(/obj/machinery/mech_bay_recharge_port) in A
if(recharge_port)
break
if(recharge_port)
if(!recharge_port.recharge_console)
recharge_port.recharge_console = src
else
recharge_port = null
/obj/machinery/computer/mech_bay_power_console/update_overlays()
. = ..()
if(!recharge_port || !recharge_port.recharging_mech || !recharge_port.recharging_mech.cell || !(recharge_port.recharging_mech.cell.charge < recharge_port.recharging_mech.cell.maxcharge) || stat & (NOPOWER|BROKEN))
return
. += "recharge_comp_on"
/obj/machinery/computer/mech_bay_power_console/Initialize()
. = ..()
reconnect()
-678
View File
@@ -1,678 +0,0 @@
/obj/machinery/mecha_part_fabricator
icon = 'icons/obj/robotics.dmi'
icon_state = "fab-idle"
name = "exosuit fabricator"
desc = "Nothing is being built."
density = TRUE
use_power = IDLE_POWER_USE
idle_power_usage = 20
active_power_usage = 5000
req_access = list(ACCESS_ROBOTICS)
circuit = /obj/item/circuitboard/machine/mechfab
// processing_flags = START_PROCESSING_MANUALLY
// subsystem_type = /datum/controller/subsystem/processing/fastprocess
/// Current items in the build queue.
var/list/queue = list()
/// Whether or not the machine is building the entire queue automagically.
var/process_queue = FALSE
/// The current design datum that the machine is building.
var/datum/design/being_built
/// World time when the build will finish.
var/build_finish = 0
/// World time when the build started.
var/build_start = 0
/// Reference to all materials used in the creation of the item being_built.
var/list/build_materials
/// Part currently stored in the Exofab.
var/obj/item/stored_part
/// Coefficient for the speed of item building. Based on the installed parts.
var/time_coeff = 1
/// Coefficient for the efficiency of material usage in item building. Based on the installed parts.
var/component_coeff = 1
/// Copy of the currently synced techweb.
var/datum/techweb/specialized/autounlocking/exofab/stored_research
/// Whether the Exofab links to the ore silo on init. Special derelict or maintanance variants should set this to FALSE.
var/link_on_init = TRUE
/// Reference to a remote material inventory, such as an ore silo.
var/datum/component/remote_materials/rmat
/// A list of categories that valid MECHFAB design datums will broadly categorise themselves under.
var/list/part_sets = list(
"Cyborg",
"Ripley",
"Firefighter",
"Odysseus",
"Gygax",
"Medical-Spec Gygax",
"Durand",
"H.O.N.K",
"Phazon",
"Exosuit Equipment",
"Exosuit Ammunition",
"Cyborg Upgrade Modules",
"Cybernetics",
"Implants",
"Control Interfaces",
"Misc"
)
/obj/machinery/mecha_part_fabricator/Initialize(mapload)
stored_research = new
rmat = AddComponent(/datum/component/remote_materials, "mechfab", mapload && link_on_init, _after_insert=CALLBACK(src, .proc/AfterMaterialInsert))
RefreshParts() //Recalculating local material sizes if the fab isn't linked
return ..()
/obj/machinery/mecha_part_fabricator/RefreshParts()
var/T = 0
//maximum stocking amount (default 300000, 600000 at T4)
for(var/obj/item/stock_parts/matter_bin/M in component_parts)
T += M.rating
rmat.set_local_size((200000 + (T*50000)))
//resources adjustment coefficient (1 -> 0.85 -> 0.7 -> 0.55)
T = 1.15
for(var/obj/item/stock_parts/micro_laser/Ma in component_parts)
T -= Ma.rating*0.15
component_coeff = T
//building time adjustment coefficient (1 -> 0.8 -> 0.6)
T = -1
for(var/obj/item/stock_parts/manipulator/Ml in component_parts)
T += Ml.rating
time_coeff = round(initial(time_coeff) - (initial(time_coeff)*(T))/5,0.01)
// Adjust the build time of any item currently being built.
if(being_built)
var/last_const_time = build_finish - build_start
var/new_const_time = get_construction_time_w_coeff(initial(being_built.construction_time))
var/const_time_left = build_finish - world.time
var/new_build_time = (new_const_time / last_const_time) * const_time_left
build_finish = world.time + new_build_time
update_static_data(usr)
/obj/machinery/mecha_part_fabricator/examine(mob/user)
. = ..()
if(in_range(user, src) || isobserver(user))
. += "<span class='notice'>The status display reads: Storing up to <b>[rmat.local_size]</b> material units.<br>Material consumption at <b>[component_coeff*100]%</b>.<br>Build time reduced by <b>[100-time_coeff*100]%</b>.</span>"
/**
* Generates an info list for a given part.
*
* Returns a list of part information.
* * D - Design datum to get information on.
* * categories - Boolean, whether or not to parse snowflake categories into the part information list.
*/
/obj/machinery/mecha_part_fabricator/proc/output_part_info(datum/design/D, categories = FALSE)
var/cost = list()
for(var/c in D.materials)
var/datum/material/M = c
cost[M.name] = get_resource_cost_w_coeff(D, M)
var/obj/built_item = D.build_path
var/list/category_override = null
var/list/sub_category = null
if(categories)
// Handle some special cases to build up sub-categories for the fab interface.
// Start with checking if this design builds a cyborg module.
if(built_item in typesof(/obj/item/borg/upgrade))
var/obj/item/borg/upgrade/U = built_item
var/module_types = initial(U.module_flags)
sub_category = list()
if(module_types)
if(module_types & BORG_MODULE_SECURITY)
sub_category += "Security"
if(module_types & BORG_MODULE_MINER)
sub_category += "Mining"
if(module_types & BORG_MODULE_JANITOR)
sub_category += "Janitor"
if(module_types & BORG_MODULE_MEDICAL)
sub_category += "Medical"
if(module_types & BORG_MODULE_ENGINEERING)
sub_category += "Engineering"
else
sub_category += "All Cyborgs"
// Else check if this design builds a piece of exosuit equipment.
else if(built_item in typesof(/obj/item/mecha_parts/mecha_equipment))
var/obj/item/mecha_parts/mecha_equipment/E = built_item
var/mech_types = initial(E.mech_flags)
sub_category = "Equipment"
if(mech_types)
category_override = list()
if(mech_types & EXOSUIT_MODULE_RIPLEY)
category_override += "Ripley"
if(mech_types & EXOSUIT_MODULE_FIREFIGHTER)
category_override += "Firefighter"
if(mech_types & EXOSUIT_MODULE_ODYSSEUS)
category_override += "Odysseus"
// if(mech_types & EXOSUIT_MODULE_CLARKE)
// category_override += "Clarke"
if(mech_types & EXOSUIT_MODULE_GYGAX_MED)
category_override += "Medical-Spec Gygax"
if(mech_types & EXOSUIT_MODULE_GYGAX)
category_override += "Gygax"
if(mech_types & EXOSUIT_MODULE_DURAND)
category_override += "Durand"
if(mech_types & EXOSUIT_MODULE_HONK)
category_override += "H.O.N.K"
if(mech_types & EXOSUIT_MODULE_PHAZON)
category_override += "Phazon"
var/list/part = list(
"name" = D.name,
"desc" = initial(built_item.desc),
"printTime" = get_construction_time_w_coeff(initial(D.construction_time))/10,
"cost" = cost,
"id" = D.id,
"subCategory" = sub_category,
"categoryOverride" = category_override,
"searchMeta" = "UNKNOWN"//D.search_metadata
)
return part
/**
* Generates a list of resources / materials available to this Exosuit Fab
*
* Returns null if there is no material container available.
* List format is list(material_name = list(amount = ..., ref = ..., etc.))
*/
/obj/machinery/mecha_part_fabricator/proc/output_available_resources()
var/datum/component/material_container/materials = rmat.mat_container
var/list/material_data = list()
if(materials)
for(var/mat_id in materials.materials)
var/datum/material/M = mat_id
var/list/material_info = list()
var/amount = materials.materials[mat_id]
material_info = list(
"name" = M.name,
"ref" = REF(M),
"amount" = amount,
"sheets" = round(amount / MINERAL_MATERIAL_AMOUNT),
"removable" = amount >= MINERAL_MATERIAL_AMOUNT
)
material_data += list(material_info)
return material_data
return null
/**
* Intended to be called when an item starts printing.
*
* Adds the overlay to show the fab working and sets active power usage settings.
*/
/obj/machinery/mecha_part_fabricator/proc/on_start_printing()
add_overlay("fab-active")
use_power = ACTIVE_POWER_USE
/**
* Intended to be called when the exofab has stopped working and is no longer printing items.
*
* Removes the overlay to show the fab working and sets idle power usage settings. Additionally resets the description and turns off queue processing.
*/
/obj/machinery/mecha_part_fabricator/proc/on_finish_printing()
cut_overlay("fab-active")
use_power = IDLE_POWER_USE
desc = initial(desc)
process_queue = FALSE
/**
* Calculates resource/material costs for printing an item based on the machine's resource coefficient.
*
* Returns a list of k,v resources with their amounts.
* * D - Design datum to calculate the modified resource cost of.
*/
/obj/machinery/mecha_part_fabricator/proc/get_resources_w_coeff(datum/design/D)
var/list/resources = list()
for(var/R in D.materials)
var/datum/material/M = R
resources[M] = get_resource_cost_w_coeff(D, M)
return resources
/**
* Checks if the Exofab has enough resources to print a given item.
*
* Returns FALSE if the design has no reagents used in its construction (?) or if there are insufficient resources.
* Returns TRUE if there are sufficient resources to print the item.
* * D - Design datum to calculate the modified resource cost of.
*/
/obj/machinery/mecha_part_fabricator/proc/check_resources(datum/design/D)
if(length(D.reagents_list)) // No reagents storage - no reagent designs.
return FALSE
var/datum/component/material_container/materials = rmat.mat_container
if(materials.has_materials(get_resources_w_coeff(D)))
return TRUE
return FALSE
/**
* Attempts to build the next item in the build queue.
*
* Returns FALSE if either there are no more parts to build or the next part is not buildable.
* Returns TRUE if the next part has started building.
* * verbose - Whether the machine should use say() procs. Set to FALSE to disable the machine saying reasons for failure to build.
*/
/obj/machinery/mecha_part_fabricator/proc/build_next_in_queue(verbose = TRUE)
if(!length(queue))
return FALSE
var/datum/design/D = queue[1]
if(build_part(D, verbose))
remove_from_queue(1)
return TRUE
return FALSE
/**
* Starts the build process for a given design datum.
*
* Returns FALSE if the procedure fails. Returns TRUE when being_built is set.
* Uses materials.
* * D - Design datum to attempt to print.
* * verbose - Whether the machine should use say() procs. Set to FALSE to disable the machine saying reasons for failure to build.
*/
/obj/machinery/mecha_part_fabricator/proc/build_part(datum/design/D, verbose = TRUE)
if(!D)
return FALSE
var/datum/component/material_container/materials = rmat.mat_container
if (!materials)
if(verbose)
say("No access to material storage, please contact the quartermaster.")
return FALSE
if (rmat.on_hold())
if(verbose)
say("Mineral access is on hold, please contact the quartermaster.")
return FALSE
if(!check_resources(D))
if(verbose)
say("Not enough resources. Processing stopped.")
return FALSE
build_materials = get_resources_w_coeff(D)
materials.use_materials(build_materials)
being_built = D
build_finish = world.time + get_construction_time_w_coeff(initial(D.construction_time))
build_start = world.time
desc = "It's building \a [D.name]."
rmat.silo_log(src, "built", -1, "[D.name]", build_materials)
return TRUE
/obj/machinery/mecha_part_fabricator/process()
// If there's a stored part to dispense due to an obstruction, try to dispense it.
if(stored_part)
var/turf/exit = get_step(src,(dir))
if(exit.density)
return TRUE
say("Obstruction cleared. \The [stored_part] is complete.")
stored_part.forceMove(exit)
stored_part = null
// If there's nothing being built, try to build something
if(!being_built)
// If we're not processing the queue anymore or there's nothing to build, end processing.
if(!process_queue || !build_next_in_queue())
on_finish_printing()
STOP_PROCESSING(SSfastprocess, src)
//end_processing()
return TRUE
on_start_printing()
// If there's an item being built, check if it is complete.
if(being_built && (build_finish < world.time))
// Then attempt to dispense it and if appropriate build the next item.
dispense_built_part(being_built)
if(process_queue)
build_next_in_queue(FALSE)
return TRUE
/**
* Dispenses a part to the tile infront of the Exosuit Fab.
*
* Returns FALSE is the machine cannot dispense the part on the appropriate turf.
* Return TRUE if the part was successfully dispensed.
* * D - Design datum to attempt to dispense.
*/
/obj/machinery/mecha_part_fabricator/proc/dispense_built_part(datum/design/D)
var/obj/item/I = new D.build_path(src)
// I.material_flags |= MATERIAL_NO_EFFECTS //Find a better way to do this.
I.set_custom_materials(build_materials)
being_built = null
var/turf/exit = get_step(src,(dir))
if(exit.density)
say("Error! Part outlet is obstructed.")
desc = "It's trying to dispense \a [D.name], but the part outlet is obstructed."
stored_part = I
return FALSE
say("\The [I] is complete.")
I.forceMove(exit)
return TRUE
/**
* Adds a list of datum designs to the build queue.
*
* Will only add designs that are in this machine's stored techweb.
* Does final checks for datum IDs and makes sure this machine can build the designs.
* * part_list - List of datum design ids for designs to add to the queue.
*/
/obj/machinery/mecha_part_fabricator/proc/add_part_set_to_queue(list/part_list)
for(var/v in stored_research.researched_designs)
var/datum/design/D = SSresearch.techweb_design_by_id(v)
if((D.build_type & MECHFAB) && (D.id in part_list))
add_to_queue(D)
/**
* Adds a datum design to the build queue.
*
* Returns TRUE if successful and FALSE if the design was not added to the queue.
* * D - Datum design to add to the queue.
*/
/obj/machinery/mecha_part_fabricator/proc/add_to_queue(datum/design/D)
if(!istype(queue))
queue = list()
if(D)
queue[++queue.len] = D
return TRUE
return FALSE
/**
* Removes datum design from the build queue based on index.
*
* Returns TRUE if successful and FALSE if a design was not removed from the queue.
* * index - Index in the build queue of the element to remove.
*/
/obj/machinery/mecha_part_fabricator/proc/remove_from_queue(index)
if(!isnum(index) || !ISINTEGER(index) || !istype(queue) || (index<1 || index>length(queue)))
return FALSE
queue.Cut(index,++index)
return TRUE
/**
* Generates a list of parts formatted for tgui based on the current build queue.
*
* Returns a formatted list of lists containing formatted part information for every part in the build queue.
*/
/obj/machinery/mecha_part_fabricator/proc/list_queue()
if(!istype(queue) || !length(queue))
return null
var/list/queued_parts = list()
for(var/datum/design/D in queue)
var/list/part = output_part_info(D)
queued_parts += list(part)
return queued_parts
/**
* Syncs machine with R&D servers.
*
* Requires an R&D Console visible within 7 tiles. Copies techweb research. Updates tgui's state data.
*/
/obj/machinery/mecha_part_fabricator/proc/sync()
for(var/obj/machinery/computer/rdconsole/RDC in orange(7,src))
RDC.stored_research.copy_research_to(stored_research)
update_static_data(usr)
say("Successfully synchronized with R&D server.")
return
say("Unable to connect to local R&D server.")
return
/**
* Calculates the coefficient-modified resource cost of a single material component of a design's recipe.
*
* Returns coefficient-modified resource cost for the given material component.
* * D - Design datum to pull the resource cost from.
* * resource - Material datum reference to the resource to calculate the cost of.
* * roundto - Rounding value for round() proc
*/
/obj/machinery/mecha_part_fabricator/proc/get_resource_cost_w_coeff(datum/design/D, var/datum/material/resource, roundto = 1)
return round(D.materials[resource]*component_coeff, roundto)
/**
* Calculates the coefficient-modified build time of a design.
*
* Returns coefficient-modified build time of a given design.
* * D - Design datum to calculate the modified build time of.
* * roundto - Rounding value for round() proc
*/
/obj/machinery/mecha_part_fabricator/proc/get_construction_time_w_coeff(construction_time, roundto = 1) //aran
return round(construction_time*time_coeff, roundto)
/obj/machinery/mecha_part_fabricator/ui_assets(mob/user)
return list(
get_asset_datum(/datum/asset/spritesheet/sheetmaterials)
)
/obj/machinery/mecha_part_fabricator/ui_interact(mob/user, datum/tgui/ui)
ui = SStgui.try_update_ui(user, src, ui)
if(!ui)
ui = new(user, src, "ExosuitFabricator")
ui.open()
/obj/machinery/mecha_part_fabricator/ui_static_data(mob/user)
var/list/data = list()
var/list/final_sets = list()
var/list/buildable_parts = list()
for(var/part_set in part_sets)
final_sets += part_set
for(var/v in stored_research.researched_designs)
var/datum/design/D = SSresearch.techweb_design_by_id(v)
if(D.build_type & MECHFAB)
// This is for us.
var/list/part = output_part_info(D, TRUE)
if(part["category_override"])
for(var/cat in part["category_override"])
buildable_parts[cat] += list(part)
if(!(cat in part_sets))
final_sets += cat
continue
for(var/cat in part_sets)
// Find all matching categories.
if(!(cat in D.category))
continue
buildable_parts[cat] += list(part)
data["partSets"] = final_sets
data["buildableParts"] = buildable_parts
return data
/obj/machinery/mecha_part_fabricator/ui_data(mob/user)
var/list/data = list()
data["materials"] = output_available_resources()
if(being_built)
var/list/part = list(
"name" = being_built.name,
"duration" = build_finish - world.time,
"printTime" = get_construction_time_w_coeff(initial(being_built.construction_time))
)
data["buildingPart"] = part
else
data["buildingPart"] = null
data["queue"] = list_queue()
if(stored_part)
data["storedPart"] = stored_part.name
else
data["storedPart"] = null
data["isProcessingQueue"] = process_queue
return data
/obj/machinery/mecha_part_fabricator/ui_act(action, var/list/params)
if(..())
return TRUE
. = TRUE
add_fingerprint(usr)
usr.set_machine(src)
switch(action)
if("sync_rnd")
// Sync with R&D Servers
sync()
return
if("add_queue_set")
// Add all parts of a set to queue
var/part_list = params["part_list"]
add_part_set_to_queue(part_list)
return
if("add_queue_part")
// Add a specific part to queue
var/T = params["id"]
for(var/v in stored_research.researched_designs)
var/datum/design/D = SSresearch.techweb_design_by_id(v)
if((D.build_type & MECHFAB) && (D.id == T))
add_to_queue(D)
break
return
if("del_queue_part")
// Delete a specific from from the queue
var/index = text2num(params["index"])
remove_from_queue(index)
return
if("clear_queue")
// Delete everything from queue
queue.Cut()
return
if("build_queue")
// Build everything in queue
if(process_queue)
return
process_queue = TRUE
if(!being_built)
START_PROCESSING(SSfastprocess, src)
//begin_processing()
return
if("stop_queue")
// Pause queue building. Also known as stop.
process_queue = FALSE
return
if("build_part")
// Build a single part
if(being_built || process_queue)
return
var/id = params["id"]
var/datum/design/D = SSresearch.techweb_design_by_id(id)
if(!(D.build_type & MECHFAB) || !(D.id == id))
return
if(build_part(D))
on_start_printing()
START_PROCESSING(SSfastprocess, src)
//begin_processing() teege has this as a helper proc. please port it!
return
if("move_queue_part")
// Moves a part up or down in the queue.
var/index = text2num(params["index"])
var/new_index = index + text2num(params["newindex"])
if(isnum(index) && isnum(new_index) && ISINTEGER(index) && ISINTEGER(new_index))
if(ISINRANGE(new_index,1,length(queue)))
queue.Swap(index,new_index)
return
if("remove_mat")
// Remove a material from the fab
var/mat_ref = params["ref"]
var/amount = text2num(params["amount"])
var/datum/material/mat = locate(mat_ref)
eject_sheets(mat, amount)
return
return FALSE
/**
* Eject material sheets.
*
* Returns the number of sheets successfully ejected.
* eject_sheet - Byond REF of the material to eject.
* eject_amt - Number of sheets to attempt to eject.
*/
/obj/machinery/mecha_part_fabricator/proc/eject_sheets(eject_sheet, eject_amt)
var/datum/component/material_container/mat_container = rmat.mat_container
if (!mat_container)
say("No access to material storage, please contact the quartermaster.")
return 0
if (rmat.on_hold())
say("Mineral access is on hold, please contact the quartermaster.")
return 0
var/count = mat_container.retrieve_sheets(text2num(eject_amt), eject_sheet, drop_location())
var/list/matlist = list()
matlist[eject_sheet] = text2num(eject_amt)
rmat.silo_log(src, "ejected", -count, "sheets", matlist)
return count
/obj/machinery/mecha_part_fabricator/proc/AfterMaterialInsert(item_inserted, id_inserted, amount_inserted)
var/datum/material/M = id_inserted
add_overlay("fab-load-[M.name]")
addtimer(CALLBACK(src, /atom/proc/cut_overlay, "fab-load-[M.name]"), 10)
/obj/machinery/mecha_part_fabricator/screwdriver_act(mob/living/user, obj/item/I)
if(..())
return TRUE
if(being_built)
to_chat(user, "<span class='warning'>\The [src] is currently processing! Please wait until completion.</span>")
return FALSE
return default_deconstruction_screwdriver(user, "fab-o", "fab-idle", I)
/obj/machinery/mecha_part_fabricator/crowbar_act(mob/living/user, obj/item/I)
if(..())
return TRUE
if(being_built)
to_chat(user, "<span class='warning'>\The [src] is currently processing! Please wait until completion.</span>")
return FALSE
return default_deconstruction_crowbar(I)
/obj/machinery/mecha_part_fabricator/proc/is_insertion_ready(mob/user)
if(panel_open)
to_chat(user, "<span class='warning'>You can't load [src] while it's opened!</span>")
return FALSE
if(being_built)
to_chat(user, "<span class='warning'>\The [src] is currently processing! Please wait until completion.</span>")
return FALSE
return TRUE
/obj/machinery/mecha_part_fabricator/maint
link_on_init = FALSE
/obj/machinery/mecha_part_fabricator/offstation
link_on_init = FALSE
File diff suppressed because it is too large Load Diff
-285
View File
@@ -1,285 +0,0 @@
//////////////////////////////////////// Action Buttons ///////////////////////////////////////////////
/obj/mecha/proc/GrantActions(mob/living/user, human_occupant = 0)
if(human_occupant)
eject_action.Grant(user, src)
internals_action.Grant(user, src)
cycle_action.Grant(user, src)
lights_action.Grant(user, src)
stats_action.Grant(user, src)
strafing_action.Grant(user, src)
/obj/mecha/proc/RemoveActions(mob/living/user, human_occupant = 0)
if(human_occupant)
eject_action.Remove(user)
internals_action.Remove(user)
cycle_action.Remove(user)
lights_action.Remove(user)
stats_action.Remove(user)
strafing_action.Remove(user)
/datum/action/innate/mecha
check_flags = AB_CHECK_RESTRAINED | AB_CHECK_STUN | AB_CHECK_CONSCIOUS
icon_icon = 'icons/mob/actions/actions_mecha.dmi'
var/obj/mecha/chassis
/datum/action/innate/mecha/Grant(mob/living/L, obj/mecha/M)
if(M)
chassis = M
..()
/datum/action/innate/mecha/Destroy()
chassis = null
return ..()
/datum/action/innate/mecha/mech_eject
name = "Eject From Mech"
button_icon_state = "mech_eject"
/datum/action/innate/mecha/mech_eject/Activate()
if(!owner)
return
if(!chassis || chassis.occupant != owner)
return
chassis.go_out()
/datum/action/innate/mecha/mech_toggle_internals
name = "Toggle Internal Airtank Usage"
button_icon_state = "mech_internals_off"
/datum/action/innate/mecha/mech_toggle_internals/Activate()
if(!owner || !chassis || chassis.occupant != owner)
return
chassis.use_internal_tank = !chassis.use_internal_tank
button_icon_state = "mech_internals_[chassis.use_internal_tank ? "on" : "off"]"
chassis.occupant_message("Now taking air from [chassis.use_internal_tank?"internal airtank":"environment"].")
chassis.mecha_log_message("Now taking air from [chassis.use_internal_tank?"internal airtank":"environment"].")
UpdateButtonIcon()
/datum/action/innate/mecha/mech_cycle_equip
name = "Cycle Equipment"
button_icon_state = "mech_cycle_equip_off"
/datum/action/innate/mecha/mech_cycle_equip/Activate()
if(!owner || !chassis || chassis.occupant != owner)
return
var/list/available_equipment = list()
for(var/obj/item/mecha_parts/mecha_equipment/M in chassis.equipment)
if(M.selectable)
available_equipment += M
if(available_equipment.len == 0)
chassis.occupant_message("No equipment available.")
return
if(!chassis.selected)
chassis.selected = available_equipment[1]
chassis.occupant_message("You select [chassis.selected]")
send_byjax(chassis.occupant,"exosuit.browser","eq_list",chassis.get_equipment_list())
button_icon_state = "mech_cycle_equip_on"
UpdateButtonIcon()
return
var/number = 0
for(var/A in available_equipment)
number++
if(A == chassis.selected)
if(available_equipment.len == number)
chassis.selected = null
chassis.occupant_message("You switch to no equipment")
button_icon_state = "mech_cycle_equip_off"
else
chassis.selected = available_equipment[number+1]
chassis.occupant_message("You switch to [chassis.selected]")
button_icon_state = "mech_cycle_equip_on"
send_byjax(chassis.occupant,"exosuit.browser","eq_list",chassis.get_equipment_list())
UpdateButtonIcon()
return
/datum/action/innate/mecha/mech_toggle_lights
name = "Toggle Lights"
button_icon_state = "mech_lights_off"
/datum/action/innate/mecha/mech_toggle_lights/Activate()
if(!owner || !chassis || chassis.occupant != owner)
return
chassis.lights = !chassis.lights
if(chassis.lights)
chassis.set_light(chassis.lights_power)
button_icon_state = "mech_lights_on"
else
chassis.set_light(-chassis.lights_power)
button_icon_state = "mech_lights_off"
chassis.occupant_message("Toggled lights [chassis.lights?"on":"off"].")
chassis.mecha_log_message("Toggled lights [chassis.lights?"on":"off"].")
UpdateButtonIcon()
/datum/action/innate/mecha/mech_view_stats
name = "View Stats"
button_icon_state = "mech_view_stats"
/datum/action/innate/mecha/mech_view_stats/Activate()
if(!owner || !chassis || chassis.occupant != owner)
return
chassis.occupant << browse(chassis.get_stats_html(), "window=exosuit")
/datum/action/innate/mecha/strafe
name = "Toggle Strafing. Disabled when Alt is held."
button_icon_state = "strafe"
/datum/action/innate/mecha/strafe/Activate()
if(!owner || !chassis || chassis.occupant != owner)
return
chassis.toggle_strafe()
/obj/mecha/AltClick(mob/living/user)
. = ..()
if((user == occupant) && user.canUseTopic(src))
toggle_strafe()
return TRUE
/obj/mecha/proc/toggle_strafe()
strafe = !strafe
occupant_message("Toggled strafing mode [strafe?"on":"off"].")
mecha_log_message("Toggled strafing mode [strafe?"on":"off"].")
strafing_action.UpdateButtonIcon()
//////////////////////////////////////// Specific Ability Actions ///////////////////////////////////////////////
//Need to be granted by the mech type, Not default abilities.
/datum/action/innate/mecha/mech_toggle_thrusters
name = "Toggle Thrusters"
button_icon_state = "mech_thrusters_off"
/datum/action/innate/mecha/mech_toggle_thrusters/Activate()
if(!owner || !chassis || chassis.occupant != owner)
return
if(chassis.get_charge() > 0)
chassis.thrusters_active = !chassis.thrusters_active
button_icon_state = "mech_thrusters_[chassis.thrusters_active ? "on" : "off"]"
chassis.mecha_log_message("Toggled thrusters.")
chassis.occupant_message("<font color='[chassis.thrusters_active ?"blue":"red"]'>Thrusters [chassis.thrusters_active ?"en":"dis"]abled.")
/datum/action/innate/mecha/mech_defence_mode
name = "Toggle Defence Mode"
button_icon_state = "mech_defense_mode_off"
/datum/action/innate/mecha/mech_defence_mode/Activate(forced_state = null)
if(!owner || !chassis || chassis.occupant != owner)
return
if(!isnull(forced_state))
chassis.defence_mode = forced_state
else
chassis.defence_mode = !chassis.defence_mode
button_icon_state = "mech_defense_mode_[chassis.defence_mode ? "on" : "off"]"
if(chassis.defence_mode)
chassis.deflect_chance = chassis.defence_mode_deflect_chance
chassis.occupant_message("<span class='notice'>You enable [chassis] defence mode.</span>")
else
chassis.deflect_chance = initial(chassis.deflect_chance)
chassis.occupant_message("<span class='danger'>You disable [chassis] defence mode.</span>")
chassis.mecha_log_message("Toggled defence mode.")
UpdateButtonIcon()
/datum/action/innate/mecha/mech_overload_mode
name = "Toggle leg actuators overload"
button_icon_state = "mech_overload_off"
/datum/action/innate/mecha/mech_overload_mode/Activate(forced_state = null)
if(!owner || !chassis || chassis.occupant != owner)
return
if(!isnull(forced_state))
chassis.leg_overload_mode = forced_state
else
chassis.leg_overload_mode = !chassis.leg_overload_mode
button_icon_state = "mech_overload_[chassis.leg_overload_mode ? "on" : "off"]"
chassis.mecha_log_message("Toggled leg actuators overload.")
if(chassis.leg_overload_mode)
chassis.leg_overload_mode = 1
chassis.bumpsmash = 1
chassis.step_in = min(1, round(chassis.step_in/2))
chassis.step_energy_drain = max(chassis.overload_step_energy_drain_min,chassis.step_energy_drain*chassis.leg_overload_coeff)
chassis.occupant_message("<span class='danger'>You enable leg actuators overload.</span>")
else
chassis.leg_overload_mode = 0
chassis.bumpsmash = 0
chassis.step_in = initial(chassis.step_in)
chassis.step_energy_drain = chassis.normal_step_energy_drain
chassis.occupant_message("<span class='notice'>You disable leg actuators overload.</span>")
UpdateButtonIcon()
/datum/action/innate/mecha/mech_smoke
name = "Smoke"
button_icon_state = "mech_smoke"
/datum/action/innate/mecha/mech_smoke/Activate()
if(!owner || !chassis || chassis.occupant != owner)
return
if(chassis.smoke_ready && chassis.smoke>0)
chassis.smoke_system.start()
chassis.smoke--
chassis.smoke_ready = 0
spawn(chassis.smoke_cooldown)
chassis.smoke_ready = 1
/datum/action/innate/mecha/mech_zoom
name = "Zoom"
button_icon_state = "mech_zoom_off"
/datum/action/innate/mecha/mech_zoom/Activate()
if(!owner || !chassis || chassis.occupant != owner)
return
if(owner.client)
chassis.zoom_mode = !chassis.zoom_mode
button_icon_state = "mech_zoom_[chassis.zoom_mode ? "on" : "off"]"
chassis.mecha_log_message("Toggled zoom mode.")
chassis.occupant_message("<font color='[chassis.zoom_mode?"blue":"red"]'>Zoom mode [chassis.zoom_mode?"en":"dis"]abled.</font>")
if(chassis.zoom_mode)
owner.client.view_size.setTo(4.5)
SEND_SOUND(owner, sound('sound/mecha/imag_enh.ogg',volume=50))
else
owner.client.view_size.resetToDefault()
UpdateButtonIcon()
/datum/action/innate/mecha/mech_switch_damtype
name = "Reconfigure arm microtool arrays"
button_icon_state = "mech_damtype_brute"
/datum/action/innate/mecha/mech_switch_damtype/Activate()
if(!owner || !chassis || chassis.occupant != owner)
return
var/new_damtype
switch(chassis.damtype)
if("tox")
new_damtype = "brute"
chassis.occupant_message("Your exosuit's hands form into fists.")
if("brute")
new_damtype = "fire"
chassis.occupant_message("A torch tip extends from your exosuit's hand, glowing red.")
if("fire")
new_damtype = "tox"
chassis.occupant_message("A bone-chillingly thick plasteel needle protracts from the exosuit's palm.")
chassis.damtype = new_damtype
button_icon_state = "mech_damtype_[new_damtype]"
playsound(src, 'sound/mecha/mechmove01.ogg', 50, 1)
UpdateButtonIcon()
/datum/action/innate/mecha/mech_toggle_phasing
name = "Toggle Phasing"
button_icon_state = "mech_phasing_off"
/datum/action/innate/mecha/mech_toggle_phasing/Activate()
if(!owner || !chassis || chassis.occupant != owner)
return
chassis.phasing = !chassis.phasing
button_icon_state = "mech_phasing_[chassis.phasing ? "on" : "off"]"
chassis.occupant_message("<font color=\"[chassis.phasing?"#00f\">En":"#f00\">Dis"]abled phasing.</font>")
UpdateButtonIcon()
File diff suppressed because it is too large Load Diff
-161
View File
@@ -1,161 +0,0 @@
/obj/machinery/computer/mecha
name = "exosuit control console"
desc = "Used to remotely locate or lockdown exosuits."
icon_screen = "mecha"
icon_keyboard = "tech_key"
req_access = list(ACCESS_ROBOTICS)
circuit = /obj/item/circuitboard/computer/mecha_control
/obj/machinery/computer/mecha/ui_interact(mob/user, datum/tgui/ui)
ui = SStgui.try_update_ui(user, src, ui)
if(!ui)
ui = new(user, src, "ExosuitControlConsole", name)
ui.open()
/obj/machinery/computer/mecha/ui_data(mob/user)
var/list/data = list()
var/list/trackerlist = list()
for(var/obj/mecha/MC in GLOB.mechas_list)
trackerlist += MC.trackers
data["mechs"] = list()
for(var/obj/item/mecha_parts/mecha_tracking/MT in trackerlist)
if(!MT.chassis)
continue
var/obj/mecha/M = MT.chassis
var/list/mech_data = list(
name = M.name,
integrity = round((M.obj_integrity / M.max_integrity) * 100),
charge = M.cell ? round(M.cell.percent()) : null,
airtank = M.internal_tank ? M.return_pressure() : null,
pilot = list(M.occupant),
location = get_area_name(M, TRUE),
active_equipment = M.selected,
emp_recharging = MT.recharging,
tracker_ref = REF(MT)
)
if(istype(M, /obj/mecha/working/ripley))
var/obj/mecha/working/ripley/RM = M
mech_data += list(
cargo_space = round((LAZYLEN(RM.cargo) / RM.cargo_capacity) * 100)
)
data["mechs"] += list(mech_data)
return data
/obj/machinery/computer/mecha/ui_act(action, params)
. = ..()
if(.)
return
switch(action)
if("send_message")
var/obj/item/mecha_parts/mecha_tracking/MT = locate(params["tracker_ref"])
if(!istype(MT))
return
var/message = stripped_input(usr, "Input message", "Transmit message")
var/obj/mecha/M = MT.chassis
if(trim(message) && M)
to_chat(M.occupant, message)
to_chat(usr, "<span class='notice'>Message sent.</span>")
. = TRUE
if("shock")
var/obj/item/mecha_parts/mecha_tracking/MT = locate(params["tracker_ref"])
if(!istype(MT))
return
var/obj/mecha/M = MT.chassis
if(M)
MT.shock()
log_game("[key_name(usr)] has activated remote EMP on exosuit [M], located at [loc_name(M)], which [M.occupant ? "has the occupants [M.occupant]." : "without a pilot."] ")
message_admins("[key_name_admin(usr)][ADMIN_FLW(usr)] has activated remote EMP on exosuit [M][ADMIN_JMP(M)], which is currently [M.occupant ? "occupied by [M.occupant][ADMIN_FLW(M)]." : "without a pilot."] ")
. = TRUE
/obj/item/mecha_parts/mecha_tracking
name = "exosuit tracking beacon"
desc = "Device used to transmit exosuit data."
icon = 'icons/obj/device.dmi'
icon_state = "motion2"
w_class = WEIGHT_CLASS_SMALL
/// If this beacon allows for AI control. Exists to avoid using istype() on checking
var/ai_beacon = FALSE
/// Cooldown variable for EMP pulsing
var/recharging = FALSE
/// The Mecha that this tracking beacon is attached to
var/obj/mecha/chassis
/**
* Returns a html formatted string describing attached mech status
*/
/obj/item/mecha_parts/mecha_tracking/proc/get_mecha_info()
if(!chassis)
return FALSE
var/cell_charge = chassis.get_charge()
var/answer = {"<b>Name:</b> [chassis.name]<br>
<b>Integrity:</b> [round((chassis.obj_integrity/chassis.max_integrity * 100), 0.01)]%<br>
<b>Cell Charge:</b> [isnull(cell_charge) ? "Not Found":"[chassis.cell.percent()]%"]<br>
<b>Airtank:</b> [chassis.internal_tank ? "[round(chassis.return_pressure(), 0.01)]" : "Not Equipped"] kPa<br>
<b>Pilot:</b> [chassis.occupant || "None"]<br>
<b>Location:</b> [get_area_name(chassis, TRUE) || "Unknown"]<br>
<b>Active Equipment:</b> [chassis.selected || "None"]"}
if(istype(chassis, /obj/mecha/working/ripley))
var/obj/mecha/working/ripley/RM = chassis
answer += "<br><b>Used Cargo Space:</b> [round((LAZYLEN(RM.cargo) / RM.cargo_capacity * 100), 0.01)]%"
return answer
/obj/item/mecha_parts/mecha_tracking/emp_act()
. = ..()
if(!(. & EMP_PROTECT_SELF))
qdel(src)
/obj/item/mecha_parts/mecha_tracking/Destroy()
if(chassis)
if(src in chassis.trackers)
chassis.trackers -= src
chassis = null
return ..()
/obj/item/mecha_parts/mecha_tracking/try_attach_part(mob/user, obj/mecha/M)
if(!..())
return
M.trackers += src
M.diag_hud_set_mechtracking()
chassis = M
/**
* Attempts to EMP mech that the tracker is attached to, if there is one and tracker is not on cooldown
*/
/obj/item/mecha_parts/mecha_tracking/proc/shock()
if(recharging)
return
if(chassis)
chassis.emp_act(80)
addtimer(CALLBACK(src, /obj/item/mecha_parts/mecha_tracking/proc/recharge), 5 SECONDS, TIMER_UNIQUE | TIMER_OVERRIDE)
recharging = TRUE
/**
* Resets recharge variable, allowing tracker to be EMP pulsed again
*/
/obj/item/mecha_parts/mecha_tracking/proc/recharge()
recharging = FALSE
/obj/item/mecha_parts/mecha_tracking/ai_control
name = "exosuit AI control beacon"
desc = "A device used to transmit exosuit data. Also allows active AI units to take control of said exosuit."
ai_beacon = TRUE
/obj/item/storage/box/mechabeacons
name = "exosuit tracking beacons"
/obj/item/storage/box/mechabeacons/PopulateContents()
..()
new /obj/item/mecha_parts/mecha_tracking(src)
new /obj/item/mecha_parts/mecha_tracking(src)
new /obj/item/mecha_parts/mecha_tracking(src)
new /obj/item/mecha_parts/mecha_tracking(src)
new /obj/item/mecha_parts/mecha_tracking(src)
new /obj/item/mecha_parts/mecha_tracking(src)
new /obj/item/mecha_parts/mecha_tracking(src)
-334
View File
@@ -1,334 +0,0 @@
/obj/mecha/proc/get_armour_facing(relative_dir)
switch(relative_dir)
if(180) // BACKSTAB!
return facing_modifiers[BACK_ARMOUR]
if(0, 45) // direct or 45 degrees off
return facing_modifiers[FRONT_ARMOUR]
return facing_modifiers[SIDE_ARMOUR] //if its not a front hit or back hit then assume its from the side
/obj/mecha/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1, attack_dir)
. = ..()
if(. && obj_integrity > 0)
spark_system.start()
switch(damage_flag)
if("fire")
check_for_internal_damage(list(MECHA_INT_FIRE,MECHA_INT_TEMP_CONTROL))
if("melee")
check_for_internal_damage(list(MECHA_INT_TEMP_CONTROL,MECHA_INT_TANK_BREACH,MECHA_INT_CONTROL_LOST))
else
check_for_internal_damage(list(MECHA_INT_FIRE,MECHA_INT_TEMP_CONTROL,MECHA_INT_TANK_BREACH,MECHA_INT_CONTROL_LOST,MECHA_INT_SHORT_CIRCUIT))
if(. >= 5 || prob(33))
occupant_message("<span class='userdanger'>Taking damage!</span>")
log_append_to_last("Took [damage_amount] points of damage. Damage type: \"[damage_type]\".",1)
/obj/mecha/run_obj_armor(damage_amount, damage_type, damage_flag = 0, attack_dir)
. = ..()
if(!damage_amount)
return 0
var/booster_deflection_modifier = 1
var/booster_damage_modifier = 1
if(damage_flag == "bullet" || damage_flag == "laser" || damage_flag == "energy")
for(var/obj/item/mecha_parts/mecha_equipment/antiproj_armor_booster/B in equipment)
if(B.projectile_react())
booster_deflection_modifier = B.deflect_coeff
booster_damage_modifier = B.damage_coeff
break
else if(damage_flag == "melee")
for(var/obj/item/mecha_parts/mecha_equipment/anticcw_armor_booster/B in equipment)
if(B.attack_react())
booster_deflection_modifier *= B.deflect_coeff
booster_damage_modifier *= B.damage_coeff
break
if(attack_dir)
var/facing_modifier = get_armour_facing(abs(dir2angle(dir) - dir2angle(attack_dir)))
booster_damage_modifier /= facing_modifier
booster_deflection_modifier *= facing_modifier
if(prob(deflect_chance * booster_deflection_modifier))
visible_message("<span class='danger'>[src]'s armour deflects the attack!</span>")
log_append_to_last("Armor saved.")
return 0
if(.)
. *= booster_damage_modifier
/obj/mecha/on_attack_hand(mob/living/user, act_intent = user.a_intent, unarmed_attack_flags)
user.do_attack_animation(src, ATTACK_EFFECT_PUNCH)
playsound(loc, 'sound/weapons/tap.ogg', 40, 1, -1)
user.visible_message("<span class='danger'>[user] hits [name]. Nothing happens</span>", null, null, COMBAT_MESSAGE_RANGE)
mecha_log_message("Attack by hand/paw. Attacker - [user].", color="red")
log_append_to_last("Armor saved.")
/obj/mecha/attack_paw(mob/user as mob)
return attack_hand(user)
/obj/mecha/attack_alien(mob/living/user)
mecha_log_message("Attack by alien. Attacker - [user].", color="red")
playsound(src.loc, 'sound/weapons/slash.ogg', 100, 1)
attack_generic(user, 15, BRUTE, "melee", 0)
/obj/mecha/attack_animal(mob/living/simple_animal/user)
mecha_log_message("Attack by simple animal. Attacker - [user].", color="red")
if(!user.melee_damage_upper && !user.obj_damage)
user.emote("custom", message = "[user.friendly_verb_continuous] [src].")
return 0
else
var/play_soundeffect = 1
if(user.environment_smash)
play_soundeffect = 0
playsound(src, 'sound/effects/bang.ogg', 50, 1)
var/animal_damage = rand(user.melee_damage_lower,user.melee_damage_upper)
if(user.obj_damage)
animal_damage = user.obj_damage
animal_damage = min(animal_damage, 20*user.environment_smash)
attack_generic(user, animal_damage, user.melee_damage_type, "melee", play_soundeffect)
log_combat(user, src, "attacked")
return 1
/obj/mecha/hulk_damage()
return 15
/obj/mecha/attack_hulk(mob/living/carbon/human/user)
. = ..()
if(.)
mecha_log_message("Attack by hulk. Attacker - [user].", color="red")
log_combat(user, src, "punched", "hulk powers")
/obj/mecha/blob_act(obj/structure/blob/B)
take_damage(30, BRUTE, "melee", 0, get_dir(src, B))
/obj/mecha/attack_tk()
return
/obj/mecha/hitby(atom/movable/AM, skipcatch, hitpush, blocked, datum/thrownthing/throwingdatum) //wrapper
mecha_log_message("Hit by [AM].", color="red")
. = ..()
/obj/mecha/bullet_act(obj/item/projectile/Proj) //wrapper
mecha_log_message("Hit by projectile. Type: [Proj.name]([Proj.flag]).", color="red")
. = ..()
/obj/mecha/ex_act(severity, target, origin)
mecha_log_message("Affected by explosion of severity: [severity].", color="red")
if(prob(deflect_chance))
severity++
log_append_to_last("Armor saved, changing severity to [severity].")
. = ..()
/obj/mecha/contents_explosion(severity, target, origin)
severity++
for(var/X in equipment)
var/obj/item/mecha_parts/mecha_equipment/ME = X
ME.ex_act(severity, target, origin)
for(var/Y in trackers)
var/obj/item/mecha_parts/mecha_tracking/MT = Y
MT.ex_act(severity, target, origin)
if(occupant)
occupant.ex_act(severity, target, origin)
/obj/mecha/handle_atom_del(atom/A)
if(A == occupant)
occupant = null
icon_state = initial(icon_state)+"-open"
setDir(dir_in)
/obj/mecha/emp_act(severity)
. = ..()
if (. & EMP_PROTECT_SELF)
return
if(get_charge())
use_power((cell.charge/3)*(severity*0.005))
take_damage(severity/3, BURN, "energy", 1)
mecha_log_message("EMP detected", color="red")
if(istype(src, /obj/mecha/combat))
mouse_pointer = 'icons/mecha/mecha_mouse-disable.dmi'
occupant?.update_mouse_pointer()
if(!equipment_disabled && occupant) //prevent spamming this message with back-to-back EMPs
to_chat(occupant, "<span=danger>Error -- Connection to equipment control unit has been lost.</span>")
addtimer(CALLBACK(src, /obj/mecha/proc/restore_equipment), 3 SECONDS, TIMER_UNIQUE | TIMER_OVERRIDE)
equipment_disabled = 1
/obj/mecha/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
if(exposed_temperature>max_temperature)
mecha_log_message("Exposed to dangerous temperature.", color="red")
take_damage(5, BURN, 0, 1)
/obj/mecha/attackby(obj/item/W as obj, mob/user as mob, params)
if(istype(W, /obj/item/mmi))
if(mmi_move_inside(W,user))
to_chat(user, "[src]-[W] interface initialized successfully.")
else
to_chat(user, "[src]-[W] interface initialization failed.")
return
if(istype(W, /obj/item/mecha_ammo))
ammo_resupply(W, user)
return
if(istype(W, /obj/item/mecha_parts/mecha_equipment))
var/obj/item/mecha_parts/mecha_equipment/E = W
spawn()
if(E.can_attach(src))
if(!user.temporarilyRemoveItemFromInventory(W))
return
E.attach(src)
user.visible_message("[user] attaches [W] to [src].", "<span class='notice'>You attach [W] to [src].</span>")
else
to_chat(user, "<span class='warning'>You were unable to attach [W] to [src]!</span>")
return
if(W.GetID())
if(add_req_access || maint_access)
if(internals_access_allowed(user))
var/obj/item/card/id/id_card
if(istype(W, /obj/item/card/id))
id_card = W
else
var/obj/item/pda/pda = W
id_card = pda.id
output_maintenance_dialog(id_card, user)
return
else
to_chat(user, "<span class='warning'>Invalid ID: Access denied.</span>")
else
to_chat(user, "<span class='warning'>Maintenance protocols disabled by operator.</span>")
else if(W.tool_behaviour == TOOL_WRENCH)
if(state==1)
state = 2
to_chat(user, "<span class='notice'>You undo the securing bolts.</span>")
else if(state==2)
state = 1
to_chat(user, "<span class='notice'>You tighten the securing bolts.</span>")
return
else if(W.tool_behaviour == TOOL_CROWBAR)
if(state==2)
state = 3
to_chat(user, "<span class='notice'>You open the hatch to the power unit.</span>")
else if(state==3)
state=2
to_chat(user, "<span class='notice'>You close the hatch to the power unit.</span>")
return
else if(istype(W, /obj/item/stack/cable_coil))
if(state == 3 && (internal_damage & MECHA_INT_SHORT_CIRCUIT))
if(W.use_tool(src, user, 0, 2))
clearInternalDamage(MECHA_INT_SHORT_CIRCUIT)
to_chat(user, "<span class='notice'>You replace the fused wires.</span>")
else
to_chat(user, "<span class='warning'>You need two lengths of cable to fix this mech!</span>")
return
else if(W.tool_behaviour == TOOL_SCREWDRIVER && user.a_intent != INTENT_HARM)
if(internal_damage & MECHA_INT_TEMP_CONTROL)
clearInternalDamage(MECHA_INT_TEMP_CONTROL)
to_chat(user, "<span class='notice'>You repair the damaged temperature controller.</span>")
else if(state==3 && cell)
cell.forceMove(loc)
cell = null
state = 4
to_chat(user, "<span class='notice'>You unscrew and pry out the powercell.</span>")
mecha_log_message("Powercell removed")
else if(state==4 && cell)
state=3
to_chat(user, "<span class='notice'>You screw the cell in place.</span>")
return
else if(istype(W, /obj/item/stock_parts/cell))
if(state==4)
if(!cell)
if(!user.transferItemToLoc(W, src))
return
var/obj/item/stock_parts/cell/C = W
to_chat(user, "<span class='notice'>You install the powercell.</span>")
cell = C
mecha_log_message("Powercell installed")
else
to_chat(user, "<span class='notice'>There's already a powercell installed.</span>")
return
else if(W.tool_behaviour == TOOL_WELDER && user.a_intent != INTENT_HARM)
user.DelayNextAction(CLICK_CD_MELEE)
if(obj_integrity < max_integrity)
if(W.use_tool(src, user, 0, volume=50, amount=1))
if (internal_damage & MECHA_INT_TANK_BREACH)
clearInternalDamage(MECHA_INT_TANK_BREACH)
to_chat(user, "<span class='notice'>You repair the damaged gas tank.</span>")
else
user.visible_message("<span class='notice'>[user] repairs some damage to [name].</span>", "<span class='notice'>You repair some damage to [src].</span>")
obj_integrity += min(10, max_integrity-obj_integrity)
if(obj_integrity == max_integrity)
to_chat(user, "<span class='notice'>It looks to be fully repaired now.</span>")
return 1
else
to_chat(user, "<span class='warning'>The [name] is at full integrity!</span>")
return 1
else if(istype(W, /obj/item/mecha_parts/mecha_tracking))
var/obj/item/mecha_parts/mecha_tracking/tracker = W
tracker.try_attach_part(user, src)
return
else
return ..()
/obj/mecha/attacked_by(obj/item/I, mob/living/user, attackchain_flags = NONE, damage_multiplier = 1)
mecha_log_message("Attacked by [I]. Attacker - [user]")
return ..()
/obj/mecha/proc/mech_toxin_damage(mob/living/target)
playsound(src, 'sound/effects/spray2.ogg', 50, 1)
if(target.reagents)
if(target.reagents.get_reagent_amount(/datum/reagent/cryptobiolin) + force < force*2)
target.reagents.add_reagent(/datum/reagent/cryptobiolin, force/2)
if(target.reagents.get_reagent_amount(/datum/reagent/toxin) + force < force*2)
target.reagents.add_reagent(/datum/reagent/toxin, force/2.5)
/obj/mecha/mech_melee_attack(obj/mecha/M)
if(!has_charge(melee_energy_drain))
return 0
use_power(melee_energy_drain)
if(M.damtype == BRUTE || M.damtype == BURN)
log_combat(M.occupant, src, "attacked", M, "(INTENT: [uppertext(M.occupant.a_intent)]) (DAMTYPE: [uppertext(M.damtype)])")
. = ..()
/obj/mecha/proc/full_repair(charge_cell)
obj_integrity = max_integrity
if(cell && charge_cell)
cell.charge = cell.maxcharge
if(internal_damage & MECHA_INT_FIRE)
clearInternalDamage(MECHA_INT_FIRE)
if(internal_damage & MECHA_INT_TEMP_CONTROL)
clearInternalDamage(MECHA_INT_TEMP_CONTROL)
if(internal_damage & MECHA_INT_SHORT_CIRCUIT)
clearInternalDamage(MECHA_INT_SHORT_CIRCUIT)
if(internal_damage & MECHA_INT_TANK_BREACH)
clearInternalDamage(MECHA_INT_TANK_BREACH)
if(internal_damage & MECHA_INT_CONTROL_LOST)
clearInternalDamage(MECHA_INT_CONTROL_LOST)
/obj/mecha/narsie_act()
emp_act(100)
/obj/mecha/ratvar_act()
if((GLOB.ratvar_awakens || GLOB.clockwork_gateway_activated) && occupant)
if(is_servant_of_ratvar(occupant)) //reward the minion that got a mech by repairing it
full_repair(TRUE)
else
var/mob/living/L = occupant
go_out(TRUE)
if(L)
L.ratvar_act()
/obj/mecha/do_attack_animation(atom/A, visual_effect_icon, obj/item/used_item, no_effect)
if(!no_effect)
if(selected)
used_item = selected
else if(!visual_effect_icon)
visual_effect_icon = ATTACK_EFFECT_SMASH
if(damtype == BURN)
visual_effect_icon = ATTACK_EFFECT_MECHFIRE
else if(damtype == TOX)
visual_effect_icon = ATTACK_EFFECT_MECHTOXIN
..()
-387
View File
@@ -1,387 +0,0 @@
/////////////////////////
////// Mecha Parts //////
/////////////////////////
/obj/item/mecha_parts
name = "mecha part"
icon = 'icons/mecha/mech_construct.dmi'
icon_state = "blank"
w_class = WEIGHT_CLASS_GIGANTIC
flags_1 = CONDUCT_1
/obj/item/mecha_parts/proc/try_attach_part(mob/user, obj/mecha/M) //For attaching parts to a finished mech
if(!user.transferItemToLoc(src, M))
to_chat(user, "<span class='warning'>\The [src] is stuck to your hand, you cannot put it in \the [M]!</span>")
return FALSE
user.visible_message("<span class='notice'>[user] attaches [src] to [M].</span>", "<span class='notice'>You attach [src] to [M].</span>")
return TRUE
/obj/item/mecha_parts/chassis
name = "Mecha Chassis"
icon_state = "backbone"
interaction_flags_item = NONE //Don't pick us up!!
var/construct_type
/obj/item/mecha_parts/chassis/Initialize()
. = ..()
if(construct_type)
AddComponent(construct_type)
/////////// Ripley
/obj/item/mecha_parts/chassis/ripley
name = "\improper Ripley chassis"
construct_type = /datum/component/construction/unordered/mecha_chassis/ripley
/obj/item/mecha_parts/part/ripley_torso
name = "\improper Ripley torso"
desc = "A torso part of Ripley APLU. Contains power unit, processing core and life support systems."
icon_state = "ripley_harness"
/obj/item/mecha_parts/part/ripley_left_arm
name = "\improper Ripley left arm"
desc = "A Ripley APLU left arm. Data and power sockets are compatible with most exosuit tools."
icon_state = "ripley_l_arm"
/obj/item/mecha_parts/part/ripley_right_arm
name = "\improper Ripley right arm"
desc = "A Ripley APLU right arm. Data and power sockets are compatible with most exosuit tools."
icon_state = "ripley_r_arm"
/obj/item/mecha_parts/part/ripley_left_leg
name = "\improper Ripley left leg"
desc = "A Ripley APLU left leg. Contains somewhat complex servodrives and balance maintaining systems."
icon_state = "ripley_l_leg"
/obj/item/mecha_parts/part/ripley_right_leg
name = "\improper Ripley right leg"
desc = "A Ripley APLU right leg. Contains somewhat complex servodrives and balance maintaining systems."
icon_state = "ripley_r_leg"
///////// Odysseus
/obj/item/mecha_parts/chassis/odysseus
name = "\improper Odysseus chassis"
construct_type = /datum/component/construction/unordered/mecha_chassis/odysseus
/obj/item/mecha_parts/part/odysseus_head
name = "\improper Odysseus head"
desc = "An Odysseus head. Contains an integrated medical HUD scanner."
icon_state = "odysseus_head"
/obj/item/mecha_parts/part/odysseus_torso
name = "\improper Odysseus torso"
desc="A torso part of Odysseus. Contains power unit, processing core and life support systems along with an attachment port for a mounted sleeper."
icon_state = "odysseus_torso"
/obj/item/mecha_parts/part/odysseus_left_arm
name = "\improper Odysseus left arm"
desc = "An Odysseus left arm. Data and power sockets are compatible with specialized medical equipment."
icon_state = "odysseus_l_arm"
/obj/item/mecha_parts/part/odysseus_right_arm
name = "\improper Odysseus right arm"
desc = "An Odysseus right arm. Data and power sockets are compatible with specialized medical equipment."
icon_state = "odysseus_r_arm"
/obj/item/mecha_parts/part/odysseus_left_leg
name = "\improper Odysseus left leg"
desc = "An Odysseus left leg. Contains complex servodrives and balance maintaining systems to maintain stability for critical patients."
icon_state = "odysseus_l_leg"
/obj/item/mecha_parts/part/odysseus_right_leg
name = "\improper Odysseus right leg"
desc = "An odysseus right leg. Contains complex servodrives and balance maintaining systems to maintain stability for critical patients."
icon_state = "odysseus_r_leg"
///////// Gygax
/obj/item/mecha_parts/chassis/gygax
name = "\improper Gygax chassis"
construct_type = /datum/component/construction/unordered/mecha_chassis/gygax
/obj/item/mecha_parts/part/gygax_torso
name = "\improper Gygax torso"
desc = "A torso part of Gygax. Contains power unit, processing core and life support systems."
icon_state = "gygax_harness"
/obj/item/mecha_parts/part/gygax_head
name = "\improper Gygax head"
desc = "A Gygax head. Houses advanced surveillance and targeting sensors."
icon_state = "gygax_head"
/obj/item/mecha_parts/part/gygax_left_arm
name = "\improper Gygax left arm"
desc = "A Gygax left arm. Data and power sockets are compatible with most exosuit tools and weapons."
icon_state = "gygax_l_arm"
/obj/item/mecha_parts/part/gygax_right_arm
name = "\improper Gygax right arm"
desc = "A Gygax right arm. Data and power sockets are compatible with most exosuit tools and weapons."
icon_state = "gygax_r_arm"
/obj/item/mecha_parts/part/gygax_left_leg
name = "\improper Gygax left leg"
desc = "A Gygax left leg. Constructed with advanced servomechanisms and actuators to enable faster speed."
icon_state = "gygax_l_leg"
/obj/item/mecha_parts/part/gygax_right_leg
name = "\improper Gygax right leg"
desc = "A Gygax right leg. Constructed with advanced servomechanisms and actuators to enable faster speed."
icon_state = "gygax_r_leg"
/obj/item/mecha_parts/part/gygax_armor
gender = PLURAL
name = "\improper Gygax armor plates"
desc = "A set of armor plates designed for the Gygax. Designed to effectively deflect damage with a lightweight construction."
icon_state = "gygax_armor"
///////// Medical Gygax
/obj/item/mecha_parts/chassis/medigax
name = "\improper Medical Gygax chassis"
construct_type = /datum/component/construction/unordered/mecha_chassis/medigax
/obj/item/mecha_parts/part/medigax_torso
name = "\improper Medical Gygax torso"
desc = "A torso part of Gygax. Contains power unit, processing core and life support systems."
icon_state = "medigax_harness"
/obj/item/mecha_parts/part/medigax_head
name = "\improper Medical Gygax head"
desc = "A Gygax head. Houses advanced surveillance and targeting sensors."
icon_state = "medigax_head"
/obj/item/mecha_parts/part/medigax_left_arm
name = "\improper Medical Gygax left arm"
desc = "A Gygax left arm. Data and power sockets are compatible with most exosuit tools and weapons."
icon_state = "medigax_l_arm"
/obj/item/mecha_parts/part/medigax_right_arm
name = "\improper Medical Gygax right arm"
desc = "A Gygax right arm. Data and power sockets are compatible with most exosuit tools and weapons."
icon_state = "medigax_r_arm"
/obj/item/mecha_parts/part/medigax_left_leg
name = "\improper Medical Gygax left leg"
desc = "A Gygax left leg. Constructed with advanced servomechanisms and actuators to enable faster speed."
icon_state = "medigax_l_leg"
/obj/item/mecha_parts/part/medigax_right_leg
name = "\improper Medical Gygax right leg"
desc = "A Gygax right leg. Constructed with advanced servomechanisms and actuators to enable faster speed."
icon_state = "medigax_r_leg"
/obj/item/mecha_parts/part/medigax_armor
gender = PLURAL
name = "\improper Medical Gygax armor plates"
desc = "A set of armor plates designed for the Gygax. Designed to effectively deflect damage with a lightweight construction."
icon_state = "medigax_armor"
//////////// Durand
/obj/item/mecha_parts/chassis/durand
name = "\improper Durand chassis"
construct_type = /datum/component/construction/unordered/mecha_chassis/durand
/obj/item/mecha_parts/part/durand_torso
name = "\improper Durand torso"
desc = "A torso part of Durand. Contains power unit, processing core and life support systems within a robust protective frame."
icon_state = "durand_harness"
/obj/item/mecha_parts/part/durand_head
name = "\improper Durand head"
desc = "A Durand head. Houses advanced surveillance and targeting sensors."
icon_state = "durand_head"
/obj/item/mecha_parts/part/durand_left_arm
name = "\improper Durand left arm"
desc = "A Durand left arm. Data and power sockets are compatible with most exosuit tools and weapons. Packs a really mean punch as well."
icon_state = "durand_l_arm"
/obj/item/mecha_parts/part/durand_right_arm
name = "\improper Durand right arm"
desc = "A Durand right arm. Data and power sockets are compatible with most exosuit tools and weapons. Packs a really mean punch as well."
icon_state = "durand_r_arm"
/obj/item/mecha_parts/part/durand_left_leg
name = "\improper Durand left leg"
desc = "A Durand left leg. Built particularly sturdy to support the Durand's heavy weight and defensive needs."
icon_state = "durand_l_leg"
/obj/item/mecha_parts/part/durand_right_leg
name = "\improper Durand right leg"
desc = "A Durand right leg. Built particularly sturdy to support the Durand's heavy weight and defensive needs."
icon_state = "durand_r_leg"
/obj/item/mecha_parts/part/durand_armor
gender = PLURAL
name = "\improper Durand armor plates"
desc = "A set of armor plates for the Durand. Built heavy to resist an incredible amount of brute force."
icon_state = "durand_armor"
////////// Firefighter
/obj/item/mecha_parts/chassis/firefighter
name = "\improper Firefighter chassis"
construct_type = /datum/component/construction/unordered/mecha_chassis/firefighter
////////// HONK
/obj/item/mecha_parts/chassis/honker
name = "\improper H.O.N.K chassis"
construct_type = /datum/component/construction/unordered/mecha_chassis/honker
/obj/item/mecha_parts/part/honker_torso
name = "\improper H.O.N.K torso"
desc = "A torso part of H.O.N.K. Contains chuckle unit, bananium core and honk support systems."
icon_state = "honker_harness"
/obj/item/mecha_parts/part/honker_head
name = "\improper H.O.N.K head"
desc = "A H.O.N.K head. Appears to lack a face plate."
icon_state = "honker_head"
/obj/item/mecha_parts/part/honker_left_arm
name = "\improper H.O.N.K left arm"
desc = "A H.O.N.K left arm. With unique sockets that accept odd weaponry designed by clown scientists."
icon_state = "honker_l_arm"
/obj/item/mecha_parts/part/honker_right_arm
name = "\improper H.O.N.K right arm"
desc = "A H.O.N.K right arm. With unique sockets that accept odd weaponry designed by clown scientists."
icon_state = "honker_r_arm"
/obj/item/mecha_parts/part/honker_left_leg
name = "\improper H.O.N.K left leg"
desc = "A H.O.N.K left leg. The foot appears just large enough to fully accommodate a clown shoe."
icon_state = "honker_l_leg"
/obj/item/mecha_parts/part/honker_right_leg
name = "\improper H.O.N.K right leg"
desc = "A H.O.N.K right leg. The foot appears just large enough to fully accommodate a clown shoe."
icon_state = "honker_r_leg"
////////// Phazon
/obj/item/mecha_parts/chassis/phazon
name = "\improper Phazon chassis"
construct_type = /datum/component/construction/unordered/mecha_chassis/phazon
/obj/item/mecha_parts/part/phazon_torso
name="\improper Phazon torso"
desc="A Phazon torso part. The socket for the bluespace core that powers the exosuit's unique phase drives is located in the middle."
icon_state = "phazon_harness"
/obj/item/mecha_parts/part/phazon_head
name="\improper Phazon head"
desc="A Phazon head. Its sensors are carefully calibrated to provide vision and data even when the exosuit is phasing."
icon_state = "phazon_head"
/obj/item/mecha_parts/part/phazon_left_arm
name="\improper Phazon left arm"
desc="A Phazon left arm. Several microtool arrays are located under the armor plating, which can be adjusted to the situation at hand."
icon_state = "phazon_l_arm"
/obj/item/mecha_parts/part/phazon_right_arm
name="\improper Phazon right arm"
desc="A Phazon right arm. Several microtool arrays are located under the armor plating, which can be adjusted to the situation at hand."
icon_state = "phazon_r_arm"
/obj/item/mecha_parts/part/phazon_left_leg
name="\improper Phazon left leg"
desc="A Phazon left leg. It contains the unique phase drives that allow the exosuit to phase through solid matter when engaged."
icon_state = "phazon_l_leg"
/obj/item/mecha_parts/part/phazon_right_leg
name="\improper Phazon right leg"
desc="A Phazon right leg. It contains the unique phase drives that allow the exosuit to phase through solid matter when engaged."
icon_state = "phazon_r_leg"
/obj/item/mecha_parts/part/phazon_armor
name="Phazon armor"
desc="Phazon armor plates. They are layered with plasma to protect the pilot from the stress of phasing and have unusual properties."
icon_state = "phazon_armor"
///////// Circuitboards
/obj/item/circuitboard/mecha
name = "exosuit circuit board"
icon = 'icons/obj/module.dmi'
icon_state = "std_mod"
item_state = "electronic"
lefthand_file = 'icons/mob/inhands/misc/devices_lefthand.dmi'
righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi'
flags_1 = CONDUCT_1
force = 5
w_class = WEIGHT_CLASS_SMALL
throwforce = 0
throw_speed = 3
throw_range = 7
/obj/item/circuitboard/mecha/ripley/peripherals
name = "Ripley Peripherals Control module (Exosuit Board)"
icon_state = "mcontroller"
/obj/item/circuitboard/mecha/ripley/main
name = "Ripley Central Control module (Exosuit Board)"
icon_state = "mainboard"
/obj/item/circuitboard/mecha/gygax/peripherals
name = "Gygax Peripherals Control module (Exosuit Board)"
icon_state = "mcontroller"
/obj/item/circuitboard/mecha/gygax/targeting
name = "Gygax Weapon Control and Targeting module (Exosuit Board)"
icon_state = "mcontroller"
/obj/item/circuitboard/mecha/gygax/main
name = "Gygax Central Control module (Exosuit Board)"
icon_state = "mainboard"
/obj/item/circuitboard/mecha/durand/peripherals
name = "Durand Peripherals Control module (Exosuit Board)"
icon_state = "mcontroller"
/obj/item/circuitboard/mecha/durand/targeting
name = "Durand Weapon Control and Targeting module (Exosuit Board)"
icon_state = "mcontroller"
/obj/item/circuitboard/mecha/durand/main
name = "Durand Central Control module (Exosuit Board)"
icon_state = "mainboard"
/obj/item/circuitboard/mecha/honker/peripherals
name = "H.O.N.K Peripherals Control module (Exosuit Board)"
icon_state = "mcontroller"
/obj/item/circuitboard/mecha/honker/targeting
name = "H.O.N.K Weapon Control and Targeting module (Exosuit Board)"
icon_state = "mcontroller"
/obj/item/circuitboard/mecha/honker/main
name = "H.O.N.K Central Control module (Exosuit Board)"
icon_state = "mainboard"
/obj/item/circuitboard/mecha/odysseus/peripherals
name = "Odysseus Peripherals Control module (Exosuit Board)"
icon_state = "mcontroller"
/obj/item/circuitboard/mecha/odysseus/main
name = "Odysseus Central Control module (Exosuit Board)"
icon_state = "mainboard"
/obj/item/circuitboard/mecha/phazon/peripherals
name = "Phazon Peripherals Control module (Exosuit Board)"
icon_state = "mcontroller"
/obj/item/circuitboard/mecha/phazon/targeting
name = "Phazon Weapon Control and Targeting module (Exosuit Board)"
icon_state = "mcontroller"
/obj/item/circuitboard/mecha/phazon/main
name = "Phazon Central Control module (Exosuit Board)"
-360
View File
@@ -1,360 +0,0 @@
////////////////////////////////////
///// Rendering stats window ///////
////////////////////////////////////
/obj/mecha/proc/get_stats_html()
. = {"<html>
<head>
<meta http-equiv='Content-Type' content='text/html; charset=UTF-8'>
<title>[name] data</title>
<style>
body {color: #00ff00; background: #000000; font-family:"Lucida Console",monospace; font-size: 12px;}
hr {border: 1px solid #0f0; color: #0f0; background-color: #0f0;}
a {padding:2px 5px;;color:#0f0;}
.wr {margin-bottom: 5px;}
.header {cursor:pointer;}
.open, .closed {background: #32CD32; color:#000; padding:1px 2px;}
.links a {margin-bottom: 2px;padding-top:3px;}
.visible {display: block;}
.hidden {display: none;}
</style>
<script language='javascript' type='text/javascript'>
[js_byjax]
[js_dropdowns]
function SSticker() {
setInterval(function(){
window.location='byond://?src=[REF(src)]&update_content=1';
}, 1000);
}
window.onload = function() {
dropdowns();
SSticker();
}
</script>
</head>
<body>
<div id='content'>
[src.get_stats_part()]
</div>
<div id='eq_list'>
[src.get_equipment_list()]
</div>
<hr>
<div id='commands'>
[src.get_commands()]
</div>
</body>
</html>
"}
/obj/mecha/proc/report_internal_damage()
. = ""
var/list/dam_reports = list(
"[MECHA_INT_FIRE]" = "<span class='userdanger'>INTERNAL FIRE</span>",
"[MECHA_INT_TEMP_CONTROL]" = "<span class='userdanger'>LIFE SUPPORT SYSTEM MALFUNCTION</span>",
"[MECHA_INT_TANK_BREACH]" = "<span class='userdanger'>GAS TANK BREACH</span>",
"[MECHA_INT_CONTROL_LOST]" = "<span class='userdanger'>COORDINATION SYSTEM CALIBRATION FAILURE</span> - <a href='?src=[REF(src)];repair_int_control_lost=1'>Recalibrate</a>",
"[MECHA_INT_SHORT_CIRCUIT]" = "<span class='userdanger'>SHORT CIRCUIT</span>"
)
for(var/tflag in dam_reports)
var/intdamflag = text2num(tflag)
if(internal_damage & intdamflag)
. += dam_reports[tflag]
. += "<br />"
if(return_pressure() > WARNING_HIGH_PRESSURE)
. += "<span class='userdanger'>DANGEROUSLY HIGH CABIN PRESSURE</span><br />"
/obj/mecha/proc/get_stats_part()
var/integrity = obj_integrity/max_integrity*100
var/cell_charge = get_charge()
var/datum/gas_mixture/int_tank_air = internal_tank.return_air()
var/tank_pressure = internal_tank ? round(int_tank_air.return_pressure(),0.01) : "None"
var/tank_temperature = internal_tank ? int_tank_air.return_temperature() : "Unknown"
var/cabin_pressure = round(return_pressure(),0.01)
. = {"[report_internal_damage()]
[integrity<30?"<span class='userdanger'>DAMAGE LEVEL CRITICAL</span><br>":null]
<b>Integrity: </b> [integrity]%<br>
<b>Powercell charge: </b>[isnull(cell_charge)?"No powercell installed":"[cell.percent()]%"]<br>
<b>Air source: </b>[use_internal_tank?"Internal Airtank":"Environment"]<br>
<b>Airtank pressure: </b>[tank_pressure]kPa<br>
<b>Airtank temperature: </b>[tank_temperature]&deg;K|[tank_temperature - T0C]&deg;C<br>
<b>Cabin pressure: </b>[cabin_pressure>WARNING_HIGH_PRESSURE ? "<span class='danger'>[cabin_pressure]</span>": cabin_pressure]kPa<br>
<b>Cabin temperature: </b> [return_temperature()]&deg;K|[return_temperature() - T0C]&deg;C<br>
[dna_lock?"<b>DNA-locked:</b><br> <span style='font-size:10px;letter-spacing:-1px;'>[dna_lock]</span> \[<a href='?src=[REF(src)];reset_dna=1'>Reset</a>\]<br>":""]<br>
[thrusters_action.owner ? "<b>Thrusters: </b> [thrusters_active ? "Enabled" : "Disabled"]<br>" : ""]
[defense_action.owner ? "<b>Defence Mode: </b> [defence_mode ? "Enabled" : "Disabled"]<br>" : ""]
[overload_action.owner ? "<b>Leg Actuators Overload: </b> [leg_overload_mode ? "Enabled" : "Disabled"]<br>" : ""]
[smoke_action.owner ? "<b>Smoke: </b> [smoke]<br>" : ""]
[zoom_action.owner ? "<b>Zoom: </b> [zoom_mode ? "Enabled" : "Disabled"]<br>" : ""]
[switch_damtype_action.owner ? "<b>Damtype: </b> [damtype]<br>" : ""]
[phasing_action.owner ? "<b>Phase Modulator: </b> [phasing ? "Enabled" : "Disabled"]<br>" : ""]
"}
/obj/mecha/proc/get_commands()
. = {"<div class='wr'>
<div class='header'>Electronics</div>
<div class='links'>
<b>Radio settings:</b><br>
Microphone: <a href='?src=[REF(src)];rmictoggle=1'><span id="rmicstate">[radio.broadcasting?"Engaged":"Disengaged"]</span></a><br>
Speaker: <a href='?src=[REF(src)];rspktoggle=1'><span id="rspkstate">[radio.listening?"Engaged":"Disengaged"]</span></a><br>
Frequency:
<a href='?src=[REF(src)];rfreq=-10'>-</a>
<a href='?src=[REF(src)];rfreq=-2'>-</a>
<span id="rfreq">[format_frequency(radio.frequency)]</span>
<a href='?src=[REF(src)];rfreq=2'>+</a>
<a href='?src=[REF(src)];rfreq=10'>+</a><br>
</div>
</div>
<div class='wr'>
<div class='header'>Permissions & Logging</div>
<div class='links'>
<a href='?src=[REF(src)];toggle_id_upload=1'><span id='t_id_upload'>[add_req_access?"L":"Unl"]ock ID upload panel</span></a><br>
<a href='?src=[REF(src)];toggle_maint_access=1'><span id='t_maint_access'>[maint_access?"Forbid":"Permit"] maintenance protocols</span></a><br>
<a href='?src=[REF(src)];toggle_port_connection=1'><span id='t_port_connection'>[internal_tank.connected_port?"Disconnect from":"Connect to"] gas port</span></a><br>
<a href='?src=[REF(src)];dna_lock=1'>DNA-lock</a><br>
<a href='?src=[REF(src)];view_log=1'>View internal log</a><br>
<a href='?src=[REF(src)];change_name=1'>Change exosuit name</a><br>
</div>
</div>
<div id='equipment_menu'>[get_equipment_menu()]</div>
"}
/obj/mecha/proc/get_equipment_menu() //outputs mecha html equipment menu
. = ""
if(equipment.len)
. += {"<div class='wr'>
<div class='header'>Equipment</div>
<div class='links'>"}
for(var/X in equipment)
var/obj/item/mecha_parts/mecha_equipment/W = X
. += "[W.name] <a href='?src=[REF(W)];detach=1'>Detach</a><br>"
. += "<b>Available equipment slots:</b> [max_equip-equipment.len]"
. += "</div></div>"
/obj/mecha/proc/get_equipment_list() //outputs mecha equipment list in html
if(!equipment.len)
return
. = "<b>Equipment:</b><div style=\"margin-left: 15px;\">"
for(var/obj/item/mecha_parts/mecha_equipment/MT in equipment)
. += "<div id='[REF(MT)]'>[MT.get_equip_info()]</div>"
. += "</div>"
/obj/mecha/proc/get_log_html()
. = "<html><head><meta http-equiv='Content-Type' content='text/html; charset=UTF-8'><title>[src.name] Log</title></head><body style='font: 13px 'Courier', monospace;'>"
for(var/list/entry in log)
. += {"<div style='font-weight: bold;'>[entry["time"]] [time2text(entry["date"],"MMM DD")] [entry["year"]]</div>
<div style='margin-left:15px; margin-bottom:10px;'>[entry["message"]]</div>
"}
. += "</body></html>"
/obj/mecha/proc/output_access_dialog(obj/item/card/id/id_card, mob/user)
if(!id_card || !user)
return
. = {"<html>
<head>
<meta http-equiv='Content-Type' content='text/html; charset=UTF-8'>
<style>
h1 {font-size:15px;margin-bottom:4px;}
body {color: #00ff00; background: #000000; font-family:"Courier New", Courier, monospace; font-size: 12px;}
a {color:#0f0;}
</style>
</head>
<body>
<h1>Following keycodes are present in this system:</h1>"}
for(var/a in operation_req_access)
. += "[get_access_desc(a)] - <a href='?src=[REF(src)];del_req_access=[a];user=[REF(user)];id_card=[REF(id_card)]'>Delete</a><br>"
. += "<hr><h1>Following keycodes were detected on portable device:</h1>"
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 //there's some strange access without a name
. += "[a_name] - <a href='?src=[REF(src)];add_req_access=[a];user=[REF(user)];id_card=[REF(id_card)]'>Add</a><br>"
. += "<hr><a href='?src=[REF(src)];finish_req_access=1;user=[REF(user)]'>Finish</a> "
. += "<span class='danger'>(Warning! The ID upload panel will be locked. It can be unlocked only through Exosuit Interface.)</span>"
. += "</body></html>"
user << browse(., "window=exosuit_add_access")
onclose(user, "exosuit_add_access")
/obj/mecha/proc/output_maintenance_dialog(obj/item/card/id/id_card,mob/user)
if(!id_card || !user)
return
. = {"<html>
<head>
<meta http-equiv='Content-Type' content='text/html; charset=UTF-8'>
<style>
body {color: #00ff00; background: #000000; font-family:"Courier New", Courier, monospace; font-size: 12px;}
a {padding:2px 5px; background:#32CD32;color:#000;display:block;margin:2px;text-align:center;text-decoration:none;}
</style>
</head>
<body>
[add_req_access?"<a href='?src=[REF(src)];req_access=1;id_card=[REF(id_card)];user=[REF(user)]'>Edit operation keycodes</a>":null]
[maint_access?"<a href='?src=[REF(src)];maint_access=1;id_card=[REF(id_card)];user=[REF(user)]'>[(state>0) ? "Terminate" : "Initiate"] maintenance protocol</a>":null]
[(state>0) ?"<a href='?src=[REF(src)];set_internal_tank_valve=1;user=[REF(user)]'>Set Cabin Air Pressure</a>":null]
</body>
</html>"}
user << browse(., "window=exosuit_maint_console")
onclose(user, "exosuit_maint_console")
/////////////////
///// Topic /////
/////////////////
/obj/mecha/Topic(href, href_list)
..()
if(href_list["close"])
return
if(usr.incapacitated())
return
if(in_range(src, usr))
var/obj/item/card/id/id_card
if (href_list["id_card"])
id_card = locate(href_list["id_card"])
if (!istype(id_card))
return
if(href_list["req_access"] && add_req_access)
output_access_dialog(id_card, usr)
if(href_list["maint_access"] && maint_access)
if(state==0)
state = 1
to_chat(usr, "The securing bolts are now exposed.")
else if(state==1)
state = 0
to_chat(usr, "The securing bolts are now hidden.")
output_maintenance_dialog(id_card, usr)
if(href_list["set_internal_tank_valve"] && state >=1)
var/new_pressure = input(usr,"Input new output pressure","Pressure setting",internal_tank_valve) as num
if(new_pressure)
internal_tank_valve = new_pressure
to_chat(usr, "The internal pressure valve has been set to [internal_tank_valve]kPa.")
if(href_list["add_req_access"] && add_req_access)
operation_req_access += text2num(href_list["add_req_access"])
output_access_dialog(id_card, usr)
if(href_list["del_req_access"] && add_req_access)
operation_req_access -= text2num(href_list["del_req_access"])
output_access_dialog(id_card, usr)
if(href_list["finish_req_access"])
add_req_access = 0
usr << browse(null,"window=exosuit_add_access")
if(usr != occupant)
return
if(href_list["update_content"])
send_byjax(usr,"exosuit.browser","content",src.get_stats_part())
if(href_list["select_equip"])
var/obj/item/mecha_parts/mecha_equipment/equip = locate(href_list["select_equip"]) in src
if(equip && equip.selectable)
selected = equip
occupant_message("You switch to [equip]")
visible_message("[src] raises [equip]")
send_byjax(usr, "exosuit.browser","eq_list", get_equipment_list())
if(href_list["rmictoggle"])
radio.broadcasting = !radio.broadcasting
send_byjax(usr,"exosuit.browser","rmicstate",(radio.broadcasting?"Engaged":"Disengaged"))
if(href_list["rspktoggle"])
radio.listening = !radio.listening
send_byjax(usr,"exosuit.browser","rspkstate",(radio.listening?"Engaged":"Disengaged"))
if(href_list["rfreq"])
var/new_frequency = (radio.frequency + text2num(href_list["rfreq"]))
if (!radio.freerange || (radio.frequency < MIN_FREE_FREQ || radio.frequency > MAX_FREE_FREQ))
new_frequency = sanitize_frequency(new_frequency)
radio.set_frequency(new_frequency)
send_byjax(usr,"exosuit.browser","rfreq","[format_frequency(radio.frequency)]")
if (href_list["view_log"])
src.occupant << browse(src.get_log_html(), "window=exosuit_log")
onclose(occupant, "exosuit_log")
if (href_list["change_name"])
var/userinput = stripped_input(occupant,"Choose new exosuit name","Rename exosuit","", MAX_NAME_LEN)
if(!userinput || usr != occupant || usr.incapacitated())
return
name = userinput
return
if (href_list["toggle_id_upload"])
add_req_access = !add_req_access
send_byjax(usr,"exosuit.browser","t_id_upload","[add_req_access?"L":"Unl"]ock ID upload panel")
if(href_list["toggle_maint_access"])
if(state)
occupant_message("<span class='danger'>Maintenance protocols in effect</span>")
return
maint_access = !maint_access
send_byjax(usr,"exosuit.browser","t_maint_access","[maint_access?"Forbid":"Permit"] maintenance protocols")
if (href_list["toggle_port_connection"])
if(internal_tank.connected_port)
if(internal_tank.disconnect())
occupant_message("Disconnected from the air system port.")
mecha_log_message("Disconnected from gas port.")
else
occupant_message("<span class='warning'>Unable to disconnect from the air system port!</span>")
return
else
var/obj/machinery/atmospherics/components/unary/portables_connector/possible_port = locate() in loc
if(internal_tank.connect(possible_port))
occupant_message("Connected to the air system port.")
mecha_log_message("Connected to gas port.")
else
occupant_message("<span class='warning'>Unable to connect with air system port!</span>")
return
send_byjax(occupant,"exosuit.browser","t_port_connection","[internal_tank.connected_port?"Disconnect from":"Connect to"] gas port")
if(href_list["dna_lock"])
if(!occupant)
return
var/mob/living/carbon/C = occupant
if(!istype(C) || !C.dna)
to_chat(C, "<span class='danger'> You do not have any DNA!</span>")
return
dna_lock = C.dna.unique_enzymes
occupant_message("You feel a prick as the needle takes your DNA sample.")
if(href_list["reset_dna"])
dna_lock = null
if(href_list["repair_int_control_lost"])
occupant_message("Recalibrating coordination system...")
mecha_log_message("Recalibration of coordination system started.")
var/T = loc
spawn(100)
if(T == loc)
clearInternalDamage(MECHA_INT_CONTROL_LOST)
occupant_message("<span class='notice'>Recalibration successful.</span>")
mecha_log_message("Recalibration of coordination system finished with 0 errors.")
else
occupant_message("<span class='warning'>Recalibration failed!</span>")
mecha_log_message("Recalibration of coordination system failed with 1 error.", color="red")
-271
View File
@@ -1,271 +0,0 @@
///////////////////////////////////
//////// Mecha wreckage ////////
///////////////////////////////////
/obj/structure/mecha_wreckage
name = "exosuit wreckage"
desc = "Remains of some unfortunate mecha. Completely irreparable, but perhaps something can be salvaged."
icon = 'icons/mecha/mecha.dmi'
density = TRUE
anchored = FALSE
opacity = 0
var/list/welder_salvage = list(/obj/item/stack/sheet/plasteel, /obj/item/stack/sheet/metal, /obj/item/stack/rods)
var/list/wirecutters_salvage = list(/obj/item/stack/cable_coil)
var/list/crowbar_salvage = list()
var/salvage_num = 5
var/mob/living/silicon/ai/AI //AIs to be salvaged
/obj/structure/mecha_wreckage/Initialize(mapload, mob/living/silicon/ai/AI_pilot)
. = ..()
if(!AI_pilot) //Type-checking for this is already done in mecha/Destroy()
return
AI = AI_pilot
AI.apply_damage(150, BURN) //Give the AI a bit of damage from the "shock" of being suddenly shut down
AI.death() //The damage is not enough to kill the AI, but to be 'corrupted files' in need of repair.
AI.forceMove(src) //Put the dead AI inside the wreckage for recovery
add_overlay(mutable_appearance('icons/obj/projectiles.dmi', "green_laser")) //Overlay for the recovery beacon
AI.controlled_mech = null
AI.remote_control = null
/obj/structure/mecha_wreckage/examine(mob/user)
. = ..()
if(AI)
. += "<span class='notice'>The AI recovery beacon is active.</span>"
/obj/structure/mecha_wreckage/attackby(obj/item/I, mob/user, params)
if(I.tool_behaviour == TOOL_WELDER)
if(salvage_num <= 0 || !length(welder_salvage))
to_chat(user, "<span class='warning'>You don't see anything that can be cut with [I]!</span>")
return
if(!I.use_tool(src, user, 0, volume=50))
return
var/type = prob(70) ? pick(welder_salvage) : null
if(type)
var/N = new type(get_turf(user))
user.visible_message("[user] cuts [N] from [src].", "<span class='notice'>You cut [N] from [src].</span>")
if(istype(N, /obj/item/mecha_parts/part))
welder_salvage -= type
salvage_num--
else
to_chat(user, "<span class='warning'>You fail to salvage anything valuable from [src]!</span>")
return
else if(I.tool_behaviour == TOOL_WIRECUTTER)
if(salvage_num <= 0)
to_chat(user, "<span class='warning'>You don't see anything that can be cut with [I]!</span>")
return
else if(wirecutters_salvage && wirecutters_salvage.len)
var/type = prob(70) ? pick(wirecutters_salvage) : null
if(type)
var/N = new type(get_turf(user))
user.visible_message("[user] cuts [N] from [src].", "<span class='notice'>You cut [N] from [src].</span>")
salvage_num--
else
to_chat(user, "<span class='warning'>You fail to salvage anything valuable from [src]!</span>")
else if(I.tool_behaviour == TOOL_CROWBAR)
if(crowbar_salvage && crowbar_salvage.len)
var/obj/S = pick(crowbar_salvage)
if(S)
S.forceMove(user.drop_location())
crowbar_salvage -= S
user.visible_message("[user] pries [S] from [src].", "<span class='notice'>You pry [S] from [src].</span>")
return
else
to_chat(user, "<span class='warning'>You don't see anything that can be pried with [I]!</span>")
/obj/structure/mecha_wreckage/transfer_ai(interaction, mob/user, null, obj/item/aicard/card)
if(!..())
return
//Proc called on the wreck by the AI card.
if(interaction == AI_TRANS_TO_CARD) //AIs can only be transferred in one direction, from the wreck to the card.
if(!AI) //No AI in the wreck
to_chat(user, "<span class='warning'>No AI backups found.</span>")
return
cut_overlays() //Remove the recovery beacon overlay
AI.forceMove(card) //Move the dead AI to the card.
card.AI = AI
if(AI.client) //AI player is still in the dead AI and is connected
to_chat(AI, "The remains of your file system have been recovered on a mobile storage device.")
else //Give the AI a heads-up that it is probably going to get fixed.
AI.notify_ghost_cloning("You have been recovered from the wreckage!", source = card)
to_chat(user, "<span class='boldnotice'>Backup files recovered</span>: [AI.name] ([rand(1000,9999)].exe) salvaged from [name] and stored within local memory.")
else
return ..()
/obj/structure/mecha_wreckage/gygax
name = "\improper Gygax wreckage"
icon_state = "gygax-broken"
/obj/structure/mecha_wreckage/gygax/Initialize()
. = ..()
var/list/parts = list(/obj/item/mecha_parts/part/gygax_torso,
/obj/item/mecha_parts/part/gygax_head,
/obj/item/mecha_parts/part/gygax_left_arm,
/obj/item/mecha_parts/part/gygax_right_arm,
/obj/item/mecha_parts/part/gygax_left_leg,
/obj/item/mecha_parts/part/gygax_right_leg)
for(var/i = 0; i < 2; i++)
if(parts.len && prob(40))
var/part = pick(parts)
welder_salvage += part
parts -= part
/obj/structure/mecha_wreckage/gygax/dark
name = "\improper Dark Gygax wreckage"
icon_state = "darkgygax-broken"
/obj/structure/mecha_wreckage/medigax
name = "\improper Medical Gygax wreckage"
icon_state = "medigax-broken"
/obj/structure/mecha_wreckage/medigax/Initialize()
. = ..()
var/list/parts = list(/obj/item/mecha_parts/part/medigax_torso,
/obj/item/mecha_parts/part/medigax_head,
/obj/item/mecha_parts/part/medigax_left_arm,
/obj/item/mecha_parts/part/medigax_right_arm,
/obj/item/mecha_parts/part/medigax_left_leg,
/obj/item/mecha_parts/part/medigax_right_leg)
for(var/i = 0; i < 2; i++)
if(parts.len && prob(40))
var/part = pick(parts)
welder_salvage += part
parts -= part
/obj/structure/mecha_wreckage/marauder
name = "\improper Marauder wreckage"
icon_state = "marauder-broken"
/obj/structure/mecha_wreckage/mauler
name = "\improper Mauler wreckage"
icon_state = "mauler-broken"
desc = "The syndicate won't be very happy about this..."
/obj/structure/mecha_wreckage/seraph
name = "\improper Seraph wreckage"
icon_state = "seraph-broken"
/obj/structure/mecha_wreckage/reticence
name = "\improper Reticence wreckage"
icon_state = "reticence-broken"
color = "#87878715"
desc = "..."
/obj/structure/mecha_wreckage/ripley
name = "\improper Ripley wreckage"
icon_state = "ripley-broken"
/obj/structure/mecha_wreckage/ripley/Initialize()
. = ..()
var/list/parts = list(/obj/item/mecha_parts/part/ripley_torso,
/obj/item/mecha_parts/part/ripley_left_arm,
/obj/item/mecha_parts/part/ripley_right_arm,
/obj/item/mecha_parts/part/ripley_left_leg,
/obj/item/mecha_parts/part/ripley_right_leg)
for(var/i = 0; i < 2; i++)
if(parts.len && prob(40))
var/part = pick(parts)
welder_salvage += part
parts -= part
/obj/structure/mecha_wreckage/ripley/firefighter
name = "\improper Firefighter wreckage"
icon_state = "firefighter-broken"
/obj/structure/mecha_wreckage/ripley/firefighter/Initialize()
. = ..()
var/list/parts = list(/obj/item/mecha_parts/part/ripley_torso,
/obj/item/mecha_parts/part/ripley_left_arm,
/obj/item/mecha_parts/part/ripley_right_arm,
/obj/item/mecha_parts/part/ripley_left_leg,
/obj/item/mecha_parts/part/ripley_right_leg,
/obj/item/clothing/suit/fire)
for(var/i = 0; i < 2; i++)
if(parts.len && prob(40))
var/part = pick(parts)
welder_salvage += part
parts -= part
/obj/structure/mecha_wreckage/ripley/deathripley
name = "\improper Death-Ripley wreckage"
icon_state = "deathripley-broken"
/obj/structure/mecha_wreckage/honker
name = "\improper H.O.N.K wreckage"
icon_state = "honker-broken"
desc = "All is right in the universe."
/obj/structure/mecha_wreckage/honker/Initialize()
. = ..()
var/list/parts = list(
/obj/item/mecha_parts/chassis/honker,
/obj/item/mecha_parts/part/honker_torso,
/obj/item/mecha_parts/part/honker_head,
/obj/item/mecha_parts/part/honker_left_arm,
/obj/item/mecha_parts/part/honker_right_arm,
/obj/item/mecha_parts/part/honker_left_leg,
/obj/item/mecha_parts/part/honker_right_leg)
for(var/i = 0; i < 2; i++)
if(parts.len && prob(40))
var/part = pick(parts)
welder_salvage += part
parts -= part
/obj/structure/mecha_wreckage/durand
name = "\improper Durand wreckage"
icon_state = "durand-broken"
/obj/structure/mecha_wreckage/durand/Initialize()
. = ..()
var/list/parts = list(
/obj/item/mecha_parts/part/durand_torso,
/obj/item/mecha_parts/part/durand_head,
/obj/item/mecha_parts/part/durand_left_arm,
/obj/item/mecha_parts/part/durand_right_arm,
/obj/item/mecha_parts/part/durand_left_leg,
/obj/item/mecha_parts/part/durand_right_leg)
for(var/i = 0; i < 2; i++)
if(parts.len && prob(40))
var/part = pick(parts)
welder_salvage += part
parts -= part
/obj/structure/mecha_wreckage/phazon
name = "\improper Phazon wreckage"
icon_state = "phazon-broken"
/obj/structure/mecha_wreckage/odysseus
name = "\improper Odysseus wreckage"
icon_state = "odysseus-broken"
/obj/structure/mecha_wreckage/odysseus/Initialize()
. = ..()
var/list/parts = list(
/obj/item/mecha_parts/part/odysseus_torso,
/obj/item/mecha_parts/part/odysseus_head,
/obj/item/mecha_parts/part/odysseus_left_arm,
/obj/item/mecha_parts/part/odysseus_right_arm,
/obj/item/mecha_parts/part/odysseus_left_leg,
/obj/item/mecha_parts/part/odysseus_right_leg)
for(var/i = 0; i < 2; i++)
if(parts.len && prob(40))
var/part = pick(parts)
welder_salvage += part
parts -= part
-16
View File
@@ -1,16 +0,0 @@
/obj/mecha/medical/mechturn(direction)
setDir(direction)
playsound(src,'sound/mecha/mechmove01.ogg',40,1)
return 1
/obj/mecha/medical/mechstep(direction)
var/result = step(src,direction)
if(result)
playsound(src,'sound/mecha/mechstep.ogg',25,1)
return result
/obj/mecha/medical/mechsteprand()
var/result = step_rand(src)
if(result)
playsound(src,'sound/mecha/mechstep.ogg',25,1)
return result
-34
View File
@@ -1,34 +0,0 @@
/obj/mecha/medical/medigax
desc = "A Gygax with it's actuator overload stripped and a slick white paint scheme, for medical use, These exosuits are developed and produced by Vey-Med. (&copy; All rights reserved)."
name = "\improper Medical Gygax"
icon_state = "medigax"
step_in = 1.75 // a little faster than an odysseus
max_temperature = 25000
max_integrity = 250
wreckage = /obj/structure/mecha_wreckage/odysseus
armor = list("melee" = 25, "bullet" = 20, "laser" = 30, "energy" = 15, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 100)
internal_damage_threshold = 35
deflect_chance = 15
step_energy_drain = 6
infra_luminosity = 6
/obj/mecha/medical/medigax/moved_inside(mob/living/carbon/human/H)
. = ..()
if(.)
var/datum/atom_hud/hud = GLOB.huds[DATA_HUD_MEDICAL_ADVANCED]
hud.add_hud_to(H)
/obj/mecha/medical/medigax/go_out()
if(isliving(occupant))
var/mob/living/carbon/human/L = occupant
var/datum/atom_hud/hud = GLOB.huds[DATA_HUD_MEDICAL_ADVANCED]
hud.remove_hud_from(L)
..()
/obj/mecha/medical/medigax/mmi_moved_inside(obj/item/mmi/mmi_as_oc, mob/user)
. = ..()
if(.)
var/datum/atom_hud/hud = GLOB.huds[DATA_HUD_MEDICAL_ADVANCED]
var/mob/living/brain/B = mmi_as_oc.brainmob
hud.add_hud_to(B)
-31
View File
@@ -1,31 +0,0 @@
/obj/mecha/medical/odysseus
desc = "These exosuits are developed and produced by Vey-Med. (&copy; All rights reserved)."
name = "\improper Odysseus"
icon_state = "odysseus"
step_in = 2
max_temperature = 15000
max_integrity = 120
wreckage = /obj/structure/mecha_wreckage/odysseus
internal_damage_threshold = 35
deflect_chance = 15
step_energy_drain = 6
/obj/mecha/medical/odysseus/moved_inside(mob/living/carbon/human/H)
. = ..()
if(.)
var/datum/atom_hud/hud = GLOB.huds[DATA_HUD_MEDICAL_ADVANCED]
hud.add_hud_to(H)
/obj/mecha/medical/odysseus/go_out()
if(isliving(occupant))
var/mob/living/carbon/human/L = occupant
var/datum/atom_hud/hud = GLOB.huds[DATA_HUD_MEDICAL_ADVANCED]
hud.remove_hud_from(L)
..()
/obj/mecha/medical/odysseus/mmi_moved_inside(obj/item/mmi/mmi_as_oc, mob/user)
. = ..()
if(.)
var/datum/atom_hud/hud = GLOB.huds[DATA_HUD_MEDICAL_ADVANCED]
var/mob/living/brain/B = mmi_as_oc.brainmob
hud.add_hud_to(B)
-188
View File
@@ -1,188 +0,0 @@
/obj/mecha/working/ripley
desc = "Autonomous Power Loader Unit. This newer model is refitted with powerful armour against the dangers of planetary mining."
name = "\improper APLU \"Ripley\""
icon_state = "ripley"
step_in = 3 //Move speed, lower is faster.
var/fast_pressure_step_in = 2
var/slow_pressure_step_in = 3
max_temperature = 20000
max_integrity = 200
lights_power = 8
deflect_chance = 15
armor = list("melee" = 30, "bullet" = 15, "laser" = 10, "energy" = 20, "bomb" = 40, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 100)
max_equip = 6
wreckage = /obj/structure/mecha_wreckage/ripley
var/list/cargo = new
var/cargo_capacity = 15
var/hides = 0
/obj/mecha/working/ripley/Move()
. = ..()
if(.)
collect_ore()
update_pressure()
/obj/mecha/working/ripley/proc/collect_ore()
if(locate(/obj/item/mecha_parts/mecha_equipment/hydraulic_clamp) in equipment)
var/obj/structure/ore_box/ore_box = locate(/obj/structure/ore_box) in cargo
if(ore_box)
for(var/obj/item/stack/ore/ore in range(1, src))
if(ore.Adjacent(src) && ((get_dir(src, ore) & dir) || ore.loc == loc)) //we can reach it and it's in front of us? grab it!
ore.forceMove(ore_box)
/obj/mecha/working/ripley/Destroy()
for(var/atom/movable/A in cargo)
A.forceMove(drop_location())
step_rand(A)
cargo.Cut()
return ..()
/obj/mecha/working/ripley/go_out()
..()
update_icon()
/obj/mecha/working/ripley/moved_inside(mob/living/carbon/human/H)
..()
update_icon()
/obj/mecha/working/ripley/Initialize()
. = ..()
AddComponent(/datum/component/armor_plate,3,/obj/item/stack/sheet/animalhide/goliath_hide,list("melee" = 10, "bullet" = 5, "laser" = 5))
/obj/mecha/working/ripley/firefighter
desc = "Autonomous Power Loader Unit. This model is refitted with additional thermal protection."
name = "\improper APLU \"Firefighter\""
icon_state = "firefighter"
step_in = 4
fast_pressure_step_in = 2
slow_pressure_step_in = 4
max_temperature = 65000
max_integrity = 250
resistance_flags = LAVA_PROOF | FIRE_PROOF | ACID_PROOF
lights_power = 7
armor = list("melee" = 40, "bullet" = 30, "laser" = 30, "energy" = 30, "bomb" = 60, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 100)
max_equip = 5 // More armor, less tools
wreckage = /obj/structure/mecha_wreckage/ripley/firefighter
/obj/mecha/working/ripley/deathripley
desc = "OH SHIT IT'S THE DEATHSQUAD WE'RE ALL GONNA DIE"
name = "\improper DEATH-RIPLEY"
icon_state = "deathripley"
armor = list("melee" = 40, "bullet" = 30, "laser" = 20, "energy" = 20, "bomb" = 40, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 100)
slow_pressure_step_in = 3
opacity=0
lights_power = 7
wreckage = /obj/structure/mecha_wreckage/ripley/deathripley
step_energy_drain = 0
/obj/mecha/working/ripley/deathripley/Initialize()
. = ..()
var/obj/item/mecha_parts/mecha_equipment/ME = new /obj/item/mecha_parts/mecha_equipment/hydraulic_clamp/kill
ME.attach(src)
/obj/mecha/working/ripley/deathripley/real
desc = "OH SHIT IT'S THE DEATHSQUAD WE'RE ALL GONNA DIE. FOR REAL"
/obj/mecha/working/ripley/deathripley/real/Initialize()
. = ..()
for(var/obj/item/mecha_parts/mecha_equipment/E in equipment)
E.detach()
qdel(E)
equipment.Cut()
var/obj/item/mecha_parts/mecha_equipment/ME = new /obj/item/mecha_parts/mecha_equipment/hydraulic_clamp/kill/real
ME.attach(src)
/obj/mecha/working/ripley/mining
desc = "An old, dusty mining Ripley."
name = "\improper APLU \"Miner\""
obj_integrity = 75 //Low starting health
/obj/mecha/working/ripley/mining/Initialize()
. = ..()
if(cell)
cell.charge = FLOOR(cell.charge * 0.25, 1) //Starts at very low charge
if(prob(70)) //Maybe add a drill
if(prob(15)) //Possible diamond drill... Feeling lucky?
var/obj/item/mecha_parts/mecha_equipment/drill/diamonddrill/D = new
D.attach(src)
else
var/obj/item/mecha_parts/mecha_equipment/drill/D = new
D.attach(src)
else //Add plasma cutter if no drill
var/obj/item/mecha_parts/mecha_equipment/weapon/energy/plasma/P = new
P.attach(src)
//Add ore box to cargo
cargo.Add(new /obj/structure/ore_box(src))
//Attach hydraulic clamp
var/obj/item/mecha_parts/mecha_equipment/hydraulic_clamp/HC = new
HC.attach(src)
for(var/obj/item/mecha_parts/mecha_tracking/B in trackers)//Deletes the beacon so it can't be found easily
qdel(B)
var/obj/item/mecha_parts/mecha_equipment/mining_scanner/scanner = new
scanner.attach(src)
/obj/mecha/working/ripley/Exit(atom/movable/O)
if(O in cargo)
return 0
return ..()
/obj/mecha/working/ripley/Topic(href, href_list)
..()
if(href_list["drop_from_cargo"])
var/obj/O = locate(href_list["drop_from_cargo"])
if(O && (O in cargo))
occupant_message("<span class='notice'>You unload [O].</span>")
O.forceMove(drop_location())
cargo -= O
mecha_log_message("Unloaded [O]. Cargo compartment capacity: [cargo_capacity - src.cargo.len]")
return
/obj/mecha/working/ripley/contents_explosion(severity, target, origin)
for(var/X in cargo)
var/obj/O = X
if(prob(30/severity))
cargo -= O
O.forceMove(drop_location())
. = ..()
/obj/mecha/working/ripley/get_stats_part()
var/output = ..()
output += "<b>Cargo Compartment Contents:</b><div style=\"margin-left: 15px;\">"
if(cargo.len)
for(var/obj/O in cargo)
output += "<a href='?src=[REF(src)];drop_from_cargo=[REF(O)]'>Unload</a> : [O]<br>"
else
output += "Nothing"
output += "</div>"
return output
/obj/mecha/working/ripley/proc/update_pressure()
var/turf/T = get_turf(loc)
if(lavaland_equipment_pressure_check(T))
step_in = fast_pressure_step_in
for(var/obj/item/mecha_parts/mecha_equipment/drill/drill in equipment)
drill.equip_cooldown = initial(drill.equip_cooldown)/2
else
step_in = slow_pressure_step_in
for(var/obj/item/mecha_parts/mecha_equipment/drill/drill in equipment)
drill.equip_cooldown = initial(drill.equip_cooldown)
/obj/mecha/working/ripley/relay_container_resist(mob/living/user, obj/O)
to_chat(user, "<span class='notice'>You lean on the back of [O] and start pushing so it falls out of [src].</span>")
if(do_after(user, 300, target = O))
if(!user || user.stat != CONSCIOUS || user.loc != src || O.loc != src )
return
to_chat(user, "<span class='notice'>You successfully pushed [O] out of [src]!</span>")
O.forceMove(drop_location())
cargo -= O
else
if(user.loc == src) //so we don't get the message if we resisted multiple times and succeeded.
to_chat(user, "<span class='warning'>You fail to push [O] out of [src]!</span>")
-3
View File
@@ -1,3 +0,0 @@
/obj/mecha/working
internal_damage_threshold = 60
+1 -1
View File
@@ -16,7 +16,7 @@
playsound(loc, 'sound/items/welder.ogg', 100, TRUE)
/obj/structure/arachnid/run_obj_armor(damage_amount, damage_type, damage_flag = 0, attack_dir)
if(damage_flag == "melee")
if(damage_flag == MELEE)
switch(damage_type)
if(BURN)
damage_amount *= 2
-3
View File
@@ -18,9 +18,6 @@
/obj/effect/acid_act()
return
/obj/effect/mech_melee_attack(obj/mecha/M)
return 0
/obj/effect/blob_act(obj/structure/blob/B)
return
+1 -1
View File
@@ -15,7 +15,7 @@
/obj/structure/spider/run_obj_armor(damage_amount, damage_type, damage_flag = 0, attack_dir)
if(damage_flag == "melee")
if(damage_flag == MELEE)
switch(damage_type)
if(BURN)
damage_amount *= 2
@@ -129,14 +129,18 @@
"<span class='userdanger'>Your [I.name] shields you from [src]!</span>")
continue
L.visible_message("<span class='warning'>[L] is struck by a [name]!</span>", "<span class='userdanger'>You're struck by a [name]!</span>")
L.apply_damage(damage, BURN, "chest", L.run_armor_check("chest", "laser", "Your armor absorbs [src]!", "Your armor blocks part of [src]!", 0, "Your armor was penetrated by [src]!"))
L.apply_damage(damage, BURN, "chest", L.run_armor_check("chest", LASER, "Your armor absorbs [src]!", "Your armor blocks part of [src]!", 0, "Your armor was penetrated by [src]!"))
log_combat(user, L, "struck with a volt blast")
hit_amount++
for(var/obj/mecha/M in T)
if(M.occupant)
if(is_servant_of_ratvar(M.occupant))
continue
to_chat(M.occupant, "<span class='userdanger'>Your [M.name] is struck by a [name]!</span>")
for(var/obj/vehicle/sealed/mecha/M in T)
if(LAZYLEN(M.occupants))
for(var/mob/living/MB in M.occupants)
if(is_servant_of_ratvar(MB))
continue
else
to_chat(MB, "<span class='userdanger'>Your [M.name] is struck by a [name]!</span>")
continue
M.visible_message("<span class='warning'>[M] is struck by a [name]!</span>")
M.take_damage(damage, BURN, 0, 0)
hit_amount++
-3
View File
@@ -841,9 +841,6 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb
return ..()
return 0
/obj/item/mech_melee_attack(obj/mecha/M)
return 0
/obj/item/burn()
if(!QDELETED(src))
var/turf/T = get_turf(src)
+1 -1
View File
@@ -24,7 +24,7 @@ RLD
w_class = WEIGHT_CLASS_NORMAL
custom_materials = list(/datum/material/iron=100000)
req_access_txt = "11"
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 50)
armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, BIO = 0, RAD = 0, FIRE = 100, ACID = 50)
resistance_flags = FIRE_PROOF
var/datum/effect_system/spark_spread/spark_system
var/matter = 0
+1 -1
View File
@@ -206,7 +206,7 @@ GLOBAL_LIST_INIT(fluid_duct_recipes, list(
throw_range = 5
w_class = WEIGHT_CLASS_NORMAL
custom_materials = list(/datum/material/iron=75000, /datum/material/glass=37500)
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 50)
armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, BIO = 0, RAD = 0, FIRE = 100, ACID = 50)
resistance_flags = FIRE_PROOF
var/datum/effect_system/spark_spread/spark_system
var/effectcooldown
+1 -1
View File
@@ -14,7 +14,7 @@ RSF
density = FALSE
anchored = FALSE
item_flags = NOBLUDGEON
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 0, "acid" = 0)
armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, BIO = 0, RAD = 0, FIRE = 0, ACID = 0)
var/matter = 0
var/mode = 1
w_class = WEIGHT_CLASS_NORMAL
+10 -10
View File
@@ -20,20 +20,20 @@
if(C.attached_accessory)
to_chat(user,"<span class='warning'>Kind of hard to sew around [C.attached_accessory].</span>")
return
if(C.armor.getRating("melee") < 10)
C.armor = C.armor.setRating("melee" = 10)
if(C.armor.getRating(MELEE) < 10)
C.armor = C.armor.setRating(MELEE = 10)
used = TRUE
if(C.armor.getRating("laser") < 10)
C.armor = C.armor.setRating("laser" = 10)
if(C.armor.getRating(LASER) < 10)
C.armor = C.armor.setRating(LASER = 10)
used = TRUE
if(C.armor.getRating("fire") < 40)
C.armor = C.armor.setRating("fire" = 40)
if(C.armor.getRating(FIRE) < 40)
C.armor = C.armor.setRating(FIRE = 40)
used = TRUE
if(C.armor.getRating("acid") < 10)
C.armor = C.armor.setRating("acid" = 10)
if(C.armor.getRating(ACID) < 10)
C.armor = C.armor.setRating(ACID = 10)
used = TRUE
if(C.armor.getRating("bomb") < 5)
C.armor = C.armor.setRating("bomb" = 5)
if(C.armor.getRating(BOMB) < 5)
C.armor = C.armor.setRating(BOMB = 5)
used = TRUE
if(used)
+1 -1
View File
@@ -184,7 +184,7 @@
lefthand_file = 'icons/mob/inhands/equipment/idcards_lefthand.dmi'
righthand_file = 'icons/mob/inhands/equipment/idcards_righthand.dmi'
slot_flags = ITEM_SLOT_ID
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 100)
armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, BIO = 0, RAD = 0, FIRE = 100, ACID = 100)
resistance_flags = FIRE_PROOF | ACID_PROOF
var/id_type_name = "identification card"
var/mining_points = 0 //For redeeming at mining equipment vendors
@@ -1482,3 +1482,11 @@
icon_state = "engineering"
build_path = /obj/machinery/research/explosive_compressor
req_components = list(/obj/item/stock_parts/matter_bin = 3)
/obj/item/circuitboard/machine/stasis
name = "Lifeform Stasis Unit (Machine Board)"
build_path = /obj/machinery/stasis
req_components = list(
/obj/item/stack/cable_coil = 3,
/obj/item/stock_parts/manipulator = 1,
/obj/item/stock_parts/capacitor = 1)
+1 -1
View File
@@ -29,7 +29,7 @@
icon = 'icons/obj/money_machine.dmi'
icon_state = "bogdanoff"
layer = LARGE_MOB_LAYER
armor = list("melee" = 80, "bullet" = 30, "laser" = 30, "energy" = 60, "bomb" = 90, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 80)
armor = list(MELEE = 80, BULLET = 30, LASER = 30, ENERGY = 60, BOMB = 90, BIO = 0, RAD = 0, FIRE = 100, ACID = 80)
density = TRUE
pixel_z = -8
max_integrity = 5000
+1 -1
View File
@@ -14,7 +14,7 @@
throwforce = 6
w_class = WEIGHT_CLASS_BULKY
actions_types = list(/datum/action/item_action/toggle_paddles)
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 50)
armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, BIO = 0, RAD = 0, FIRE = 50, ACID = 50)
var/on = FALSE //if the paddles are equipped (1) or on the defib (0)
var/safety = TRUE //if you can zap people with the defibs on harm mode
+1 -1
View File
@@ -29,7 +29,7 @@ GLOBAL_LIST_EMPTY(PDAs)
item_flags = NOBLUDGEON
w_class = WEIGHT_CLASS_TINY
slot_flags = ITEM_SLOT_ID | ITEM_SLOT_BELT
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 100)
armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, BIO = 0, RAD = 0, FIRE = 100, ACID = 100)
resistance_flags = FIRE_PROOF | ACID_PROOF
//Main variables
@@ -161,7 +161,7 @@
dat += " (Stage [stage])"
dat += " <a href='?[REF(src)];track=[REF(S)]'>\[Track\]</a><br>"
for(var/obj/mecha/M in seen)
for(var/obj/vehicle/sealed/mecha/M in seen)
if(M.name in names)
names[M.name]++
dat += "[M.name] ([names[M.name]])"
@@ -88,7 +88,7 @@
mouse_opacity = MOUSE_OPACITY_OPAQUE
resistance_flags = INDESTRUCTIBLE
CanAtmosPass = ATMOS_PASS_DENSITY
armor = list("melee" = 0, "bullet" = 25, "laser" = 25, "energy" = 25, "bomb" = 25, "bio" = 100, "rad" = 100, "fire" = 100, "acid" = 100)
armor = list(MELEE = 0, BULLET = 25, LASER = 25, ENERGY = 25, BOMB = 25, BIO = 100, RAD = 100, FIRE = 100, ACID = 100)
var/obj/item/forcefield_projector/generator
/obj/structure/projected_forcefield/Initialize(mapload, obj/item/forcefield_projector/origin)
+1 -1
View File
@@ -21,7 +21,7 @@
light_color = "#00ff00"//green
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
max_integrity = 200
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 70)
armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, BIO = 0, RAD = 0, FIRE = 100, ACID = 70)
resistance_flags = FIRE_PROOF
wound_bonus = -40
bare_wound_bonus = 20
+3 -3
View File
@@ -15,7 +15,7 @@
hitsound = 'sound/weapons/bladeslice.ogg'
sharpness = SHARP_EDGED
max_integrity = 200
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 30)
armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, BIO = 0, RAD = 0, FIRE = 100, ACID = 30)
resistance_flags = FIRE_PROOF
wound_bonus = -15
bare_wound_bonus = 20
@@ -52,10 +52,10 @@
return
if(istype(A, /obj/structure/window)) //destroys windows and grilles in one hit (or more if it has a ton of health like plasmaglass)
var/obj/structure/window/W = A
W.take_damage(200, BRUTE, "melee", 0)
W.take_damage(200, BRUTE, MELEE, 0)
else if(istype(A, /obj/structure/grille))
var/obj/structure/grille/G = A
G.take_damage(40, BRUTE, "melee", 0)
G.take_damage(40, BRUTE, MELEE, 0)
/*
* Bone Axe
@@ -27,6 +27,6 @@
for(var/obj/structure/blob/B in view(8,src))
var/damage = round(30/(get_dist(B,src)+1))
B.take_damage(damage, BURN, "melee", 0)
B.take_damage(damage, BURN, MELEE, 0)
sleep(80)
qdel(src)
+1 -1
View File
@@ -40,7 +40,7 @@
throw_range = 5
custom_materials = list(/datum/material/iron=500)
breakouttime = 600 //Deciseconds = 60s = 1 minute
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 50)
armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, BIO = 0, RAD = 0, FIRE = 50, ACID = 50)
var/cuffsound = 'sound/weapons/handcuffs.ogg'
var/trashtype = null //for disposable cuffs
+1 -1
View File
@@ -5,7 +5,7 @@
desc = "Deus Vult."
icon_state = "knight_templar"
item_state = "knight_templar"
armor = list("melee" = 41, "bullet" = 15, "laser" = 5,"energy" = 5, "bomb" = 5, "bio" = 2, "rad" = 0, "fire" = 0, "acid" = 50)
armor = list(MELEE = 41, BULLET = 15, LASER = 5,ENERGY = 5, BOMB = 5, BIO = 2, RAD = 0, FIRE = 0, ACID = 50)
flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE|HIDEHAIR
flags_cover = HEADCOVERSEYES | HEADCOVERSMOUTH
strip_delay = 80
+4 -4
View File
@@ -27,7 +27,7 @@
flags_1 = CONDUCT_1
attack_verb = list("attacked", "stabbed", "poked")
hitsound = 'sound/weapons/bladeslice.ogg'
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 30)
armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, BIO = 0, RAD = 0, FIRE = 50, ACID = 30)
sharpness = SHARP_POINTY
var/datum/reagent/forkload //used to eat omelette
@@ -78,7 +78,7 @@
custom_materials = list(/datum/material/iron=12000)
attack_verb = list("slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
sharpness = SHARP_POINTY
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 50)
armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, BIO = 0, RAD = 0, FIRE = 50, ACID = 50)
var/bayonet = FALSE //Can this be attached to a gun?
wound_bonus = -5
bare_wound_bonus = 10
@@ -114,7 +114,7 @@
custom_materials = list(/datum/material/iron=12000)
attack_verb = list("slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
sharpness = SHARP_POINTY
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 50)
armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, BIO = 0, RAD = 0, FIRE = 50, ACID = 50)
var/bayonet = FALSE //Can this be attached to a gun?
wound_bonus = -5
bare_wound_bonus = 10
@@ -266,7 +266,7 @@
force = 8
throwforce = 12//fuck git
attack_verb = list("shanked", "shivved")
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 0, "acid" = 0)
armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, BIO = 0, RAD = 0, FIRE = 0, ACID = 0)
custom_materials = list(/datum/material/glass=400)
/obj/item/kitchen/knife/shiv/carrot
+1 -1
View File
@@ -2,7 +2,7 @@
hitsound_on = 'sound/weapons/blade1.ogg'
heat = 3500
max_integrity = 200
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 30)
armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, BIO = 0, RAD = 0, FIRE = 100, ACID = 30)
resistance_flags = FIRE_PROOF
var/brightness_on = 3
var/sword_color
+1 -1
View File
@@ -11,7 +11,7 @@
hitsound = 'sound/weapons/bladeslice.ogg'
sharpness = SHARP_EDGED
max_integrity = 200
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 30)
armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, BIO = 0, RAD = 0, FIRE = 100, ACID = 30)
resistance_flags = FIRE_PROOF
var/wielded = FALSE // track wielded status on item
+1 -1
View File
@@ -13,7 +13,7 @@
item_state = "bulldog"
lefthand_file = 'icons/mob/inhands/weapons/guns_lefthand.dmi'
righthand_file = 'icons/mob/inhands/weapons/guns_righthand.dmi'
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 60, "acid" = 50)
armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, BIO = 0, RAD = 0, FIRE = 60, ACID = 50)
var/maxWeightClass = 20 //The max weight of items that can fit into the cannon
var/loadedWeightClass = 0 //The weight of items currently in the cannon
var/obj/item/tank/internals/tank = null //The gas tank that is drawn from to fire things
+1 -1
View File
@@ -12,7 +12,7 @@
throwforce = 10
throw_range = 7
w_class = WEIGHT_CLASS_NORMAL
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 40)
armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, BIO = 0, RAD = 0, FIRE = 100, ACID = 40)
resistance_flags = FIRE_PROOF
attack_speed = CLICK_CD_MELEE * 1.5
var/fisto_setting = 1
+1 -1
View File
@@ -39,7 +39,7 @@
explosion_block = 3
heat_proof = TRUE
max_integrity = 600
armor = list("melee" = 100, "bullet" = 100, "laser" = 100, "energy" = 100, "bomb" = 100, "bio" = 100, "rad" = 100, "fire" = 100, "acid" = 100)
armor = list(MELEE = 100, BULLET = 100, LASER = 100, ENERGY = 100, BOMB = 100, BIO = 100, RAD = 100, FIRE = 100, ACID = 100)
resistance_flags = INDESTRUCTIBLE | FIRE_PROOF | ACID_PROOF | LAVA_PROOF
damage_deflection = 70
/// Make sure that the key has the same puzzle_id as the keycard door!
+4 -4
View File
@@ -188,7 +188,7 @@
w_class = WEIGHT_CLASS_BULKY
slowdown = 2.0 //gotta pretend we're balanced.
body_parts_covered = CHEST|GROIN|LEGS|FEET|ARMS|HANDS
armor = list("melee" = 50, "bullet" = 50, "laser" = 50, "energy" = 40, "bomb" = 60, "bio" = 0, "rad" = 0, "fire" = 60, "acid" = 60)
armor = list(MELEE = 50, BULLET = 50, LASER = 50, ENERGY = 40, BOMB = 60, BIO = 0, RAD = 0, FIRE = 60, ACID = 60)
mutantrace_variation = STYLE_DIGITIGRADE|STYLE_NO_ANTHRO_ICON
/obj/item/clothing/suit/armor/plate/crusader/red
@@ -203,7 +203,7 @@
icon_state = "crusader"
w_class = WEIGHT_CLASS_NORMAL
flags_inv = HIDEHAIR|HIDEEARS|HIDEFACE
armor = list("melee" = 50, "bullet" = 50, "laser" = 50, "energy" = 40, "bomb" = 60, "bio" = 0, "rad" = 0, "fire" = 60, "acid" = 60)
armor = list(MELEE = 50, BULLET = 50, LASER = 50, ENERGY = 40, BOMB = 60, BIO = 0, RAD = 0, FIRE = 60, ACID = 60)
/obj/item/clothing/head/helmet/plate/crusader/blue
icon_state = "crusader-blue"
@@ -218,7 +218,7 @@
icon_state = "prophet"
mob_overlay_icon = 'icons/mob/large-worn-icons/64x64/head.dmi'
flags_1 = NONE
armor = list("melee" = 60, "bullet" = 60, "laser" = 60, "energy" = 50, "bomb" = 70, "bio" = 50, "rad" = 50, "fire" = 60, "acid" = 60) //religion protects you from disease and radiation, honk.
armor = list(MELEE = 60, BULLET = 60, LASER = 60, ENERGY = 50, BOMB = 70, BIO = 50, RAD = 50, FIRE = 60, ACID = 60) //religion protects you from disease and radiation, honk.
worn_x_dimension = 64
worn_y_dimension = 64
@@ -277,7 +277,7 @@
desc = "Metal boots, they look heavy."
icon_state = "crusader"
w_class = WEIGHT_CLASS_NORMAL
armor = list("melee" = 50, "bullet" = 50, "laser" = 50, "energy" = 40, "bomb" = 60, "bio" = 0, "rad" = 0, "fire" = 60, "acid" = 60) //does this even do anything on boots?
armor = list(MELEE = 50, BULLET = 50, LASER = 50, ENERGY = 40, BOMB = 60, BIO = 0, RAD = 0, FIRE = 60, ACID = 60) //does this even do anything on boots?
clothing_flags = NOSLIP
cold_protection = FEET
min_cold_protection_temperature = SHOES_MIN_TEMP_PROTECT
+6 -6
View File
@@ -3,7 +3,7 @@
icon = 'icons/obj/shields.dmi'
item_flags = ITEM_CAN_BLOCK
block_parry_data = /datum/block_parry_data/shield
armor = list("melee" = 50, "bullet" = 50, "laser" = 50, "energy" = 0, "bomb" = 30, "bio" = 0, "rad" = 0, "fire" = 80, "acid" = 70)
armor = list(MELEE = 50, BULLET = 50, LASER = 50, ENERGY = 0, BOMB = 30, BIO = 0, RAD = 0, FIRE = 80, ACID = 70)
/// Shield flags
var/shield_flags = SHIELD_FLAGS_DEFAULT
/// Last shieldbash world.time
@@ -304,7 +304,7 @@
/obj/item/shield/riot/energy_proof
name = "energy resistant shield"
desc = "An ablative shield designed to absorb and disperse energy attacks. This comes at significant cost to its ability to withstand ballistics and kinetics, breaking apart easily."
armor = list("melee" = 30, "bullet" = -10, "laser" = 80, "energy" = 80, "bomb" = -40, "bio" = 0, "rad" = 0, "fire" = 0, "acid" = 50)
armor = list(MELEE = 30, BULLET = -10, LASER = 80, ENERGY = 80, BOMB = -40, BIO = 0, RAD = 0, FIRE = 0, ACID = 50)
icon_state = "riot_laser"
item_state = "riot_laser"
lefthand_file = 'icons/mob/inhands/equipment/shields_lefthand.dmi'
@@ -315,7 +315,7 @@
/obj/item/shield/riot/kinetic_proof
name = "kinetic resistant shield"
desc = "A polymer and ceramic shield designed to absorb ballistic projectiles and kinetic force. It doesn't do very well into energy attacks, especially from weapons that inflict burns."
armor = list("melee" = 30, "bullet" = 80, "laser" = 0, "energy" = 0, "bomb" = -40, "bio" = 0, "rad" = 0, "fire" = 0, "acid" = 50)
armor = list(MELEE = 30, BULLET = 80, LASER = 0, ENERGY = 0, BOMB = -40, BIO = 0, RAD = 0, FIRE = 0, ACID = 50)
icon_state = "riot_bullet"
item_state = "riot_bullet"
shield_flags = SHIELD_FLAGS_DEFAULT | SHIELD_KINETIC_STRONG | SHIELD_ENERGY_WEAK
@@ -334,7 +334,7 @@
/obj/item/shield/riot/roman/fake
desc = "Bears an inscription on the inside: <i>\"Romanes venio domus\"</i>. It appears to be a bit flimsy."
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 0, "acid" = 0)
armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, BIO = 0, RAD = 0, FIRE = 0, ACID = 0)
shield_flags = SHIELD_ENERGY_WEAK | SHIELD_KINETIC_WEAK | SHIELD_NO_RANGED
max_integrity = 40
@@ -471,7 +471,7 @@
/obj/item/shield/makeshift
name = "metal shield"
desc = "A large shield made of wired and welded sheets of metal. The handle is made of cloth and leather, making it unwieldy."
armor = list("melee" = 25, "bullet" = 25, "laser" = 5, "energy" = 0, "bomb" = 30, "bio" = 0, "rad" = 0, "fire" = 70, "acid" = 80)
armor = list(MELEE = 25, BULLET = 25, LASER = 5, ENERGY = 0, BOMB = 30, BIO = 0, RAD = 0, FIRE = 70, ACID = 80)
lefthand_file = 'icons/mob/inhands/equipment/shields_lefthand.dmi'
righthand_file = 'icons/mob/inhands/equipment/shields_righthand.dmi'
item_state = "metal"
@@ -485,7 +485,7 @@
/obj/item/shield/riot/tower
name = "tower shield"
desc = "An immense tower shield. Designed to ensure maximum protection to the user, at the expense of mobility."
armor = list("melee" = 95, "bullet" = 95, "laser" = 75, "energy" = 60, "bomb" = 90, "bio" = 90, "rad" = 0, "fire" = 90, "acid" = 10) //Armor for the item, dosnt transfer to user
armor = list(MELEE = 95, BULLET = 95, LASER = 75, ENERGY = 60, BOMB = 90, BIO = 90, RAD = 0, FIRE = 90, ACID = 10) //Armor for the item, dosnt transfer to user
item_state = "metal"
icon_state = "metal"
force = 16
+1 -1
View File
@@ -10,7 +10,7 @@
throwforce = 15
throw_range = 1
w_class = WEIGHT_CLASS_HUGE
armor = list("melee" = 50, "bullet" = 50, "laser" = 50, "energy" = 0, "bomb" = 50, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 100)
armor = list(MELEE = 50, BULLET = 50, LASER = 50, ENERGY = 0, BOMB = 50, BIO = 0, RAD = 0, FIRE = 100, ACID = 100)
resistance_flags = FIRE_PROOF | ACID_PROOF
force_string = "LORD SINGULOTH HIMSELF"
total_mass = TOTAL_MASS_MEDIEVAL_WEAPON
+1 -1
View File
@@ -17,7 +17,7 @@
attack_verb = list("attacked", "poked", "jabbed", "torn", "gored")
sharpness = SHARP_EDGED
max_integrity = 200
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 30)
armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, BIO = 0, RAD = 0, FIRE = 50, ACID = 30)
var/obj/item/grenade/explosive = null
var/war_cry = "AAAAARGH!!!"
var/icon_prefix = "spearglass"
@@ -34,7 +34,7 @@ GLOBAL_LIST_INIT(glass_recipes, list ( \
icon_state = "sheet-glass"
item_state = "sheet-glass"
custom_materials = list(/datum/material/glass=MINERAL_MATERIAL_AMOUNT)
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 100)
armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, BIO = 0, RAD = 0, FIRE = 50, ACID = 100)
resistance_flags = ACID_PROOF
merge_type = /obj/item/stack/sheet/glass
grind_results = list(/datum/reagent/silicon = 20)
@@ -106,7 +106,7 @@ GLOBAL_LIST_INIT(pglass_recipes, list ( \
icon_state = "sheet-pglass"
item_state = "sheet-pglass"
custom_materials = list(/datum/material/plasma=MINERAL_MATERIAL_AMOUNT * 0.5, /datum/material/glass=MINERAL_MATERIAL_AMOUNT)
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 75, "acid" = 100)
armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, BIO = 0, RAD = 0, FIRE = 75, ACID = 100)
resistance_flags = ACID_PROOF
merge_type = /obj/item/stack/sheet/plasmaglass
grind_results = list(/datum/reagent/silicon = 20, /datum/reagent/toxin/plasma = 10)
@@ -161,7 +161,7 @@ GLOBAL_LIST_INIT(reinforced_glass_recipes, list ( \
icon_state = "sheet-rglass"
item_state = "sheet-rglass"
custom_materials = list(/datum/material/iron=MINERAL_MATERIAL_AMOUNT * 0.5, /datum/material/glass=MINERAL_MATERIAL_AMOUNT)
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 70, "acid" = 100)
armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, BIO = 0, RAD = 0, FIRE = 70, ACID = 100)
resistance_flags = ACID_PROOF
merge_type = /obj/item/stack/sheet/rglass
grind_results = list(/datum/reagent/silicon = 20, /datum/reagent/iron = 10)
@@ -209,7 +209,7 @@ GLOBAL_LIST_INIT(prglass_recipes, list ( \
icon_state = "sheet-prglass"
item_state = "sheet-prglass"
custom_materials = list(/datum/material/plasma=MINERAL_MATERIAL_AMOUNT * 0.5, /datum/material/glass=MINERAL_MATERIAL_AMOUNT, /datum/material/iron=MINERAL_MATERIAL_AMOUNT * 0.5,)
armor = list("melee" = 20, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 80, "acid" = 100)
armor = list(MELEE = 20, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, BIO = 0, RAD = 0, FIRE = 80, ACID = 100)
resistance_flags = ACID_PROOF
merge_type = /obj/item/stack/sheet/plasmarglass
grind_results = list(/datum/reagent/silicon = 20, /datum/reagent/toxin/plasma = 10, /datum/reagent/iron = 10)
@@ -236,7 +236,7 @@ GLOBAL_LIST_INIT(titaniumglass_recipes, list(
icon_state = "sheet-titaniumglass"
item_state = "sheet-titaniumglass"
custom_materials = list(/datum/material/titanium=MINERAL_MATERIAL_AMOUNT * 0.5, /datum/material/glass=MINERAL_MATERIAL_AMOUNT)
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 80, "acid" = 100)
armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, BIO = 0, RAD = 0, FIRE = 80, ACID = 100)
resistance_flags = ACID_PROOF
merge_type = /obj/item/stack/sheet/titaniumglass
shard_type = /obj/item/shard
@@ -260,7 +260,7 @@ GLOBAL_LIST_INIT(plastitaniumglass_recipes, list(
icon_state = "sheet-plastitaniumglass"
item_state = "sheet-plastitaniumglass"
custom_materials = list(/datum/material/titanium=MINERAL_MATERIAL_AMOUNT * 0.5, /datum/material/plasma=MINERAL_MATERIAL_AMOUNT * 0.5, /datum/material/glass=MINERAL_MATERIAL_AMOUNT)
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 80, "acid" = 100)
armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, BIO = 0, RAD = 0, FIRE = 80, ACID = 100)
resistance_flags = ACID_PROOF
merge_type = /obj/item/stack/sheet/plastitaniumglass
shard_type = /obj/item/shard
@@ -291,7 +291,7 @@ GLOBAL_LIST_INIT(plastitaniumglass_recipes, list(
attack_verb = list("stabbed", "slashed", "sliced", "cut")
hitsound = 'sound/weapons/bladeslice.ogg'
resistance_flags = ACID_PROOF
armor = list("melee" = 100, "bullet" = 0, "laser" = 0, "energy" = 100, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 100)
armor = list(MELEE = 100, BULLET = 0, LASER = 0, ENERGY = 100, BOMB = 0, BIO = 0, RAD = 0, FIRE = 50, ACID = 100)
max_integrity = 40
sharpness = SHARP_EDGED
var/icon_prefix
@@ -212,7 +212,7 @@ GLOBAL_LIST_INIT(plasteel_recipes, list ( \
custom_materials = list(/datum/material/iron=MINERAL_MATERIAL_AMOUNT, /datum/material/plasma=MINERAL_MATERIAL_AMOUNT)
throwforce = 10
flags_1 = CONDUCT_1
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 80)
armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, BIO = 0, RAD = 0, FIRE = 100, ACID = 80)
resistance_flags = FIRE_PROOF
merge_type = /obj/item/stack/sheet/plasteel
grind_results = list(/datum/reagent/iron = 20, /datum/reagent/toxin/plasma = 20)
@@ -291,7 +291,7 @@ GLOBAL_LIST_INIT(wood_recipes, list ( \
icon = 'icons/obj/stack_objects.dmi'
custom_materials = list(/datum/material/wood=MINERAL_MATERIAL_AMOUNT)
sheettype = "wood"
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 0)
armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, BIO = 0, RAD = 0, FIRE = 50, ACID = 0)
resistance_flags = FLAMMABLE
merge_type = /obj/item/stack/sheet/mineral/wood
novariants = TRUE
@@ -355,7 +355,7 @@ GLOBAL_LIST_INIT(bamboo_recipes, list ( \
icon = 'icons/obj/stack_objects.dmi'
custom_materials = list(/datum/material/bamboo = MINERAL_MATERIAL_AMOUNT)
throwforce = 15
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 0)
armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, BIO = 0, RAD = 0, FIRE = 50, ACID = 0)
resistance_flags = FLAMMABLE
merge_type = /obj/item/stack/sheet/mineral/bamboo
grind_results = list(/datum/reagent/cellulose = 10)
@@ -530,7 +530,7 @@
flags_1 = CONDUCT_1
turf_type = /turf/open/floor/plasteel
mineralType = "metal"
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 70)
armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, BIO = 0, RAD = 0, FIRE = 100, ACID = 70)
resistance_flags = FIRE_PROOF
/obj/item/stack/tile/plasteel/cyborg
+1 -1
View File
@@ -44,7 +44,7 @@
item_state = "holdingpack"
resistance_flags = FIRE_PROOF
item_flags = NO_MAT_REDEMPTION
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 60, "acid" = 50)
armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, BIO = 0, RAD = 0, FIRE = 60, ACID = 50)
component_type = /datum/component/storage/concrete/bluespace/bag_of_holding
rad_flags = RAD_PROTECT_CONTENTS | RAD_NO_CONTAMINATE
+2 -2
View File
@@ -13,7 +13,7 @@
throwforce = 7
w_class = WEIGHT_CLASS_NORMAL
attack_verb = list("beaten")
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 50, "bio" = 0, "rad" = 0, "fire" = 80, "acid" = 80)
armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 50, BIO = 0, RAD = 0, FIRE = 80, ACID = 80)
attack_speed = CLICK_CD_MELEE
var/stamina_loss_amount = 35
@@ -190,7 +190,7 @@
var/final_stamina_loss_amount = stamina_loss_amount //Our stunning power for the baton
var/shoved = FALSE //Did we succeed on knocking our target over?
var/zap_penetration = armor_pen
var/zap_block = L.run_armor_check(BODY_ZONE_CHEST, "melee", null, null, zap_penetration) //armor check, including calculation for armor penetration, for our attack
var/zap_block = L.run_armor_check(BODY_ZONE_CHEST, MELEE, null, null, zap_penetration) //armor check, including calculation for armor penetration, for our attack
final_stamina_loss_amount = block_calculate_resultant_damage(final_stamina_loss_amount, return_list)
var/obj/item/stock_parts/cell/our_cell = get_cell()
+1 -1
View File
@@ -15,7 +15,7 @@
throw_range = 4
custom_materials = list(/datum/material/iron = 500)
actions_types = list(/datum/action/item_action/set_internals)
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 10, "bio" = 0, "rad" = 0, "fire" = 80, "acid" = 30)
armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 10, BIO = 0, RAD = 0, FIRE = 80, ACID = 30)
var/datum/gas_mixture/air_contents = null
var/distribute_pressure = ONE_ATMOSPHERE
var/integrity = 3
+1 -1
View File
@@ -10,7 +10,7 @@
slowdown = 1
actions_types = list(/datum/action/item_action/toggle_mister)
max_integrity = 200
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 30)
armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, BIO = 0, RAD = 0, FIRE = 100, ACID = 30)
resistance_flags = FIRE_PROOF
var/obj/item/noz
+1 -1
View File
@@ -107,7 +107,7 @@
throw_speed = 3
throw_range = 5
custom_materials = list(/datum/material/iron=10000)
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 30, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 100)
armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 30, BIO = 0, RAD = 0, FIRE = 100, ACID = 100)
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | ACID_PROOF
var/list/active_portal_pairs
var/max_portal_pairs = 3
+1 -1
View File
@@ -17,7 +17,7 @@
attack_verb = list("attacked", "bashed", "battered", "bludgeoned", "whacked")
tool_behaviour = TOOL_CROWBAR
toolspeed = 1
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 30)
armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, BIO = 0, RAD = 0, FIRE = 50, ACID = 30)
wound_bonus = -10
bare_wound_bonus = 5
+1 -1
View File
@@ -20,7 +20,7 @@
usesound = list('sound/items/screwdriver.ogg', 'sound/items/screwdriver2.ogg')
tool_behaviour = TOOL_SCREWDRIVER
toolspeed = 1
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 30)
armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, BIO = 0, RAD = 0, FIRE = 50, ACID = 30)
var/random_color = TRUE //if the screwdriver uses random coloring
var/static/list/screwdriver_colors = list(
"blue" = rgb(24, 97, 213),

Some files were not shown because too many files have changed in this diff Show More