Skip to content

Commit

Permalink
Merge branch 'master220' into ХуйняПассажирская
Browse files Browse the repository at this point in the history
  • Loading branch information
AmShegars authored Feb 6, 2024
2 parents 7741fc7 + 2fc5a00 commit 173905b
Show file tree
Hide file tree
Showing 79 changed files with 174 additions and 179 deletions.
1 change: 0 additions & 1 deletion baystation12.dme
Original file line number Diff line number Diff line change
Expand Up @@ -3813,7 +3813,6 @@
#include "infinity\code\modules\projectiles\gun.dm"
#include "infinity\code\modules\projectiles\ammunition\boxes.dm"
#include "infinity\code\modules\projectiles\ammunition\bullets.dm"
#include "infinity\code\modules\projectiles\guns\energy\advanced_ion_rifle.dm"
#include "infinity\code\modules\projectiles\guns\energy\laser.dm"
#include "infinity\code\modules\projectiles\guns\energy\laser_handmade.dm"
#include "infinity\code\modules\projectiles\guns\energy\secure.dm"
Expand Down
4 changes: 2 additions & 2 deletions code/datums/ai/ai_holo.dm
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*/
/decl/ai_holo
var/requires_malf = FALSE
var/icon = 'infinity/icons/mob/hologram.dmi'
var/icon = 'icons/mob/hologram.dmi'
var/icon_state = "icon_state"
var/bypass_colorize = FALSE
var/name
Expand Down Expand Up @@ -104,4 +104,4 @@
name = "VG_Dronus"
icon_state = "dronus"

//[/INF]
//[/INF]
16 changes: 2 additions & 14 deletions code/datums/supplypacks/nonessent.dm
Original file line number Diff line number Diff line change
Expand Up @@ -250,23 +250,11 @@

/decl/hierarchy/supply_pack/nonessent/exosuit_mod
num_contained = 1
name = "Mod - \"Firestarter\" exosuit modkit"
contains = list(/obj/item/device/kit/paint/flames_red)
name = "Customization exosuit modkit"
contains = list(/obj/item/device/kit/mech)
cost = 50
containername = "heavy exosuit modkit crate"

/decl/hierarchy/supply_pack/nonessent/exosuit_mod/chrome
name = "Mod - \"Burning Chrome\" exosuit modkit"
contains = list(/obj/item/device/kit/paint/flames_blue)

/decl/hierarchy/supply_pack/nonessent/exosuit_mod/military
name = "Mod - \"Guerilla\" exosuit modkit"
contains = list(/obj/item/device/kit/paint/camouflage)

/decl/hierarchy/supply_pack/nonessent/exosuit_mod/alpine
name = "Mod - \"Alpine\" exosuit modkit"
contains = list(/obj/item/device/kit/paint/camouflage/forest)

