mirror of
https://github.com/KabKebab/GS13.git
synced 2026-07-13 08:57:01 +01:00
Merge pull request #48 from shellspeed1/mech-capacitor-and-scanner-update
Ports some code improvements and gives odyessy, ripley, and firefighter scanners and capacitors.
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
#define MECHA_INT_FIRE (1<<0)
|
||||
#define MECHA_INT_TEMP_CONTROL (1<<1)
|
||||
#define MECHA_INT_SHORT_CIRCUIT (1<<2)
|
||||
#define MECHA_INT_TANK_BREACH (1<<3)
|
||||
#define MECHA_INT_CONTROL_LOST (1<<4)
|
||||
|
||||
#define MECHA_MELEE (1 << 0)
|
||||
#define MECHA_RANGED (1 << 1)
|
||||
|
||||
#define MECHA_FRONT_ARMOUR 1
|
||||
#define MECHA_SIDE_ARMOUR 2
|
||||
#define MECHA_BACK_ARMOUR 3
|
||||
|
||||
#define MECHA_LOCKED 0
|
||||
#define MECHA_SECURE_BOLTS 1
|
||||
#define MECHA_LOOSE_BOLTS 2
|
||||
#define MECHA_OPEN_HATCH 3
|
||||
@@ -11,7 +11,8 @@
|
||||
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
|
||||
var/range = MELEE //bitFflags
|
||||
///Bitflag. Determines the range of the equipment.
|
||||
var/range = MECHA_MELEE
|
||||
var/salvageable = 1
|
||||
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.
|
||||
@@ -59,10 +60,10 @@
|
||||
return txt
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/proc/is_ranged()//add a distance restricted equipment. Why not?
|
||||
return range&RANGED
|
||||
return range&MECHA_RANGED
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/proc/is_melee()
|
||||
return range&MELEE
|
||||
return range&MECHA_MELEE
|
||||
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/proc/action_checks(atom/target)
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
icon = 'icons/obj/machines/sleeper.dmi'
|
||||
icon_state = "sleeper"
|
||||
energy_drain = 20
|
||||
range = MELEE
|
||||
range = MECHA_MELEE
|
||||
equip_cooldown = 20
|
||||
var/mob/living/carbon/patient = null
|
||||
var/inject_amount = 10
|
||||
@@ -252,7 +252,7 @@
|
||||
var/synth_speed = 5 //[num] reagent units per cycle
|
||||
energy_drain = 10
|
||||
var/mode = 0 //0 - fire syringe, 1 - analyze reagents.
|
||||
range = MELEE|RANGED
|
||||
range = MECHA_MELEE|MECHA_RANGED
|
||||
equip_cooldown = 10
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/medical/syringe_gun/Initialize()
|
||||
@@ -527,7 +527,7 @@
|
||||
desc = "Equipment for medical exosuits. Generates a focused beam of medical nanites."
|
||||
icon_state = "mecha_medigun"
|
||||
energy_drain = 10
|
||||
range = MELEE|RANGED
|
||||
range = MECHA_MELEE|MECHA_RANGED
|
||||
equip_cooldown = 0
|
||||
var/obj/item/gun/medbeam/mech/medigun
|
||||
materials = list(MAT_METAL = 15000, MAT_GLASS = 8000, MAT_PLASMA = 3000, MAT_GOLD = 8000, MAT_DIAMOND = 2000)
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
icon_state = "mecha_teleport"
|
||||
equip_cooldown = 150
|
||||
energy_drain = 1000
|
||||
range = RANGED
|
||||
range = MECHA_RANGED
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/teleporter/action(atom/target)
|
||||
if(!action_checks(target) || is_centcom_level(loc.z))
|
||||
@@ -30,7 +30,7 @@
|
||||
icon_state = "mecha_wholegen"
|
||||
equip_cooldown = 50
|
||||
energy_drain = 300
|
||||
range = RANGED
|
||||
range = MECHA_RANGED
|
||||
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/wormhole_generator/action(atom/target)
|
||||
@@ -73,7 +73,7 @@
|
||||
icon_state = "mecha_teleport"
|
||||
equip_cooldown = 10
|
||||
energy_drain = 100
|
||||
range = MELEE|RANGED
|
||||
range = MECHA_MELEE|MECHA_RANGED
|
||||
var/atom/movable/locked
|
||||
var/mode = 1 //1 - gravsling 2 - gravpush
|
||||
|
||||
@@ -350,7 +350,7 @@
|
||||
name = "exosuit plasma converter"
|
||||
desc = "An exosuit module that generates power using solid plasma as fuel. Pollutes the environment."
|
||||
icon_state = "tesla"
|
||||
range = MELEE
|
||||
range = MECHA_MELEE
|
||||
var/coeff = 100
|
||||
var/obj/item/stack/sheet/fuel
|
||||
var/max_fuel = 150000
|
||||
|
||||
@@ -164,7 +164,7 @@
|
||||
icon_state = "mecha_exting"
|
||||
equip_cooldown = 5
|
||||
energy_drain = 0
|
||||
range = MELEE|RANGED
|
||||
range = MECHA_MELEE|MECHA_RANGED
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/extinguisher/Initialize()
|
||||
. = ..()
|
||||
@@ -231,7 +231,7 @@
|
||||
icon_state = "mecha_rcd"
|
||||
equip_cooldown = 10
|
||||
energy_drain = 250
|
||||
range = MELEE|RANGED
|
||||
range = MECHA_MELEE|MECHA_RANGED
|
||||
item_flags = NO_MAT_REDEMPTION
|
||||
var/mode = 0 //0 - deconstruct, 1 - wall or floor, 2 - airlock.
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon
|
||||
name = "mecha weapon"
|
||||
range = RANGED
|
||||
range = MECHA_RANGED
|
||||
var/projectile
|
||||
var/fire_sound
|
||||
var/projectiles_per_shot = 1
|
||||
@@ -154,7 +154,7 @@
|
||||
icon_state = "mecha_honker"
|
||||
energy_drain = 200
|
||||
equip_cooldown = 150
|
||||
range = MELEE|RANGED
|
||||
range = MECHA_MELEE|MECHA_RANGED
|
||||
kickback = FALSE
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/honker/can_attach(obj/mecha/combat/honker/M)
|
||||
@@ -405,7 +405,7 @@
|
||||
icon_state = "mecha_punching_glove"
|
||||
energy_drain = 250
|
||||
equip_cooldown = 20
|
||||
range = MELEE|RANGED
|
||||
range = MECHA_MELEE|MECHA_RANGED
|
||||
missile_range = 5
|
||||
projectile = /obj/item/punching_glove
|
||||
fire_sound = 'sound/items/bikehorn.ogg'
|
||||
|
||||
@@ -1,17 +1,3 @@
|
||||
#define MECHA_INT_FIRE (1<<0)
|
||||
#define MECHA_INT_TEMP_CONTROL (1<<1)
|
||||
#define MECHA_INT_SHORT_CIRCUIT (1<<2)
|
||||
#define MECHA_INT_TANK_BREACH (1<<3)
|
||||
#define MECHA_INT_CONTROL_LOST (1<<4)
|
||||
|
||||
#define MELEE 1
|
||||
#define RANGED 2
|
||||
|
||||
#define FRONT_ARMOUR 1
|
||||
#define SIDE_ARMOUR 2
|
||||
#define BACK_ARMOUR 3
|
||||
|
||||
|
||||
/obj/mecha
|
||||
name = "mecha"
|
||||
desc = "Exosuit"
|
||||
@@ -35,9 +21,9 @@
|
||||
max_integrity = 300 //max_integrity is base health
|
||||
var/deflect_chance = 10 //chance to deflect the incoming projectiles, hits, or lesser the effect of ex_act.
|
||||
armor = list("melee" = 20, "bullet" = 10, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 100)
|
||||
var/list/facing_modifiers = list(FRONT_ARMOUR = 1.5, SIDE_ARMOUR = 1, BACK_ARMOUR = 0.5)
|
||||
var/list/facing_modifiers = list(MECHA_FRONT_ARMOUR = 1.5, MECHA_SIDE_ARMOUR = 1, MECHA_BACK_ARMOUR = 0.5)
|
||||
var/obj/item/stock_parts/cell/cell
|
||||
var/state = 0
|
||||
var/construction_state = MECHA_LOCKED
|
||||
var/list/log = new
|
||||
var/last_message = 0
|
||||
var/add_req_access = 1
|
||||
@@ -436,7 +422,7 @@
|
||||
return
|
||||
if(user.incapacitated())
|
||||
return
|
||||
if(state)
|
||||
if(construction_state)
|
||||
occupant_message("<span class='warning'>Maintenance protocols in effect.</span>")
|
||||
return
|
||||
if(!get_charge())
|
||||
@@ -519,7 +505,7 @@
|
||||
occupant_message("<span class='warning'>Unable to move while connected to the air system port!</span>")
|
||||
last_message = world.time
|
||||
return 0
|
||||
if(state)
|
||||
if(construction_state)
|
||||
occupant_message("<span class='danger'>Maintenance protocols in effect.</span>")
|
||||
return
|
||||
return domove(direction)
|
||||
@@ -689,7 +675,7 @@
|
||||
//Transfer from core or card to mech. Proc is called by mech.
|
||||
switch(interaction)
|
||||
if(AI_TRANS_TO_CARD) //Upload AI from mech to AI card.
|
||||
if(!state) //Mech must be in maint mode to allow carding.
|
||||
if(construction_state) //Mech must be in maint mode to allow carding.
|
||||
to_chat(user, "<span class='warning'>[name] must have maintenance protocols active in order to allow a transfer.</span>")
|
||||
return
|
||||
AI = occupant
|
||||
|
||||
@@ -116,7 +116,7 @@
|
||||
|
||||
//9
|
||||
list(
|
||||
"key" = /obj/item/stock_parts/cell,
|
||||
"key" = /obj/item/stock_parts/scanning_module,
|
||||
"action" = ITEM_MOVE_INSIDE,
|
||||
"back_key" = TOOL_SCREWDRIVER,
|
||||
"desc" = "Peripherals control module is secured."
|
||||
@@ -126,10 +126,40 @@
|
||||
list(
|
||||
"key" = TOOL_SCREWDRIVER,
|
||||
"back_key" = TOOL_CROWBAR,
|
||||
"desc" = "The power cell is installed."
|
||||
"desc" = "Scanner module is installed."
|
||||
),
|
||||
|
||||
//11
|
||||
list(
|
||||
"key" = /obj/item/stock_parts/capacitor,
|
||||
"action" = ITEM_MOVE_INSIDE,
|
||||
"back_key" = TOOL_SCREWDRIVER,
|
||||
"desc" = "Scanner module is secured."
|
||||
),
|
||||
|
||||
//12
|
||||
list(
|
||||
"key" = TOOL_SCREWDRIVER,
|
||||
"back_key" = TOOL_CROWBAR,
|
||||
"desc" = "Capacitor is installed."
|
||||
),
|
||||
|
||||
//13
|
||||
list(
|
||||
"key" = /obj/item/stock_parts/cell,
|
||||
"action" = ITEM_MOVE_INSIDE,
|
||||
"back_key" = TOOL_SCREWDRIVER,
|
||||
"desc" = "Capacitor is secured."
|
||||
),
|
||||
|
||||
//14
|
||||
list(
|
||||
"key" = TOOL_SCREWDRIVER,
|
||||
"back_key" = TOOL_CROWBAR,
|
||||
"desc" = "The power cell is installed."
|
||||
),
|
||||
|
||||
//15
|
||||
list(
|
||||
"key" = /obj/item/stack/sheet/metal,
|
||||
"amount" = 5,
|
||||
@@ -137,21 +167,21 @@
|
||||
"desc" = "The power cell is secured."
|
||||
),
|
||||
|
||||
//12
|
||||
//16
|
||||
list(
|
||||
"key" = TOOL_WRENCH,
|
||||
"back_key" = TOOL_CROWBAR,
|
||||
"desc" = "Internal armor is installed."
|
||||
),
|
||||
|
||||
//13
|
||||
//17
|
||||
list(
|
||||
"key" = TOOL_WELDER,
|
||||
"back_key" = TOOL_WRENCH,
|
||||
"desc" = "Internal armor is wrenched."
|
||||
),
|
||||
|
||||
//14
|
||||
//18
|
||||
list(
|
||||
"key" = /obj/item/stack/sheet/plasteel,
|
||||
"amount" = 5,
|
||||
@@ -159,14 +189,14 @@
|
||||
"desc" = "Internal armor is welded."
|
||||
),
|
||||
|
||||
//15
|
||||
//19
|
||||
list(
|
||||
"key" = TOOL_WRENCH,
|
||||
"back_key" = TOOL_CROWBAR,
|
||||
"desc" = "External armor is installed."
|
||||
),
|
||||
|
||||
//16
|
||||
//20
|
||||
list(
|
||||
"key" = TOOL_WELDER,
|
||||
"back_key" = TOOL_WRENCH,
|
||||
@@ -222,36 +252,56 @@
|
||||
else
|
||||
user.visible_message("[user] unfastens the peripherals control module.", "<span class='notice'>You unfasten the peripherals control module.</span>")
|
||||
if(10)
|
||||
if(diff==FORWARD)
|
||||
user.visible_message("[user] secures the scanner module.", "<span class='notice'>You secure the scanner module.</span>")
|
||||
else
|
||||
user.visible_message("[user] removes the scanner module from [parent].", "<span class='notice'>You remove the scanner module from [parent].</span>")
|
||||
if(11)
|
||||
if(diff==FORWARD)
|
||||
user.visible_message("[user] installs [I] to [parent].", "<span class='notice'>You install [I] to [parent].</span>")
|
||||
else
|
||||
user.visible_message("[user] unfastens the scanner module.", "<span class='notice'>You unfasten the scanner module.</span>")
|
||||
if(12)
|
||||
if(diff==FORWARD)
|
||||
user.visible_message("[user] secures [I].", "<span class='notice'>You secure [I].</span>")
|
||||
else
|
||||
user.visible_message("[user] removes the capacitor from [parent].", "<span class='notice'>You remove the capacitor from [parent].</span>")
|
||||
if(13)
|
||||
if(diff==FORWARD)
|
||||
user.visible_message("[user] installs [I].", "<span class='notice'>You install [I].</span>")
|
||||
else
|
||||
user.visible_message("[user] unsecures the capacitor from [parent].", "<span class='notice'>You unsecure the capacitor from [parent].</span>")
|
||||
if(14)
|
||||
if(diff==FORWARD)
|
||||
user.visible_message("[user] secures the power cell.", "<span class='notice'>You secure the power cell.</span>")
|
||||
else
|
||||
user.visible_message("[user] pries the power cell from [parent].", "<span class='notice'>You pry the power cell from [parent].</span>")
|
||||
if(11)
|
||||
if(15)
|
||||
if(diff==FORWARD)
|
||||
user.visible_message("[user] installs the internal armor layer to [parent].", "<span class='notice'>You install the internal armor layer to [parent].</span>")
|
||||
else
|
||||
user.visible_message("[user] unfastens the power cell.", "<span class='notice'>You unfasten the power cell.</span>")
|
||||
if(12)
|
||||
if(16)
|
||||
if(diff==FORWARD)
|
||||
user.visible_message("[user] secures the internal armor layer.", "<span class='notice'>You secure the internal armor layer.</span>")
|
||||
else
|
||||
user.visible_message("[user] pries internal armor layer from [parent].", "<span class='notice'>You pry internal armor layer from [parent].</span>")
|
||||
if(13)
|
||||
if(17)
|
||||
if(diff==FORWARD)
|
||||
user.visible_message("[user] welds the internal armor layer to [parent].", "<span class='notice'>You weld the internal armor layer to [parent].</span>")
|
||||
else
|
||||
user.visible_message("[user] unfastens the internal armor layer.", "<span class='notice'>You unfasten the internal armor layer.</span>")
|
||||
if(14)
|
||||
if(18)
|
||||
if(diff==FORWARD)
|
||||
user.visible_message("[user] installs the external reinforced armor layer to [parent].", "<span class='notice'>You install the external reinforced armor layer to [parent].</span>")
|
||||
else
|
||||
user.visible_message("[user] cuts the internal armor layer from [parent].", "<span class='notice'>You cut the internal armor layer from [parent].</span>")
|
||||
if(15)
|
||||
if(19)
|
||||
if(diff==FORWARD)
|
||||
user.visible_message("[user] secures the external armor layer.", "<span class='notice'>You secure the external reinforced armor layer.</span>")
|
||||
else
|
||||
user.visible_message("[user] pries external armor layer from [parent].", "<span class='notice'>You pry external armor layer from [parent].</span>")
|
||||
if(16)
|
||||
if(20)
|
||||
if(diff==FORWARD)
|
||||
user.visible_message("[user] welds the external armor layer to [parent].", "<span class='notice'>You weld the external armor layer to [parent].</span>")
|
||||
else
|
||||
@@ -629,7 +679,7 @@
|
||||
|
||||
//9
|
||||
list(
|
||||
"key" = /obj/item/stock_parts/cell,
|
||||
"key" = /obj/item/stock_parts/scanning_module,
|
||||
"action" = ITEM_MOVE_INSIDE,
|
||||
"back_key" = TOOL_SCREWDRIVER,
|
||||
"desc" = "Peripherals control module is secured."
|
||||
@@ -639,10 +689,40 @@
|
||||
list(
|
||||
"key" = TOOL_SCREWDRIVER,
|
||||
"back_key" = TOOL_CROWBAR,
|
||||
"desc" = "The power cell is installed."
|
||||
"desc" = "Scanner module is installed."
|
||||
),
|
||||
|
||||
//11
|
||||
list(
|
||||
"key" = /obj/item/stock_parts/capacitor,
|
||||
"action" = ITEM_MOVE_INSIDE,
|
||||
"back_key" = TOOL_SCREWDRIVER,
|
||||
"desc" = "Scanner module is secured."
|
||||
),
|
||||
|
||||
//12
|
||||
list(
|
||||
"key" = TOOL_SCREWDRIVER,
|
||||
"back_key" = TOOL_CROWBAR,
|
||||
"desc" = "Capacitor is installed."
|
||||
),
|
||||
|
||||
//13
|
||||
list(
|
||||
"key" = /obj/item/stock_parts/cell,
|
||||
"action" = ITEM_MOVE_INSIDE,
|
||||
"back_key" = TOOL_SCREWDRIVER,
|
||||
"desc" = "Capacitor is secured."
|
||||
),
|
||||
|
||||
//14
|
||||
list(
|
||||
"key" = TOOL_SCREWDRIVER,
|
||||
"back_key" = TOOL_CROWBAR,
|
||||
"desc" = "The power cell is installed."
|
||||
),
|
||||
|
||||
//15
|
||||
list(
|
||||
"key" = /obj/item/stack/sheet/plasteel,
|
||||
"amount" = 5,
|
||||
@@ -650,21 +730,21 @@
|
||||
"desc" = "The power cell is secured."
|
||||
),
|
||||
|
||||
//12
|
||||
//16
|
||||
list(
|
||||
"key" = TOOL_WRENCH,
|
||||
"back_key" = TOOL_CROWBAR,
|
||||
"desc" = "Internal armor is installed."
|
||||
),
|
||||
|
||||
//13
|
||||
//17
|
||||
list(
|
||||
"key" = TOOL_WELDER,
|
||||
"back_key" = TOOL_WRENCH,
|
||||
"desc" = "Internal armor is wrenched."
|
||||
),
|
||||
|
||||
//14
|
||||
//18
|
||||
list(
|
||||
"key" = /obj/item/stack/sheet/plasteel,
|
||||
"amount" = 5,
|
||||
@@ -672,7 +752,7 @@
|
||||
"desc" = "Internal armor is welded."
|
||||
),
|
||||
|
||||
//15
|
||||
//19
|
||||
list(
|
||||
"key" = /obj/item/stack/sheet/plasteel,
|
||||
"amount" = 5,
|
||||
@@ -680,14 +760,14 @@
|
||||
"desc" = "External armor is being installed."
|
||||
),
|
||||
|
||||
//16
|
||||
//20
|
||||
list(
|
||||
"key" = TOOL_WRENCH,
|
||||
"back_key" = TOOL_CROWBAR,
|
||||
"desc" = "External armor is installed."
|
||||
),
|
||||
|
||||
//17
|
||||
//21
|
||||
list(
|
||||
"key" = TOOL_WELDER,
|
||||
"back_key" = TOOL_WRENCH,
|
||||
@@ -744,41 +824,61 @@
|
||||
else
|
||||
user.visible_message("[user] unfastens the peripherals control module.", "<span class='notice'>You unfasten the peripherals control module.</span>")
|
||||
if(10)
|
||||
if(diff==FORWARD)
|
||||
user.visible_message("[user] secures the scanner module.", "<span class='notice'>You secure the scanner module.</span>")
|
||||
else
|
||||
user.visible_message("[user] removes the scanner module from [parent].", "<span class='notice'>You remove the scanner module from [parent].</span>")
|
||||
if(12)
|
||||
if(diff==FORWARD)
|
||||
user.visible_message("[user] installs [I] to [parent].", "<span class='notice'>You install [I] to [parent].</span>")
|
||||
else
|
||||
user.visible_message("[user] unfastens the scanner module.", "<span class='notice'>You unfasten the scanner module.</span>")
|
||||
if(13)
|
||||
if(diff==FORWARD)
|
||||
user.visible_message("[user] secures the capacitor.", "<span class='notice'>You secure the capacitor.</span>")
|
||||
else
|
||||
user.visible_message("[user] removes the capacitor from [parent].", "<span class='notice'>You remove the capacitor from [parent].</span>")
|
||||
if(14)
|
||||
if(diff==FORWARD)
|
||||
user.visible_message("[user] installs [I] into [parent].", "<span class='notice'>You install [I] into [parent].</span>")
|
||||
else
|
||||
user.visible_message("[user] unfastens the capacitor.", "<span class='notice'>You unfasten the capacitor.</span>")
|
||||
if(15)
|
||||
if(diff==FORWARD)
|
||||
user.visible_message("[user] secures the power cell.", "<span class='notice'>You secure the power cell.</span>")
|
||||
else
|
||||
user.visible_message("[user] pries the power cell from [parent].", "<span class='notice'>You pry the power cell from [parent].</span>")
|
||||
if(11)
|
||||
if(16)
|
||||
if(diff==FORWARD)
|
||||
user.visible_message("[user] installs the internal armor layer to [parent].", "<span class='notice'>You install the internal armor layer to [parent].</span>")
|
||||
else
|
||||
user.visible_message("[user] unfastens the power cell.", "<span class='notice'>You unfasten the power cell.</span>")
|
||||
if(12)
|
||||
if(17)
|
||||
if(diff==FORWARD)
|
||||
user.visible_message("[user] secures the internal armor layer.", "<span class='notice'>You secure the internal armor layer.</span>")
|
||||
else
|
||||
user.visible_message("[user] pries internal armor layer from [parent].", "<span class='notice'>You pry internal armor layer from [parent].</span>")
|
||||
if(13)
|
||||
if(18)
|
||||
if(diff==FORWARD)
|
||||
user.visible_message("[user] welds the internal armor layer to [parent].", "<span class='notice'>You weld the internal armor layer to [parent].</span>")
|
||||
else
|
||||
user.visible_message("[user] unfastens the internal armor layer.", "<span class='notice'>You unfasten the internal armor layer.</span>")
|
||||
if(14)
|
||||
if(19)
|
||||
if(diff==FORWARD)
|
||||
user.visible_message("[user] starts to install the external armor layer to [parent].", "<span class='notice'>You install the external armor layer to [parent].</span>")
|
||||
else
|
||||
user.visible_message("[user] cuts the internal armor layer from [parent].", "<span class='notice'>You cut the internal armor layer from [parent].</span>")
|
||||
if(15)
|
||||
if(20)
|
||||
if(diff==FORWARD)
|
||||
user.visible_message("[user] installs the external reinforced armor layer to [parent].", "<span class='notice'>You install the external reinforced armor layer to [parent].</span>")
|
||||
else
|
||||
user.visible_message("[user] removes the external armor from [parent].", "<span class='notice'>You remove the external armor from [parent].</span>")
|
||||
if(16)
|
||||
if(21)
|
||||
if(diff==FORWARD)
|
||||
user.visible_message("[user] secures the external armor layer.", "<span class='notice'>You secure the external reinforced armor layer.</span>")
|
||||
else
|
||||
user.visible_message("[user] pries external armor layer from [parent].", "<span class='notice'>You pry external armor layer from [parent].</span>")
|
||||
if(17)
|
||||
if(22)
|
||||
if(diff==FORWARD)
|
||||
user.visible_message("[user] welds the external armor layer to [parent].", "<span class='notice'>You weld the external armor layer to [parent].</span>")
|
||||
else
|
||||
@@ -825,47 +925,63 @@
|
||||
list(
|
||||
"key" = /obj/item/bikehorn
|
||||
),
|
||||
|
||||
//6
|
||||
list(
|
||||
"key" = /obj/item/circuitboard/mecha/honker/targeting,
|
||||
"action" = ITEM_DELETE
|
||||
),
|
||||
|
||||
//7
|
||||
list(
|
||||
"key" = /obj/item/bikehorn
|
||||
),
|
||||
|
||||
//8
|
||||
list(
|
||||
"key" = /obj/item/stock_parts/cell,
|
||||
"key" = /obj/item/stock_parts/scanning_module,
|
||||
"action" = ITEM_MOVE_INSIDE
|
||||
),
|
||||
|
||||
//9
|
||||
list(
|
||||
"key" = /obj/item/bikehorn
|
||||
),
|
||||
|
||||
//10
|
||||
list(
|
||||
"key" = /obj/item/clothing/mask/gas/clown_hat,
|
||||
"action" = ITEM_DELETE
|
||||
"key" = /obj/item/stock_parts/capacitor,
|
||||
"action" = ITEM_MOVE_INSIDE
|
||||
),
|
||||
|
||||
//11
|
||||
list(
|
||||
"key" = /obj/item/bikehorn
|
||||
),
|
||||
|
||||
//12
|
||||
list(
|
||||
"key" = /obj/item/stock_parts/cell,
|
||||
"action" = ITEM_MOVE_INSIDE
|
||||
),
|
||||
|
||||
//13
|
||||
list(
|
||||
"key" = /obj/item/bikehorn
|
||||
),
|
||||
|
||||
//14
|
||||
list(
|
||||
"key" = /obj/item/clothing/mask/gas/clown_hat,
|
||||
"action" = ITEM_DELETE
|
||||
),
|
||||
|
||||
//15
|
||||
list(
|
||||
"key" = /obj/item/bikehorn
|
||||
),
|
||||
|
||||
//16
|
||||
list(
|
||||
"key" = /obj/item/clothing/shoes/clown_shoes,
|
||||
"action" = ITEM_DELETE
|
||||
),
|
||||
|
||||
//13
|
||||
//17
|
||||
list(
|
||||
"key" = /obj/item/bikehorn
|
||||
),
|
||||
@@ -898,8 +1014,12 @@
|
||||
if(8)
|
||||
user.visible_message("[user] installs [I] into [parent].", "<span class='notice'>You install [I] into [parent].</span>")
|
||||
if(10)
|
||||
user.visible_message("[user] puts [I] on [parent].", "<span class='notice'>You put [I] on [parent].</span>")
|
||||
user.visible_message("[user] installs [I] into [parent].", "<span class='notice'>You install [I] into [parent].</span>")
|
||||
if(12)
|
||||
user.visible_message("[user] installs [I] into [parent].", "<span class='notice'>You install [I] into [parent].</span>")
|
||||
if(14)
|
||||
user.visible_message("[user] puts [I] on [parent].", "<span class='notice'>You put [I] on [parent].</span>")
|
||||
if(16)
|
||||
user.visible_message("[user] puts [I] on [parent].", "<span class='notice'>You put [I] on [parent].</span>")
|
||||
return TRUE
|
||||
|
||||
@@ -1629,7 +1749,7 @@
|
||||
|
||||
//9
|
||||
list(
|
||||
"key" = /obj/item/stock_parts/cell,
|
||||
"key" = /obj/item/stock_parts/scanning_module,
|
||||
"action" = ITEM_MOVE_INSIDE,
|
||||
"back_key" = TOOL_SCREWDRIVER,
|
||||
"desc" = "Peripherals control module is secured."
|
||||
@@ -1639,32 +1759,60 @@
|
||||
list(
|
||||
"key" = TOOL_SCREWDRIVER,
|
||||
"back_key" = TOOL_CROWBAR,
|
||||
"desc" = "The power cell is installed."
|
||||
"desc" = "Scanner module is installed."
|
||||
),
|
||||
|
||||
//11
|
||||
list(
|
||||
"key" = /obj/item/stock_parts/capacitor,
|
||||
"action" = ITEM_MOVE_INSIDE,
|
||||
"back_key" = TOOL_SCREWDRIVER,
|
||||
"desc" = "Scanner module is secured."
|
||||
),
|
||||
|
||||
//12
|
||||
list(
|
||||
"key" = TOOL_SCREWDRIVER,
|
||||
"back_key" = TOOL_CROWBAR,
|
||||
"desc" = "Capacitor is installed."
|
||||
),
|
||||
|
||||
//13
|
||||
list(
|
||||
"key" = /obj/item/stock_parts/cell,
|
||||
"action" = ITEM_MOVE_INSIDE,
|
||||
"back_key" = TOOL_SCREWDRIVER,
|
||||
"desc" = "Capacitor is secured."
|
||||
),
|
||||
|
||||
//14
|
||||
list(
|
||||
"key" = /obj/item/stack/sheet/metal,
|
||||
"amount" = 5,
|
||||
"back_key" = TOOL_SCREWDRIVER,
|
||||
"desc" = "The power cell is secured."
|
||||
),
|
||||
|
||||
//12
|
||||
//15
|
||||
list(
|
||||
"key" = TOOL_SCREWDRIVER,
|
||||
"back_key" = TOOL_CROWBAR,
|
||||
"desc" = "The power cell is installed."
|
||||
),
|
||||
//16
|
||||
list(
|
||||
"key" = TOOL_WRENCH,
|
||||
"back_key" = TOOL_CROWBAR,
|
||||
"desc" = "Internal armor is installed."
|
||||
),
|
||||
|
||||
//13
|
||||
//17
|
||||
list(
|
||||
"key" = TOOL_WELDER,
|
||||
"back_key" = TOOL_WRENCH,
|
||||
"desc" = "Internal armor is wrenched."
|
||||
),
|
||||
|
||||
//14
|
||||
//18
|
||||
list(
|
||||
"key" = /obj/item/stack/sheet/plasteel,
|
||||
"amount" = 5,
|
||||
@@ -1672,14 +1820,14 @@
|
||||
"desc" = "Internal armor is welded."
|
||||
),
|
||||
|
||||
//15
|
||||
//19
|
||||
list(
|
||||
"key" = TOOL_WRENCH,
|
||||
"back_key" = TOOL_CROWBAR,
|
||||
"desc" = "External armor is installed."
|
||||
),
|
||||
|
||||
//16
|
||||
//20
|
||||
list(
|
||||
"key" = TOOL_WELDER,
|
||||
"back_key" = TOOL_WRENCH,
|
||||
@@ -1736,36 +1884,56 @@
|
||||
else
|
||||
user.visible_message("[user] unfastens the peripherals control module.", "<span class='notice'>You unfasten the peripherals control module.</span>")
|
||||
if(10)
|
||||
if(diff==FORWARD)
|
||||
user.visible_message("[user] secures the scanner module.", "<span class='notice'>You secure the scanner module.</span>")
|
||||
else
|
||||
user.visible_message("[user] removes the scanner module from [parent].", "<span class='notice'>You remove the scanner module from [parent].</span>")
|
||||
if(11)
|
||||
if(diff==FORWARD)
|
||||
user.visible_message("[user] installs [I] to [parent].", "<span class='notice'>You install [I] to [parent].</span>")
|
||||
else
|
||||
user.visible_message("[user] unfastens the scanner module.", "<span class='notice'>You unfasten the scanner module.</span>")
|
||||
if(12)
|
||||
if(diff==FORWARD)
|
||||
user.visible_message("[user] secures the capacitor.", "<span class='notice'>You secure the capacitor.</span>")
|
||||
else
|
||||
user.visible_message("[user] removes the capacitor from [parent].", "<span class='notice'>You remove the capacitor from [parent].</span>")
|
||||
if(13)
|
||||
if(diff==FORWARD)
|
||||
user.visible_message("[user] installs [I] into [parent].", "<span class='notice'>You install [I] into [parent].</span>")
|
||||
else
|
||||
user.visible_message("[user] unfastens the capacitor.", "<span class='notice'>You unfasten the capacitor.</span>")
|
||||
if(14)
|
||||
if(diff==FORWARD)
|
||||
user.visible_message("[user] secures the power cell.", "<span class='notice'>You secure the power cell.</span>")
|
||||
else
|
||||
user.visible_message("[user] pries the power cell from [parent].", "<span class='notice'>You pry the power cell from [parent].</span>")
|
||||
if(11)
|
||||
if(15)
|
||||
if(diff==FORWARD)
|
||||
user.visible_message("[user] installs the internal armor layer to [parent].", "<span class='notice'>You install the internal armor layer to [parent].</span>")
|
||||
else
|
||||
user.visible_message("[user] unfastens the power cell.", "<span class='notice'>You unfasten the power cell.</span>")
|
||||
if(12)
|
||||
if(16)
|
||||
if(diff==FORWARD)
|
||||
user.visible_message("[user] secures the internal armor layer.", "<span class='notice'>You secure the internal armor layer.</span>")
|
||||
else
|
||||
user.visible_message("[user] pries internal armor layer from [parent].", "<span class='notice'>You pry internal armor layer from [parent].</span>")
|
||||
if(13)
|
||||
if(17)
|
||||
if(diff==FORWARD)
|
||||
user.visible_message("[user] welds the internal armor layer to [parent].", "<span class='notice'>You weld the internal armor layer to [parent].</span>")
|
||||
else
|
||||
user.visible_message("[user] unfastens the internal armor layer.", "<span class='notice'>You unfasten the internal armor layer.</span>")
|
||||
if(14)
|
||||
if(18)
|
||||
if(diff==FORWARD)
|
||||
user.visible_message("[user] installs the external armor layer to [parent].", "<span class='notice'>You install the external reinforced armor layer to [parent].</span>")
|
||||
else
|
||||
user.visible_message("[user] cuts the internal armor layer from [parent].", "<span class='notice'>You cut the internal armor layer from [parent].</span>")
|
||||
if(15)
|
||||
if(19)
|
||||
if(diff==FORWARD)
|
||||
user.visible_message("[user] secures the external armor layer.", "<span class='notice'>You secure the external reinforced armor layer.</span>")
|
||||
else
|
||||
user.visible_message("[user] pries the external armor layer from [parent].", "<span class='notice'>You pry the external armor layer from [parent].</span>")
|
||||
if(16)
|
||||
if(20)
|
||||
if(diff==FORWARD)
|
||||
user.visible_message("[user] welds the external armor layer to [parent].", "<span class='notice'>You weld the external armor layer to [parent].</span>")
|
||||
else
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
/obj/mecha/proc/get_armour_facing(relative_dir)
|
||||
switch(relative_dir)
|
||||
if(0) // BACKSTAB!
|
||||
return facing_modifiers[BACK_ARMOUR]
|
||||
return facing_modifiers[MECHA_BACK_ARMOUR]
|
||||
if(45, 90, 270, 315)
|
||||
return facing_modifiers[SIDE_ARMOUR]
|
||||
return facing_modifiers[MECHA_SIDE_ARMOUR]
|
||||
if(225, 180, 135)
|
||||
return facing_modifiers[FRONT_ARMOUR]
|
||||
return facing_modifiers[MECHA_FRONT_ARMOUR]
|
||||
return 1 //always return non-0
|
||||
|
||||
/obj/mecha/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1, attack_dir)
|
||||
@@ -199,23 +199,23 @@
|
||||
else
|
||||
to_chat(user, "<span class='warning'>Maintenance protocols disabled by operator.</span>")
|
||||
else if(istype(W, /obj/item/wrench))
|
||||
if(state==1)
|
||||
state = 2
|
||||
if(construction_state==1)
|
||||
construction_state = 2
|
||||
to_chat(user, "<span class='notice'>You undo the securing bolts.</span>")
|
||||
else if(state==2)
|
||||
state = 1
|
||||
else if(construction_state==2)
|
||||
construction_state = 1
|
||||
to_chat(user, "<span class='notice'>You tighten the securing bolts.</span>")
|
||||
return
|
||||
else if(istype(W, /obj/item/crowbar))
|
||||
if(state==2)
|
||||
state = 3
|
||||
if(construction_state==2)
|
||||
construction_state = 3
|
||||
to_chat(user, "<span class='notice'>You open the hatch to the power unit.</span>")
|
||||
else if(state==3)
|
||||
state=2
|
||||
else if(construction_state==3)
|
||||
construction_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(construction_state == 3 && (internal_damage & MECHA_INT_SHORT_CIRCUIT))
|
||||
var/obj/item/stack/cable_coil/CC = W
|
||||
if(CC.use(2))
|
||||
clearInternalDamage(MECHA_INT_SHORT_CIRCUIT)
|
||||
@@ -227,19 +227,19 @@
|
||||
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)
|
||||
else if(construction_state==3 && cell)
|
||||
cell.forceMove(loc)
|
||||
cell = null
|
||||
state = 4
|
||||
construction_state = 4
|
||||
to_chat(user, "<span class='notice'>You unscrew and pry out the powercell.</span>")
|
||||
log_message("Powercell removed")
|
||||
else if(state==4 && cell)
|
||||
state=3
|
||||
else if(construction_state==4 && cell)
|
||||
construction_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(construction_state==4)
|
||||
if(!cell)
|
||||
if(!user.transferItemToLoc(W, src))
|
||||
return
|
||||
|
||||
@@ -199,8 +199,8 @@
|
||||
</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]
|
||||
[maint_access?"<a href='?src=[REF(src)];maint_access=1;id_card=[REF(id_card)];user=[REF(user)]'>[(construction_state > MECHA_LOCKED) ? "Terminate" : "Initiate"] maintenance protocol</a>":null]
|
||||
[(construction_state > MECHA_LOCKED) ?"<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")
|
||||
@@ -231,15 +231,15 @@
|
||||
if(href_list["maint_access"] && maint_access)
|
||||
var/mob/user = afilter.getMob("user")
|
||||
if(user)
|
||||
if(state==0)
|
||||
state = 1
|
||||
if(construction_state == MECHA_LOCKED)
|
||||
construction_state = MECHA_SECURE_BOLTS
|
||||
to_chat(user, "The securing bolts are now exposed.")
|
||||
else if(state==1)
|
||||
state = 0
|
||||
else if(construction_state == MECHA_SECURE_BOLTS)
|
||||
construction_state = MECHA_LOCKED
|
||||
to_chat(user, "The securing bolts are now hidden.")
|
||||
output_maintenance_dialog(afilter.getObj("id_card"),user)
|
||||
|
||||
if(href_list["set_internal_tank_valve"] && state >=1)
|
||||
if(href_list["set_internal_tank_valve"] && construction_state)
|
||||
var/mob/user = afilter.getMob("user")
|
||||
if(user)
|
||||
var/new_pressure = input(user,"Input new output pressure","Pressure setting",internal_tank_valve) as num
|
||||
@@ -305,7 +305,7 @@
|
||||
send_byjax(src.occupant,"exosuit.browser","t_id_upload","[add_req_access?"L":"Unl"]ock ID upload panel")
|
||||
|
||||
if(href_list["toggle_maint_access"])
|
||||
if(state)
|
||||
if(construction_state)
|
||||
occupant_message("<span class='danger'>Maintenance protocols in effect</span>")
|
||||
return
|
||||
maint_access = !maint_access
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
var/do_ranged = 0
|
||||
for(var/equip in mecha.equipment)
|
||||
var/obj/item/mecha_parts/mecha_equipment/ME = equip
|
||||
if(ME.range & RANGED)
|
||||
if(ME.range & MECHA_RANGED)
|
||||
do_ranged = 1
|
||||
break
|
||||
if(do_ranged)
|
||||
@@ -144,7 +144,7 @@
|
||||
ME.rearm()
|
||||
|
||||
|
||||
/mob/living/simple_animal/hostile/syndicate/mecha_pilot/proc/get_mecha_equip_by_flag(flag = RANGED)
|
||||
/mob/living/simple_animal/hostile/syndicate/mecha_pilot/proc/get_mecha_equip_by_flag(flag = MECHA_RANGED)
|
||||
. = list()
|
||||
if(mecha)
|
||||
for(var/equip in mecha.equipment)
|
||||
@@ -160,7 +160,7 @@
|
||||
if(mecha)
|
||||
mecha_reload()
|
||||
mecha_face_target(A)
|
||||
var/list/possible_weapons = get_mecha_equip_by_flag(RANGED)
|
||||
var/list/possible_weapons = get_mecha_equip_by_flag(MECHA_RANGED)
|
||||
if(possible_weapons.len)
|
||||
var/obj/item/mecha_parts/mecha_equipment/ME = pick(possible_weapons) //so we don't favor mecha.equipment[1] forever
|
||||
if(ME.action(A))
|
||||
@@ -173,7 +173,7 @@
|
||||
|
||||
/mob/living/simple_animal/hostile/syndicate/mecha_pilot/AttackingTarget()
|
||||
if(mecha)
|
||||
var/list/possible_weapons = get_mecha_equip_by_flag(MELEE)
|
||||
var/list/possible_weapons = get_mecha_equip_by_flag(MECHA_MELEE)
|
||||
if(possible_weapons.len)
|
||||
var/obj/item/mecha_parts/mecha_equipment/ME = pick(possible_weapons)
|
||||
mecha_face_target(target)
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 19 KiB |
@@ -61,6 +61,7 @@
|
||||
#include "code\__DEFINES\maps.dm"
|
||||
#include "code\__DEFINES\maths.dm"
|
||||
#include "code\__DEFINES\MC.dm"
|
||||
#include "code\__DEFINES\mecha.dm"
|
||||
#include "code\__DEFINES\medal.dm"
|
||||
#include "code\__DEFINES\melee.dm"
|
||||
#include "code\__DEFINES\menu.dm"
|
||||
|
||||
Reference in New Issue
Block a user