mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 02:09:41 +00:00
@@ -17,6 +17,8 @@
|
|||||||
max_special_equip = 1
|
max_special_equip = 1
|
||||||
cargo_capacity = 1
|
cargo_capacity = 1
|
||||||
|
|
||||||
|
encumbrance_gap = 1.5
|
||||||
|
|
||||||
starting_components = list(
|
starting_components = list(
|
||||||
/obj/item/mecha_parts/component/hull/durable,
|
/obj/item/mecha_parts/component/hull/durable,
|
||||||
/obj/item/mecha_parts/component/actuator,
|
/obj/item/mecha_parts/component/actuator,
|
||||||
|
|||||||
@@ -25,6 +25,8 @@
|
|||||||
max_universal_equip = 3
|
max_universal_equip = 3
|
||||||
max_special_equip = 4
|
max_special_equip = 4
|
||||||
|
|
||||||
|
encumbrance_gap = 2
|
||||||
|
|
||||||
starting_components = list(
|
starting_components = list(
|
||||||
/obj/item/mecha_parts/component/hull/durable,
|
/obj/item/mecha_parts/component/hull/durable,
|
||||||
/obj/item/mecha_parts/component/actuator,
|
/obj/item/mecha_parts/component/actuator,
|
||||||
|
|||||||
@@ -31,7 +31,10 @@
|
|||||||
var/initial_icon = null //Mech type for resetting icon. Only used for reskinning kits (see custom items)
|
var/initial_icon = null //Mech type for resetting icon. Only used for reskinning kits (see custom items)
|
||||||
var/can_move = 1
|
var/can_move = 1
|
||||||
var/mob/living/carbon/occupant = null
|
var/mob/living/carbon/occupant = null
|
||||||
|
|
||||||
var/step_in = 10 //Make a step in step_in/10 sec.
|
var/step_in = 10 //Make a step in step_in/10 sec.
|
||||||
|
var/encumbrance_gap = 1 //How many points of slowdown are negated from equipment? Added to the mech's base step_in.
|
||||||
|
|
||||||
var/dir_in = 2 //What direction will the mech face when entered/powered on? Defaults to South.
|
var/dir_in = 2 //What direction will the mech face when entered/powered on? Defaults to South.
|
||||||
var/step_energy_drain = 10
|
var/step_energy_drain = 10
|
||||||
var/health = 300 //Health is health
|
var/health = 300 //Health is health
|
||||||
@@ -193,6 +196,7 @@
|
|||||||
var/datum/action/innate/mecha/mech_toggle_cloaking/cloak_action = new
|
var/datum/action/innate/mecha/mech_toggle_cloaking/cloak_action = new
|
||||||
|
|
||||||
var/weapons_only_cycle = FALSE //So combat mechs don't switch to their equipment at times.
|
var/weapons_only_cycle = FALSE //So combat mechs don't switch to their equipment at times.
|
||||||
|
|
||||||
/obj/mecha/Initialize()
|
/obj/mecha/Initialize()
|
||||||
..()
|
..()
|
||||||
|
|
||||||
@@ -641,18 +645,21 @@
|
|||||||
/obj/mecha/proc/get_step_delay()
|
/obj/mecha/proc/get_step_delay()
|
||||||
var/tally = 0
|
var/tally = 0
|
||||||
|
|
||||||
if(overload)
|
if(LAZYLEN(equipment))
|
||||||
tally = min(1, round(step_in/2))
|
for(var/obj/item/mecha_parts/mecha_equipment/ME in equipment)
|
||||||
|
if(ME.get_step_delay())
|
||||||
|
tally += ME.get_step_delay()
|
||||||
|
|
||||||
|
if(tally <= encumbrance_gap) // If the total is less than our encumbrance gap, ignore equipment weight.
|
||||||
|
tally = 0
|
||||||
|
else // Otherwise, start the tally after cutting that gap out.
|
||||||
|
tally -= encumbrance_gap
|
||||||
|
|
||||||
for(var/slot in internal_components)
|
for(var/slot in internal_components)
|
||||||
var/obj/item/mecha_parts/component/C = internal_components[slot]
|
var/obj/item/mecha_parts/component/C = internal_components[slot]
|
||||||
if(C && C.get_step_delay())
|
if(C && C.get_step_delay())
|
||||||
tally += C.get_step_delay()
|
tally += C.get_step_delay()
|
||||||
|
|
||||||
for(var/obj/item/mecha_parts/mecha_equipment/ME in equipment)
|
|
||||||
if(ME.get_step_delay())
|
|
||||||
tally += ME.get_step_delay()
|
|
||||||
|
|
||||||
var/obj/item/mecha_parts/component/actuator/actuator = internal_components[MECH_ACTUATOR]
|
var/obj/item/mecha_parts/component/actuator/actuator = internal_components[MECH_ACTUATOR]
|
||||||
|
|
||||||
if(!actuator) // Relying purely on hydraulic pumps. You're going nowhere fast.
|
if(!actuator) // Relying purely on hydraulic pumps. You're going nowhere fast.
|
||||||
@@ -674,7 +681,10 @@
|
|||||||
break
|
break
|
||||||
break
|
break
|
||||||
|
|
||||||
return max(1, round(tally, 0.1))
|
if(overload) // At the end, because this would normally just make the mech *slower* since tally wasn't starting at 0.
|
||||||
|
tally = min(1, round(tally/2))
|
||||||
|
|
||||||
|
return max(1, round(tally, 0.1)) // Round the total to the nearest 10th. Can't go lower than 1 tick. Even humans have a delay longer than that.
|
||||||
|
|
||||||
/obj/mecha/proc/dyndomove(direction)
|
/obj/mecha/proc/dyndomove(direction)
|
||||||
if(!can_move)
|
if(!can_move)
|
||||||
|
|||||||
@@ -14,6 +14,8 @@
|
|||||||
|
|
||||||
minimum_penetration = 10
|
minimum_penetration = 10
|
||||||
|
|
||||||
|
encumbrance_gap = 2
|
||||||
|
|
||||||
starting_components = list(
|
starting_components = list(
|
||||||
/obj/item/mecha_parts/component/hull/durable,
|
/obj/item/mecha_parts/component/hull/durable,
|
||||||
/obj/item/mecha_parts/component/actuator,
|
/obj/item/mecha_parts/component/actuator,
|
||||||
|
|||||||
36
html/changelogs/Mechoid - Encumbrance.yml
Normal file
36
html/changelogs/Mechoid - Encumbrance.yml
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
################################
|
||||||
|
# Example Changelog File
|
||||||
|
#
|
||||||
|
# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb.
|
||||||
|
#
|
||||||
|
# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.)
|
||||||
|
# When it is, any changes listed below will disappear.
|
||||||
|
#
|
||||||
|
# Valid Prefixes:
|
||||||
|
# bugfix
|
||||||
|
# wip (For works in progress)
|
||||||
|
# tweak
|
||||||
|
# soundadd
|
||||||
|
# sounddel
|
||||||
|
# rscadd (general adding of nice things)
|
||||||
|
# rscdel (general deleting of nice things)
|
||||||
|
# imageadd
|
||||||
|
# imagedel
|
||||||
|
# maptweak
|
||||||
|
# spellcheck (typo fixes)
|
||||||
|
# experiment
|
||||||
|
#################################
|
||||||
|
|
||||||
|
# Your name.
|
||||||
|
author: Mechoid
|
||||||
|
|
||||||
|
# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again.
|
||||||
|
delete-after: True
|
||||||
|
|
||||||
|
# Any changes you've made. See valid prefix list above.
|
||||||
|
# INDENT WITH TWO SPACES. NOT TABS. SPACES.
|
||||||
|
# SCREW THIS UP AND IT WON'T WORK.
|
||||||
|
# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries.
|
||||||
|
# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog.
|
||||||
|
changes:
|
||||||
|
- rscadd: "Added system for exosuit over-encumbrance. Combat mechs and Ripleys have higher than default."
|
||||||
Reference in New Issue
Block a user