/decl/hierarchy/supply_pack/nonessent/aromatherapy
name = "Rec - Aromatherapy"
contains = list(
Expand Down
2 changes: 1 addition & 1 deletion code/datums/trading/goods.dm
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ Sells devices, odds and ends, and medical stuff
origin = "Drugstore"
possible_origins = list("Buy 'n Save", "Drug Carnival", "C&B", "Fentles", "Dr. Goods", "Beevees", "McGillicuddy's")
possible_trading_items = list(/obj/item/device/flashlight = TRADER_ALL,
/obj/item/device/kit/paint = TRADER_SUBTYPES_ONLY,
/obj/item/device/kit/mech = TRADER_SUBTYPES_ONLY,
/obj/item/aicard = TRADER_THIS_TYPE,
/obj/item/device/binoculars = TRADER_THIS_TYPE,
/obj/item/device/cable_painter = TRADER_THIS_TYPE,
Expand Down
133 changes: 38 additions & 95 deletions code/game/objects/items/paintkit.dm
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,6 @@
var/new_desc = "An exosuit." //How is the new exosuit described?
var/new_icon = "ripley" //What base icon will the new exosuit use?
var/new_icon_file
var/uses = 1 // Uses before the kit deletes itself.

/obj/item/device/kit/examine(mob/user)
. = ..()
to_chat(user, "It has [uses] use\s left.")

/obj/item/device/kit/inherit_custom_item_data(var/datum/custom_item/citem)
new_name = citem.item_name
Expand All @@ -18,18 +13,14 @@
new_icon_file = CUSTOM_ITEM_OBJ
. = src

/obj/item/device/kit/proc/use(var/amt, var/mob/user)
uses -= amt
/obj/item/device/kit/proc/use(var/mob/user)
playsound(get_turf(user), 'sound/items/Screwdriver.ogg', 50, 1)
if(uses<1)
qdel(src)

// Root hardsuit kit defines.
// Icons for modified hardsuits need to be in the proper .dmis because suit cyclers may cock them up.
/obj/item/device/kit/suit
name = "voidsuit modification kit"
desc = "A kit for modifying a voidsuit."
uses = 2
var/new_light_overlay
var/new_mob_icon_file

Expand Down Expand Up @@ -80,93 +71,45 @@
return ..()

// Mechs are handled in their attackby (mech_interaction.dm).
/obj/item/device/kit/paint
name = "exosuit customisation kit"
/obj/item/device/kit/mech
name = "exosuit customization kit"
desc = "A kit containing all the needed tools and parts to repaint a exosuit."
var/removable = null

/obj/item/device/kit/paint/examine(mob/user)
new_icon_file = 'icons/mecha/mech_decals.dmi'
var/current_decal = "cammo2" //По умолчанию
var/list/mech_decales = list(
"flames_red",
"flames_blue",
"cammo2",
"cammo1",
"red_stripes",
"white_stripes",
"black_stripes",
"green_stripes",
)

/obj/item/device/kit/mech/attack_self(mob/user)//Тыкаем по самому киту дабы вызвать список того, какую декаль хотим на меха
choose_decal(user)

/obj/item/device/kit/mech/examine(mob/user)
. = ..()
to_chat(user, "This kit will add a '[new_name]' decal to a exosuit'.")

// exosuit kits.
/obj/item/device/kit/paint/use(amt, mob/user)
playsound(get_turf(user), 'sound/items/Screwdriver.ogg', 50, 1)

/obj/item/device/kit/paint/flames_red
name = "\"Firestarter\" exosuit customisation kit"
new_icon = "flames_red"

/obj/item/device/kit/paint/flames_blue
name = "\"Burning Chrome\" exosuit customisation kit"
new_icon = "flames_blue"


/*
//[inf]
//Ripley
/obj/item/device/kit/paint/ripley
name = "\"Classic\" APLU customisation kit"
new_name = "APLU \"Classic\""
new_desc = "A very retro APLU unit; didn't they retire these back in 2287?"
new_icon = "ripley-old"
allowed_types = list("ripley")
/obj/item/device/kit/paint/ripley/death
name = "\"Reaper\" APLU customisation kit"
new_name = "APLU \"Reaper\""
new_desc = "A terrifying, grim power loader. Why do those clamps have spikes?"
new_icon = "deathripley"
allowed_types = list("ripley","firefighter")
// Durand kits.
/obj/item/device/kit/paint/durand
name = "\"Classic\" Durand customisation kit"
new_name = "Durand \"Classic\""
new_desc = "An older model of Durand combat exosuit. This model was retired for rotating a pilot's torso 180 degrees."
new_icon = "old_durand"
allowed_types = list("durand")
/obj/item/device/kit/paint/durand/seraph
name = "\"Cherubim\" Durand customisation kit"
new_name = "Durand \"Cherubim\""
new_desc = "A Durand combat exosuit modelled after ancient Earth entertainment. Your heart goes doki-doki just looking at it."
new_icon = "old_durand"
/obj/item/device/kit/paint/durand/phazon
name = "\"Sypher\" Durand customisation kit"
new_name = "Durand \"Sypher\""
new_desc = "A Durand combat exosuit with some very stylish neons and decals. Seems to blur slightly at the edges; probably an optical illusion."
new_icon = "phazon"
// Gygax kits.
/obj/item/device/kit/paint/gygax
name = "\"Jester\" Gygax customisation kit"
new_name = "Gygax \"Jester\""
new_desc = "A Gygax exosuit modelled after the infamous combat-troubadors of Earth's distant past. Terrifying to behold."
new_icon = "honker"
allowed_types = list("gygax")
/obj/item/device/kit/paint/gygax/darkgygax
name = "\"Silhouette\" Gygax customisation kit"
new_name = "Gygax \"Silhouette\""
new_desc = "An ominous Gygax exosuit modelled after the fictional corporate 'death squads' that were popular in pulp action-thrillers back in 2280s."
new_icon = "darkgygax"
/obj/item/device/kit/paint/gygax/recitence
name = "\"Gaoler\" Gygax customisation kit"
new_name = "Durand \"Gaoler\""
new_desc = "A bulky silver Gygax exosuit. The extra armour appears to be painted on, but it's very shiny."
new_icon = "recitence"
//[/inf]
*/
/obj/item/device/kit/paint/camouflage
name = "\"Guerilla\" exosuit customisation kit"
desc = "The exact same pattern the 76th Armored Gauntlet used in the Gaia war, now available for general use."
new_icon = "cammo1"

/obj/item/device/kit/paint/camouflage/forest
name = "\"Alpine\" exosuit customisation kit"
new_icon = "cammo2"
desc = "A muted pattern for alpine environments. Don't miss the forest for the trees!"
/obj/item/device/kit/mech/proc/choose_decal(mob/user)
set name = "Choose decal"
set desc = "Choose mech decal."
set category = "Object"
set src in usr

if(usr.incapacitated())
return
var/new_decal = input(usr, "Choose a decal.", name, current_decal) as null|anything in mech_decales
if (usr.incapacitated())
return
change_decal(new_decal, usr)

/obj/item/device/kit/mech/proc/change_decal(var/new_decal, mob/user)
current_decal = new_decal
new_name = new_decal
to_chat(user, SPAN_NOTICE("You set \the [src] to customize with [new_decal]."))
playsound(src, 'sound/weapons/flipblade.ogg', 30, 1)
13 changes: 11 additions & 2 deletions code/game/objects/items/weapons/storage/belt.dm
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,10 @@
/obj/item/tape_roll,
/obj/item/clothing/head/beret,
/obj/item/material/knife/folding/,
/obj/item/welder_tank
/obj/item/welder_tank,
/obj/item/device/paint_sprayer,
/obj/item/rcd,
/obj/item/rcd_ammo
)


Expand All @@ -161,7 +164,13 @@
new /obj/item/device/t_scanner(src)
update_icon()


/obj/item/storage/belt/utility/chief/New()
..()
new /obj/item/screwdriver/power(src)
new /obj/item/weldingtool(src)
new /obj/item/crowbar/power(src)
new /obj/item/stack/cable_coil/random(src, 30)
update_icon()

/obj/item/storage/belt/medical
name = "medical belt"
Expand Down
2 changes: 1 addition & 1 deletion code/modules/item_worth/worths_list.dm
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ var/list/worths = list(
/obj/item/device/dociler = 490,
/obj/item/device/bot_controller = 50,
/obj/item/device/mmi = 1200,
/obj/item/device/kit/paint = 500,
/obj/item/device/kit/mech = 500,
/obj/item/device/kit = 100,
/obj/item/aicard = 6000,
/obj/item/device/chameleon = 4000,
Expand Down
4 changes: 3 additions & 1 deletion code/modules/mechs/components/legs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
var/obj/item/robot_parts/robot_component/actuator/motivator
power_use = 50
var/max_fall_damage = 30
var/can_strafe = FALSE
var/good_in_strafe = FALSE //Влияет на эффективность стрейфа, используйте когда мир будет к нему готов.

/obj/item/mech_component/propulsion/Destroy()
QDEL_NULL(motivator)
Expand Down Expand Up @@ -60,4 +62,4 @@
if(max_fall_damage > 0)
var/mob/living/exosuit/E = loc
if(istype(E)) //route it through exosuit for proper handling
E.apply_damage(rand(0, max_fall_damage), BRUTE, BP_R_LEG) //Any leg is good, will damage us correctly
E.apply_damage(rand(0, max_fall_damage), BRUTE, BP_R_LEG) //Any leg is good, will damage us correctly
37 changes: 19 additions & 18 deletions code/modules/mechs/equipment/combat.dm
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,6 @@
playsound(owner.loc,'sound/mecha/shield_deflector_fail.ogg',60,0)
update_icon()
last_overheat = world.time
if(damage==300)
src.visible_message("Critical overheat, energy emergency redirected to cooling systems.","Critical overheat, energy emergency redirected to cooling systems.",0)
owner.Slowdown_mech(slowdown_constant, cooldown_time) //[INF] Замедлит меха в slowdown_constant раз на cooldown_time время
delayed_toggle()
return difference
else return 0
Expand All @@ -125,18 +122,6 @@
OVERHEAT = TRUE
delayed_toggle()

//Slodown protocol
/mob/living/exosuit/proc/Slowdown_mech(var/slowdown_constant, var/cooldown_time)
set waitfor = 0
legs.move_delay = legs.move_delay * slowdown_constant
legs.turn_delay = legs.turn_delay * slowdown_constant
arms.action_delay = arms.action_delay * slowdown_constant
sleep(cooldown_time)
legs.move_delay = legs.move_delay / slowdown_constant
legs.turn_delay = legs.turn_delay / slowdown_constant
arms.action_delay = arms.action_delay / slowdown_constant


/obj/item/mech_equipment/shields/proc/toggle()
if(charge == -1)
charge = 0
Expand Down Expand Up @@ -182,13 +167,16 @@
icon_state = "shield_droid"

/obj/item/mech_equipment/shields/Process()
if(charge >= max_charge)
return
if((world.time - last_recharge) < cooldown)
return
if(charge >= max_charge)
var/obj/item/cell/cell = owner.get_cell()
cell.use(charging_rate/2)
return

var/obj/item/cell/cell = owner.get_cell()

var/actual_required_power = Clamp(max_charge - charge, 0, charging_rate)
var/actual_required_power = 2*Clamp(max_charge - charge, 0, charging_rate)

if(cell)
charge += cell.use(actual_required_power)
Expand Down Expand Up @@ -288,6 +276,19 @@
return AURA_FALSE|AURA_CANCEL
//Too fast!

/obj/aura/mechshield/emp_act(var/severity)
if(shields)
if(shields.charge)
if(severity == 1)
var/emp_damage = severity * 75
shields.stop_damage(emp_damage)
if(severity == 2)
var/emp_damage = severity * 50
shields.stop_damage(emp_damage)
user.visible_message(SPAN_WARNING("\The [shields.owner]'s shilds craks, flashs and covers with sparks and energy strikes."))
flick("shield_impact", src)
playsound(user,'sound/effects/basscannon.ogg',100,0)

//Melee! As a general rule I would recommend using regular objects and putting logic in them.
/obj/item/mech_equipment/mounted_system/melee
restricted_hardpoints = list(HARDPOINT_LEFT_HAND, HARDPOINT_RIGHT_HAND)
Expand Down
8 changes: 6 additions & 2 deletions code/modules/mechs/mech.dm
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,9 @@
body = source_frame.body
if(source_frame.material)
material = source_frame.material
passagirka = new(src)
passagirka = new(src)
maxHealth = (body.mech_health + material.integrity) + head.max_damage + arms.max_damage + legs.max_damage
health = maxHealth
updatehealth()

// Generate hardpoint list.
Expand Down Expand Up @@ -227,12 +229,13 @@
if(.)
update_pilots()

/mob/living/exosuit/proc/toggle_power(var/mob/user)
/mob/living/exosuit/proc/toggle_power(var/mob/user) //Отвечает за энергообеспечение меха, обновляет спрайты меха и его модулей при изменении питания
if(power == MECH_POWER_TRANSITION)
to_chat(user, SPAN_NOTICE("Power transition in progress. Please wait."))
else if(power == MECH_POWER_ON) //Turning it off is instant
playsound(src, 'sound/mecha/mech-shutdown.ogg', 100, 0)
power = MECH_POWER_OFF
update_icon()
else if(get_cell(TRUE))
//Start power up sequence
power = MECH_POWER_TRANSITION
Expand All @@ -243,6 +246,7 @@
else
to_chat(user, SPAN_WARNING("You abort the powerup sequence."))
power = MECH_POWER_OFF
update_icon()
hud_power_control?.queue_icon_update()
else
to_chat(user, SPAN_WARNING("Error: No power cell was detected."))
Loading

0 comments on commit 173905b

Please sign in to comment.