MOD update: Modular Cores (#64042)

* Modsuit update - Cores
This commit is contained in:
Fikou
2022-01-15 13:54:53 +01:00
committed by GitHub
parent 7302725059
commit fd9a7f8a58
89 changed files with 1240 additions and 556 deletions
+323
View File
@@ -0,0 +1,323 @@
## Introduction
This is a step by step guide for creating a MODsuit theme, skin and module.
## Theme
This is pretty simple, we go [here](./mod_theme.dm) and add a new definition, let's go with a Psychologist theme as an example. \
Their names should be like model names or use similar adjectives, like "magnate" or simply "engineering", so we'll go with "psychological". \
After that, it's good to decide what company is manufacturing the suit, and a basic description of what it offers, we'll write that down in the desc. \
So, let's our suit should be a low-power usage with lowered module capacity. We'd go with something like this.
```dm
/datum/mod_theme/psychological
name = "psychological"
desc = "A DeForest Medical Corporation power-saving psychological suit, limiting its' module capacity."
```
For people that want to see additional stuff, we add an extended description with some more insight into what the suit does. We also set the default skin to usually the theme name, like so.
```dm
/datum/mod_theme/psychological
name = "psychological"
desc = "A DeForest Medical Corporation power-saving psychological suit, limiting its' module capacity."
extended_desc = "DeForest Medical Corporation's prototype suit, based off the work of \
Nakamura Engineering. The suit has been modified to save power compared to regular suits, \
for operating at lower power levels, keeping people sane. As consequence, the capacity \
of the suit has decreased, not being able to fit many modules at all."
default_skin = "psychological"
```
Next we want to set the statistics, you can view them all in the theme file, so let's just grab our relevant ones, armor, charge and capacity and set them to what we establilished. \
Currently crew MODsuits should be unarmored in combat relevant stats.
```dm
/datum/mod_theme/psychological
name = "psychological"
desc = "A DeForest Medical Corporation power-saving psychological suit, limiting its' module capacity."
extended_desc = "DeForest Medical Corporation's prototype suit, based off the work of \
Nakamura Engineering. The suit has been modified to save power compared to regular suits, \
for operating at lower power levels, keeping people sane. As consequence, the capacity \
of the suit has decreased, not being able to fit many modules at all."
default_skin = "psychological"
armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, BIO = 100, FIRE = 10, ACID = 75, WOUND = 5)
complexity_max = DEFAULT_MAX_COMPLEXITY - 7
charge_drain = DEFAULT_CHARGE_DRAIN * 0.5
```
Now we have a basic theme, it lacks a skin which will be covered in the next section, and an item, which we will add right now. \
Let's go into [here](./mod_types.dm). It's as simple as adding a new suit type with the appropriate modules you want.
```dm
/obj/item/mod/control/pre_equipped/psychological
theme = /datum/mod_theme/psychological
initial_modules = list(
/obj/item/mod/module/storage,
/obj/item/mod/module/flashlight,
)
```
This will create our psychological suit, equipped with a storage and flashlight modules by default. We might also want to make it craftable, in which case we go [here](./mod_construction.dm) and set this.
```dm
/obj/item/mod/construction/armor/psychological
theme = /datum/mod_theme/psychological
```
After that we put it in the techweb or whatever other source we want. Now our suit is almost ready, it just needs a skin.
## Skin
So, now that we have our theme, we want to add a skin to it (or another theme of our choosing). Let's start with a basis.
```dm
/datum/mod_theme/psychological
name = "psychological"
desc = "A DeForest Medical Corporation power-saving psychological suit, limiting its' module capacity."
extended_desc = "DeForest Medical Corporation's prototype suit, based off the work of \
Nakamura Engineering. The suit has been modified to save power compared to regular suits, \
for operating at lower power levels, keeping people sane. As consequence, the capacity \
of the suit has decreased, not being able to fit many modules at all."
default_skin = "psychological"
armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, BIO = 100, FIRE = 10, ACID = 75, WOUND = 5)
complexity_max = DEFAULT_MAX_COMPLEXITY - 7
charge_drain = DEFAULT_CHARGE_DRAIN * 0.5
skins = list(
"psychological" = list(
HELMET_LAYER = null,
HELMET_FLAGS = list(
),
CHESTPLATE_FLAGS = list(
),
GAUNTLETS_FLAGS = list(
),
BOOTS_FLAGS = list(
),
),
)
```
We now have a psychological skin, this will apply the psychological icons to every part of the suit. Next we'll be looking at the flags. Boots, gauntlets and the chestplate are usually very standard, we set their thickmaterial and pressureproofness while hiding the jumpsuit on the chestplate. On the helmet however, we'll actually look at its' icon. \
For example, if our helmet's icon covers the full head (like the research skin), we want to do something like this.
```dm
HELMET_LAYER = null,
HELMET_FLAGS = list(
UNSEALED_CLOTHING = SNUG_FIT|THICKMATERIAL,
SEALED_CLOTHING = STOPSPRESSUREDAMAGE|BLOCK_GAS_SMOKE_EFFECT,
UNSEALED_INVISIBILITY = HIDEFACIALHAIR|HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE|HIDEHAIR|HIDESNOUT,
UNSEALED_COVER = HEADCOVERSMOUTH|HEADCOVERSEYES|PEPPERPROOF,
),
```
Otherwise, with an open helmet that becomes closed (like the engineering skin), we'd do this.
```dm
HELMET_LAYER = NECK_LAYER,
HELMET_FLAGS = list(
UNSEALED_CLOTHING = SNUG_FIT,
SEALED_CLOTHING = THICKMATERIAL|STOPSPRESSUREDAMAGE,
UNSEALED_INVISIBILITY = HIDEFACIALHAIR,
SEALED_INVISIBILITY = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE|HIDEHAIR|HIDESNOUT,
SEALED_COVER = HEADCOVERSMOUTH|HEADCOVERSEYES|PEPPERPROOF,
),
```
There are specific cases of helmets that semi-cover the head, like the cosmohonk, apocryphal and whatnot. You can look at these for more specific suits. So let's say our suit is an open helmet design, and also add an alternate skin with a closed helmet called psychotherapeutic. It'd look something like this.
```dm
/datum/mod_theme/psychological
name = "psychological"
desc = "A DeForest Medical Corporation power-saving psychological suit, limiting its' module capacity."
extended_desc = "DeForest Medical Corporation's prototype suit, based off the work of \
Nakamura Engineering. The suit has been modified to save power compared to regular suits, \
for operating at lower power levels, keeping people sane. As consequence, the capacity \
of the suit has decreased, not being able to fit many modules at all."
default_skin = "psychological"
armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, BIO = 100, FIRE = 10, ACID = 75, WOUND = 5)
complexity_max = DEFAULT_MAX_COMPLEXITY - 7
charge_drain = DEFAULT_CHARGE_DRAIN * 0.5
skins = list(
"psychological" = list(
HELMET_LAYER = NECK_LAYER,
HELMET_FLAGS = list(
UNSEALED_CLOTHING = SNUG_FIT,
SEALED_CLOTHING = THICKMATERIAL|STOPSPRESSUREDAMAGE,
UNSEALED_INVISIBILITY = HIDEFACIALHAIR,
SEALED_INVISIBILITY = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE|HIDEHAIR|HIDESNOUT,
SEALED_COVER = HEADCOVERSMOUTH|HEADCOVERSEYES|PEPPERPROOF,
),
CHESTPLATE_FLAGS = list(
UNSEALED_CLOTHING = THICKMATERIAL,
SEALED_CLOTHING = STOPSPRESSUREDAMAGE,
SEALED_INVISIBILITY = HIDEJUMPSUIT,
),
GAUNTLETS_FLAGS = list(
UNSEALED_CLOTHING = THICKMATERIAL,
SEALED_CLOTHING = STOPSPRESSUREDAMAGE,
),
BOOTS_FLAGS = list(
UNSEALED_CLOTHING = THICKMATERIAL,
SEALED_CLOTHING = STOPSPRESSUREDAMAGE,
),
"psychotherapeutic" = list(
HELMET_LAYER = null,
HELMET_FLAGS = list(
UNSEALED_CLOTHING = SNUG_FIT|THICKMATERIAL,
SEALED_CLOTHING = STOPSPRESSUREDAMAGE,
UNSEALED_INVISIBILITY = HIDEFACIALHAIR|HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE|HIDEHAIR|HIDESNOUT,
UNSEALED_COVER = HEADCOVERSMOUTH|HEADCOVERSEYES|PEPPERPROOF,
),
CHESTPLATE_FLAGS = list(
UNSEALED_CLOTHING = THICKMATERIAL,
SEALED_CLOTHING = STOPSPRESSUREDAMAGE,
SEALED_INVISIBILITY = HIDEJUMPSUIT,
),
GAUNTLETS_FLAGS = list(
UNSEALED_CLOTHING = THICKMATERIAL,
SEALED_CLOTHING = STOPSPRESSUREDAMAGE,
),
BOOTS_FLAGS = list(
UNSEALED_CLOTHING = THICKMATERIAL,
SEALED_CLOTHING = STOPSPRESSUREDAMAGE,
),
),
)
```
Thus we finished our codeside. Now we go to the icon files for the suits and simply add our new skin's icons. \
Now our suit is finished. But let's say we want to give it an unique module.
## Module
So, for our psychological suit, let's say we want a module that heals the brain damage of everyone in range. \
As it's a medical module, we'll put it [here](modules/modules_medical.dm). Let's start with the object definition.
```dm
/obj/item/mod/module/neuron_healer
name = "MOD neuron healer module"
desc = "A module made experimentally by DeForest Medical Corporation. On demand it releases waves \
that heal neuron damage of everyone nearby, getting their brains to a better state."
icon_state = "neuron_healer"
```
As we want this effect to be on demand, we probably want this to be an usable module. There are four types of modules:
- Passive: These have a passive effect.
- Togglable: You can turn these on and off.
- Usable: You can use these for a one time effect.
- Active: You can only have one selected at a time. It gives you a special click effect.
As we have an usable module, we want to set a cooldown time. All modules are also incompatible with themselves, have a specific power cost and complexity varying on how powerful they are, so let's update our definition, and also add a new variable for how much brain damage we'll heal.
```dm
/obj/item/mod/module/neuron_healer
name = "MOD neuron healer module"
desc = "A module made experimentally by DeForest Medical Corporation. On demand it releases waves \
that heal neuron damage of everyone nearby, getting their brains to a better state."
icon_state = "neuron_healer"
module_type = MODULE_USABLE
complexity = 3
use_power_cost = DEFAULT_CHARGE_DRAIN
incompatible_modules = list(/obj/item/mod/module/neuron_healer)
cooldown_time = 15 SECONDS
var/brain_damage_healed = 25
```
Now, we want to override the on_use proc for our new effect. We want to make sure the use checks passed from parent. You can read about most procs and variables by reading [this](modules/_module.dm)
```dm
/obj/item/mod/module/neuron_healer/on_use()
. = ..()
if(!.)
return
```
After this, we want to put our special code, a basic effect of healing all mobs nearby for their brain damage and creating a beam to them.
```dm
/obj/item/mod/module/neuron_healer/on_use()
. = ..()
if(!.)
return
for(var/mob/living/carbon/carbon_mob in range(5, src))
if(carbon_mob == mod.wearer)
continue
carbon_mob.adjustOrganLoss(ORGAN_SLOT_BRAIN, -brain_damage_healed)
mod.wearer.Beam(carbon_mob, icon_state = "plasmabeam", time = 1.5 SECONDS)
playsound(src, 'sound/effects/magic.ogg', 100, TRUE)
drain_power(use_power_cost)
```
We now have a basic module, we can add it to the techwebs to make it printable ingame, and we can add an inbuilt, advanced version of it for our psychological suit. We'll give it more healing power, no complexity and make it unremovable.
```dm
/obj/item/mod/module/neuron_healer/advanced
name = "MOD advanced neuron healer module"
complexity = 0
brain_damage_healed = 50
```
Now we want to add it to the psychological theme, which is very simple, finishing with this:
```dm
/datum/mod_theme/psychological
name = "psychological"
desc = "A DeForest Medical Corporation power-saving psychological suit, limiting its' module capacity."
extended_desc = "DeForest Medical Corporation's prototype suit, based off the work of \
Nakamura Engineering. The suit has been modified to save power compared to regular suits, \
for operating at lower power levels, keeping people sane. As consequence, the capacity \
of the suit has decreased, not being able to fit many modules at all."
default_skin = "psychological"
armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, BIO = 100, FIRE = 10, ACID = 75, WOUND = 5)
complexity_max = DEFAULT_MAX_COMPLEXITY - 7
charge_drain = DEFAULT_CHARGE_DRAIN * 0.5
inbuilt_modules = list(/obj/item/mod/module/neuron_healer/advanced)
skins = list(
"psychological" = list(
HELMET_LAYER = NECK_LAYER,
HELMET_FLAGS = list(
UNSEALED_CLOTHING = SNUG_FIT,
SEALED_CLOTHING = THICKMATERIAL|STOPSPRESSUREDAMAGE,
UNSEALED_INVISIBILITY = HIDEFACIALHAIR,
SEALED_INVISIBILITY = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE|HIDEHAIR|HIDESNOUT,
SEALED_COVER = HEADCOVERSMOUTH|HEADCOVERSEYES|PEPPERPROOF,
),
CHESTPLATE_FLAGS = list(
UNSEALED_CLOTHING = THICKMATERIAL,
SEALED_CLOTHING = STOPSPRESSUREDAMAGE,
SEALED_INVISIBILITY = HIDEJUMPSUIT,
),
GAUNTLETS_FLAGS = list(
UNSEALED_CLOTHING = THICKMATERIAL,
SEALED_CLOTHING = STOPSPRESSUREDAMAGE,
),
BOOTS_FLAGS = list(
UNSEALED_CLOTHING = THICKMATERIAL,
SEALED_CLOTHING = STOPSPRESSUREDAMAGE,
),
"psychotherapeutic" = list(
HELMET_LAYER = null,
HELMET_FLAGS = list(
UNSEALED_CLOTHING = SNUG_FIT|THICKMATERIAL,
SEALED_CLOTHING = STOPSPRESSUREDAMAGE,
UNSEALED_INVISIBILITY = HIDEFACIALHAIR|HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE|HIDEHAIR|HIDESNOUT,
UNSEALED_COVER = HEADCOVERSMOUTH|HEADCOVERSEYES|PEPPERPROOF,
),
CHESTPLATE_FLAGS = list(
UNSEALED_CLOTHING = THICKMATERIAL,
SEALED_CLOTHING = STOPSPRESSUREDAMAGE,
SEALED_INVISIBILITY = HIDEJUMPSUIT,
),
GAUNTLETS_FLAGS = list(
UNSEALED_CLOTHING = THICKMATERIAL,
SEALED_CLOTHING = STOPSPRESSUREDAMAGE,
),
BOOTS_FLAGS = list(
UNSEALED_CLOTHING = THICKMATERIAL,
SEALED_CLOTHING = STOPSPRESSUREDAMAGE,
),
),
)
```
## Ending
This finishes this hopefully easy to follow along tutorial. You should now know how to make a basic theme a skin for it and a module.
+40 -21
View File
@@ -27,7 +27,7 @@
return
return ..()
/datum/action/item_action/mod/Trigger()
/datum/action/item_action/mod/Trigger(trigger_flags)
if(!IsAvailable())
return FALSE
if(mod.malfunctioning && prob(75))
@@ -37,30 +37,33 @@
/datum/action/item_action/mod/deploy
name = "Deploy MODsuit"
desc = "Deploy/Conceal a part of the MODsuit."
desc = "LMB: Deploy/Undeploy part. RMB: Deploy/Undeploy full suit."
button_icon_state = "deploy"
/datum/action/item_action/mod/deploy/Trigger()
/datum/action/item_action/mod/deploy/Trigger(trigger_flags)
. = ..()
if(!.)
return
mod.choose_deploy(usr)
if(trigger_flags & TRIGGER_SECONDARY_ACTION)
mod.quick_deploy(usr)
else
mod.choose_deploy(usr)
/datum/action/item_action/mod/deploy/ai
ai_action = TRUE
/datum/action/item_action/mod/activate
name = "Activate MODsuit"
desc = "Activate/Deactivate the MODsuit."
desc = "LMB: Activate/Deactivate suit with prompt. RMB: Activate/Deactivate suit skipping prompt."
button_icon_state = "activate"
/// First time clicking this will set it to TRUE, second time will activate it.
var/ready = FALSE
/datum/action/item_action/mod/activate/Trigger()
/datum/action/item_action/mod/activate/Trigger(trigger_flags)
. = ..()
if(!.)
return
if(!ready)
if(!(trigger_flags & TRIGGER_SECONDARY_ACTION) && !ready)
ready = TRUE
button_icon_state = "activate-ready"
if(!ai_action)
@@ -87,7 +90,7 @@
desc = "Toggle a MODsuit module."
button_icon_state = "module"
/datum/action/item_action/mod/module/Trigger()
/datum/action/item_action/mod/module/Trigger(trigger_flags)
. = ..()
if(!.)
return
@@ -101,7 +104,7 @@
desc = "Open the MODsuit's panel."
button_icon_state = "panel"
/datum/action/item_action/mod/panel/Trigger()
/datum/action/item_action/mod/panel/Trigger(trigger_flags)
. = ..()
if(!.)
return
@@ -112,7 +115,11 @@
/datum/action/item_action/mod/pinned_module
desc = "Activate the module."
/// Overrides the icon applications.
var/override = FALSE
/// Module we are linked to.
var/obj/item/mod/module/module
/// Mob we are pinned to.
var/mob/pinner
/datum/action/item_action/mod/pinned_module/New(Target, obj/item/mod/module/linked_module, mob/user)
@@ -121,40 +128,52 @@
..()
module = linked_module
name = "Activate [capitalize(linked_module.name)]"
desc = "Quickly activate [linked_module]."
icon_icon = linked_module.icon
button_icon_state = linked_module.icon_state
pinner = user
RegisterSignal(mod, COMSIG_MOD_MODULE_SELECTED, .proc/on_module_select)
RegisterSignal(mod, COMSIG_MOD_ACTIVATE, .proc/on_mod_activation)
RegisterSignal(linked_module, COMSIG_MODULE_ACTIVATED, .proc/on_module_activate)
RegisterSignal(linked_module, COMSIG_MODULE_DEACTIVATED, .proc/on_module_deactivate)
RegisterSignal(linked_module, COMSIG_MODULE_USED, .proc/on_module_use)
/datum/action/item_action/mod/pinned_module/Grant(mob/user)
if(user != pinner)
return
return ..()
/datum/action/item_action/mod/pinned_module/Trigger()
/datum/action/item_action/mod/pinned_module/Trigger(trigger_flags)
. = ..()
if(!.)
return
if(!mod.active)
mod.balloon_alert(usr, "suit not on!")
module.on_select()
/datum/action/item_action/mod/pinned_module/ApplyIcon(atom/movable/screen/movable/action_button/current_button, force)
. = ..(current_button, force = TRUE)
if(override)
return
if(module == mod.selected_module)
current_button.add_overlay(image(icon = 'icons/hud/radial.dmi', icon_state = "module_selected", layer = FLOAT_LAYER-0.1))
else if(module.active)
current_button.add_overlay(image(icon = 'icons/hud/radial.dmi', icon_state = "module_active", layer = FLOAT_LAYER-0.1))
if(!COOLDOWN_FINISHED(module, cooldown_timer))
var/image/cooldown_image = image(icon = 'icons/hud/radial.dmi', icon_state = "module_cooldown")
current_button.add_overlay(cooldown_image)
addtimer(CALLBACK(current_button, /image.proc/cut_overlay, cooldown_image), COOLDOWN_TIMELEFT(module, cooldown_timer))
/// When the module is selected, we update the icon.
/datum/action/item_action/mod/pinned_module/proc/on_module_select(datum/source, obj/item/mod/module/selected_module)
SIGNAL_HANDLER
if(selected_module != mod.selected_module && selected_module != module)
return
UpdateButtonIcon()
/// When the suit is being activated, we update the icon.
/datum/action/item_action/mod/pinned_module/proc/on_mod_activation(datum/source, mob/user)
/datum/action/item_action/mod/pinned_module/proc/on_module_activate(datum/source)
SIGNAL_HANDLER
UpdateButtonIcon()
/datum/action/item_action/mod/pinned_module/proc/on_module_deactivate(datum/source)
SIGNAL_HANDLER
UpdateButtonIcon()
/datum/action/item_action/mod/pinned_module/proc/on_module_use(datum/source)
SIGNAL_HANDLER
UpdateButtonIcon()
+23 -1
View File
@@ -37,6 +37,28 @@
choose_deploy(user)
break
/// Quickly deploys all parts (or retracts if all are on the wearer)
/obj/item/mod/control/proc/quick_deploy(mob/user)
if(active || activating)
balloon_alert(user, "deactivate the suit first!")
playsound(src, 'sound/machines/scanbuzz.ogg', 25, TRUE, SILENCED_SOUND_EXTRARANGE)
return FALSE
var/deploy = FALSE
for(var/obj/item/part as anything in mod_parts)
if(part.loc != src)
continue
deploy = TRUE
for(var/obj/item/part as anything in mod_parts)
if(deploy && part.loc == src)
deploy(null, part)
else if(!deploy && part.loc != src)
conceal(null, part)
wearer.visible_message(span_notice("[wearer]'s [src] [deploy ? "deploys" : "retracts"] its' pieces with a mechanical hiss."),
span_notice("[src] [deploy ? "deploys" : "retracts"] its' pieces with a mechanical hiss."),
span_hear("You hear a mechanical hiss."))
playsound(src, 'sound/mecha/mechmove03.ogg', 25, TRUE, SHORT_RANGE_SOUND_EXTRARANGE)
return TRUE
/// Deploys a part of the suit onto the user.
/obj/item/mod/control/proc/deploy(mob/user, part)
var/obj/item/piece = part
@@ -102,7 +124,7 @@
balloon_alert(user, "access insufficient!")
playsound(src, 'sound/machines/scanbuzz.ogg', 25, TRUE, SILENCED_SOUND_EXTRARANGE)
return FALSE
if(!cell?.charge && !force_deactivate)
if(!get_charge() && !force_deactivate)
balloon_alert(user, "suit not powered!")
playsound(src, 'sound/machines/scanbuzz.ogg', 25, TRUE, SILENCED_SOUND_EXTRARANGE)
return FALSE
+4 -4
View File
@@ -63,11 +63,11 @@
#define MOVE_DELAY 2
#define WEARER_DELAY 1
#define LONE_DELAY 5
#define CELL_PER_STEP DEFAULT_CELL_DRAIN * 2.5
#define CHARGE_PER_STEP DEFAULT_CHARGE_DRAIN * 2.5
#define AI_FALL_TIME 1 SECONDS
/obj/item/mod/control/relaymove(mob/user, direction)
if((!active && wearer) || !cell || cell.charge < CELL_PER_STEP || user != ai || !COOLDOWN_FINISHED(src, cooldown_mod_move) || (wearer?.pulledby?.grab_state > GRAB_PASSIVE))
if((!active && wearer) || get_charge() < CHARGE_PER_STEP || user != ai || !COOLDOWN_FINISHED(src, cooldown_mod_move) || (wearer?.pulledby?.grab_state > GRAB_PASSIVE))
return FALSE
var/timemodifier = MOVE_DELAY * (ISDIAGONALDIR(direction) ? SQRT_2 : 1) * (wearer ? WEARER_DELAY : LONE_DELAY)
if(wearer && !wearer.Process_Spacemove(direction))
@@ -75,7 +75,7 @@
else if(!wearer && (!has_gravity() || !isturf(loc)))
return FALSE
COOLDOWN_START(src, cooldown_mod_move, movedelay * timemodifier + slowdown_active)
cell.charge = max(0, cell.charge - CELL_PER_STEP)
subtract_charge(CHARGE_PER_STEP)
playsound(src, 'sound/mecha/mechmove01.ogg', 25, TRUE)
if(ismovable(wearer?.loc))
return wearer.loc.relaymove(wearer, direction)
@@ -88,7 +88,7 @@
#undef MOVE_DELAY
#undef WEARER_DELAY
#undef LONE_DELAY
#undef CELL_PER_STEP
#undef CHARGE_PER_STEP
/obj/item/mod/control/proc/ai_fall()
if(!wearer)
+10 -34
View File
@@ -4,23 +4,12 @@
icon = 'icons/obj/clothing/modsuit/mod_clothing.dmi'
icon_state = "helmet"
worn_icon = 'icons/mob/clothing/mod.dmi'
armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, BIO = 100, FIRE = 25, ACID = 25, WOUND = 10)
armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, BIO = 0, FIRE = 0, ACID = 0, WOUND = 0)
body_parts_covered = HEAD
heat_protection = HEAD
cold_protection = HEAD
max_heat_protection_temperature = SPACE_SUIT_MAX_TEMP_PROTECT
min_cold_protection_temperature = SPACE_SUIT_MIN_TEMP_PROTECT
clothing_flags = THICKMATERIAL|SNUG_FIT
resistance_flags = NONE
flash_protect = FLASH_PROTECTION_NONE
dynamic_hair_suffix = ""
dynamic_fhair_suffix = ""
flags_inv = HIDEFACIALHAIR
flags_cover = NONE
visor_flags = THICKMATERIAL|STOPSPRESSUREDAMAGE
visor_flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE|HIDEHAIR|HIDESNOUT
visor_flags_cover = HEADCOVERSMOUTH|HEADCOVERSEYES|PEPPERPROOF
item_flags = IMMUTABLE_SLOW
obj_flags = IMMUTABLE_SLOW
var/alternate_layer = NECK_LAYER
var/obj/item/mod/control/mod
@@ -41,18 +30,11 @@
icon_state = "chestplate"
worn_icon = 'icons/mob/clothing/mod.dmi'
blood_overlay_type = "armor"
armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, BIO = 100, FIRE = 25, ACID = 25, WOUND = 10)
armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, BIO = 0, FIRE = 0, ACID = 0, WOUND = 0)
body_parts_covered = CHEST|GROIN
heat_protection = CHEST|GROIN
cold_protection = CHEST|GROIN
max_heat_protection_temperature = SPACE_SUIT_MAX_TEMP_PROTECT
min_cold_protection_temperature = SPACE_SUIT_MIN_TEMP_PROTECT
clothing_flags = THICKMATERIAL
visor_flags = STOPSPRESSUREDAMAGE
visor_flags_inv = HIDEJUMPSUIT
resistance_flags = NONE
item_flags = IMMUTABLE_SLOW
allowed = list(/obj/item/flashlight, /obj/item/tank/internals)
obj_flags = IMMUTABLE_SLOW
var/obj/item/mod/control/mod
/obj/item/clothing/suit/mod/Destroy()
@@ -71,15 +53,11 @@
icon = 'icons/obj/clothing/modsuit/mod_clothing.dmi'
icon_state = "gauntlets"
worn_icon = 'icons/mob/clothing/mod.dmi'
armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, BIO = 100, FIRE = 25, ACID = 25, WOUND = 10)
armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, BIO = 0, FIRE = 0, ACID = 0, WOUND = 0)
body_parts_covered = HANDS|ARMS
heat_protection = HANDS|ARMS
cold_protection = HANDS|ARMS
max_heat_protection_temperature = SPACE_SUIT_MAX_TEMP_PROTECT
min_cold_protection_temperature = SPACE_SUIT_MIN_TEMP_PROTECT
clothing_flags = THICKMATERIAL
resistance_flags = NONE
item_flags = IMMUTABLE_SLOW
obj_flags = IMMUTABLE_SLOW
var/obj/item/mod/control/mod
var/obj/item/clothing/overslot
@@ -109,15 +87,13 @@
icon = 'icons/obj/clothing/modsuit/mod_clothing.dmi'
icon_state = "boots"
worn_icon = 'icons/mob/clothing/mod.dmi'
armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, BIO = 100, FIRE = 25, ACID = 25, WOUND = 10)
armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, BIO = 0, FIRE = 0, ACID = 0, WOUND = 0)
body_parts_covered = FEET|LEGS
heat_protection = FEET|LEGS
cold_protection = FEET|LEGS
max_heat_protection_temperature = SPACE_SUIT_MAX_TEMP_PROTECT
min_cold_protection_temperature = SPACE_SUIT_MIN_TEMP_PROTECT
clothing_flags = THICKMATERIAL
resistance_flags = NONE
item_flags = IMMUTABLE_SLOW|IGNORE_DIGITIGRADE
obj_flags = IMMUTABLE_SLOW
item_flags = IGNORE_DIGITIGRADE
can_be_tied = FALSE
var/obj/item/mod/control/mod
var/obj/item/clothing/overslot
+5 -14
View File
@@ -35,18 +35,9 @@
. = ..()
. += span_notice("You could insert these into a <b>MOD shell</b>...")
/obj/item/mod/construction/core
name = "MOD core"
icon_state = "mod-core"
desc = "Growing in the most lush, fertile areas of the planet Sprout, there is a crystal known as the Heartbloom. \
These rare, organic piezoelectric crystals are of incredible cultural significance to the artist castes of the Ethereals, \
owing to their appearance; which is exactly similar to that of an Ethereal's heart. \n\
Which one you have in your suit is unclear, but either way, \
it's been repurposed to be an internal power source for a Modular Outerwear Device."
/obj/item/mod/construction/broken_core
name = "broken MOD core"
icon_state = "mod-core-broken"
icon_state = "mod-core"
desc = "An internal power source for a Modular Outerwear Device. You don't seem to be able to source any power from this one, though."
/obj/item/mod/construction/broken_core/examine(mob/user)
@@ -57,7 +48,7 @@
. = ..()
if(!tool.use_tool(src, user, 5 SECONDS, volume = 30))
return
new /obj/item/mod/construction/core(drop_location())
new /obj/item/mod/core/standard(drop_location())
qdel(src)
/obj/item/mod/construction/armor
@@ -146,7 +137,7 @@
. = ..()
switch(step)
if(START_STEP)
if(!istype(part, /obj/item/mod/construction/core))
if(!istype(part, /obj/item/mod/core))
return
if(!user.transferItemToLoc(part, src))
balloon_alert(user, "core stuck to your hand!")
@@ -250,9 +241,9 @@
return
playsound(src, 'sound/machines/click.ogg', 30, TRUE)
balloon_alert(user, "suit finished")
var/obj/item/modsuit = new /obj/item/mod/control(drop_location(), external_armor.theme)
var/obj/item/mod = new /obj/item/mod/control(drop_location(), external_armor.theme, null, core)
qdel(src)
user.put_in_hands(modsuit)
user.put_in_hands(mod)
else if(part.tool_behaviour == TOOL_SCREWDRIVER) //Construct
if(part.use_tool(src, user, 0, volume=30))
balloon_alert(user, "assembly unscrewed")
+100 -75
View File
@@ -14,7 +14,7 @@
w_class = WEIGHT_CLASS_BULKY
slot_flags = ITEM_SLOT_BACK
strip_delay = 10 SECONDS
armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, BIO = 100, FIRE = 25, ACID = 25, WOUND = 10)
armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, BIO = 0, FIRE = 0, ACID = 0, WOUND = 0)
actions_types = list(
/datum/action/item_action/mod/deploy,
/datum/action/item_action/mod/activate,
@@ -56,7 +56,7 @@
/// How much module complexity this MOD is carrying.
var/complexity = 0
/// Power usage of the MOD.
var/cell_drain = DEFAULT_CELL_DRAIN
var/charge_drain = DEFAULT_CHARGE_DRAIN
/// Slowdown of the MOD when not active.
var/slowdown_inactive = 1.25
/// Slowdown of the MOD when active.
@@ -65,8 +65,6 @@
var/activation_step_time = MOD_ACTIVATION_STEP_TIME
/// Extended description of the theme.
var/extended_desc
/// MOD cell.
var/obj/item/stock_parts/cell/cell
/// MOD helmet.
var/obj/item/clothing/head/mod/helmet
/// MOD chestplate.
@@ -75,6 +73,8 @@
var/obj/item/clothing/gloves/mod/gauntlets
/// MOD boots.
var/obj/item/clothing/shoes/mod/boots
/// MOD core.
var/obj/item/mod/core/core
/// List of parts (helmet, chestplate, gauntlets, boots).
var/list/mod_parts = list()
/// Modules the MOD should spawn with.
@@ -92,7 +92,7 @@
/// Person wearing the MODsuit.
var/mob/living/carbon/human/wearer
/obj/item/mod/control/Initialize(mapload, new_theme, new_skin)
/obj/item/mod/control/Initialize(mapload, datum/mod_theme/new_theme, new_skin, obj/item/mod/core/new_core)
. = ..()
if(new_theme)
theme = new_theme
@@ -103,13 +103,12 @@
complexity_max = theme.complexity_max
skin = new_skin || theme.default_skin
ui_theme = theme.ui_theme
cell_drain = theme.cell_drain
charge_drain = theme.charge_drain
initial_modules += theme.inbuilt_modules
wires = new /datum/wires/mod(src)
if(length(req_access))
locked = TRUE
if(ispath(cell))
cell = new cell(src)
new_core?.install(src)
helmet = new /obj/item/clothing/head/mod(src)
helmet.mod = src
mod_parts += helmet
@@ -129,6 +128,7 @@
piece.desc = "[piece.desc] [theme.desc]"
piece.armor = getArmor(arglist(theme.armor))
piece.resistance_flags = theme.resistance_flags
piece.flags_1 |= theme.atom_flags //flags like initialization or admin spawning are here, so we cant set, have to add
piece.heat_protection = NONE
piece.cold_protection = NONE
piece.max_heat_protection_temperature = theme.max_heat_protection_temperature
@@ -148,6 +148,9 @@
/obj/item/mod/control/Destroy()
if(active)
STOP_PROCESSING(SSobj, src)
for(var/obj/item/mod/module/module as anything in modules)
module.mod = null
modules -= module
var/atom/deleting_atom
if(!QDELETED(helmet))
deleting_atom = helmet
@@ -173,11 +176,9 @@
boots = null
mod_parts -= deleting_atom
qdel(deleting_atom)
for(var/obj/item/mod/module/module as anything in modules)
module.mod = null
modules -= module
if(core)
QDEL_NULL(core)
QDEL_NULL(wires)
QDEL_NULL(cell)
return ..()
/obj/item/mod/control/atom_destruction(damage_flag)
@@ -196,7 +197,7 @@
/obj/item/mod/control/examine(mob/user)
. = ..()
if(active)
. += span_notice("Cell power: [cell ? "[round(cell.percent(), 1)]%" : "No cell"].")
. += span_notice("Charge: [core ? "[get_charge_percent()]%" : "No core"].")
. += span_notice("Selected module: [selected_module || "None"].")
if(!open && !active)
. += span_notice("You could put it on your <b>back</b> to turn it on.")
@@ -206,11 +207,11 @@
. += span_notice("You could use <b>modules</b> on it to install them.")
. += span_notice("You could remove modules with a <b>crowbar</b>.")
. += span_notice("You could update the access with an <b>ID</b>.")
. += span_notice("You could access the wire panel with a <b>wire configuring tool</b>.")
if(cell)
. += span_notice("You could remove the cell with an <b>empty hand</b>.")
. += span_notice("You could access the wire panel with a <b>wire tool</b>.")
if(core)
. += span_notice("You could remove [core] with a <b>wrench</b>.")
else
. += span_notice("You could use a <b>cell</b> on it to install one.")
. += span_notice("You could use a <b>MOD core</b> on it to install one.")
if(ai)
. += span_notice("You could remove [ai] with an <b>intellicard</b>.")
else
@@ -223,14 +224,14 @@
/obj/item/mod/control/process(delta_time)
if(seconds_electrified > MACHINE_NOT_ELECTRIFIED)
seconds_electrified--
if((!cell || !cell.charge) && active && !activating)
if(!get_charge() && active && !activating)
power_off()
return PROCESS_KILL
var/malfunctioning_charge_drain = 0
if(malfunctioning)
malfunctioning_charge_drain = rand(1,20)
cell.charge = max(0, cell.charge - (cell_drain + malfunctioning_charge_drain)*delta_time)
update_cell_alert()
subtract_charge((charge_drain + malfunctioning_charge_drain)*delta_time)
update_charge_alert()
for(var/obj/item/mod/module/module as anything in modules)
if(malfunctioning && module.active && DT_PROB(5, delta_time))
module.on_deactivation()
@@ -255,7 +256,7 @@
/obj/item/mod/control/allow_attack_hand_drop(mob/user)
if(user != wearer)
return ..()
for(var/obj/item/part in mod_parts)
for(var/obj/item/part as anything in mod_parts)
if(part.loc != src)
balloon_alert(user, "retract parts first!")
playsound(src, 'sound/machines/scanbuzz.ogg', 25, FALSE, SILENCED_SOUND_EXTRARANGE)
@@ -264,7 +265,7 @@
/obj/item/mod/control/MouseDrop(atom/over_object)
if(usr != wearer || !istype(over_object, /atom/movable/screen/inventory/hand))
return ..()
for(var/obj/item/part in mod_parts)
for(var/obj/item/part as anything in mod_parts)
if(part.loc != src)
balloon_alert(wearer, "retract parts first!")
playsound(src, 'sound/machines/scanbuzz.ogg', 25, FALSE, SILENCED_SOUND_EXTRARANGE)
@@ -275,24 +276,25 @@
add_fingerprint(usr)
return ..()
/obj/item/mod/control/attack_hand(mob/user)
if(seconds_electrified && cell?.charge)
if(shock(user))
return
if(open && loc == user)
if(!cell)
balloon_alert(user, "no cell!")
return
balloon_alert(user, "removing cell...")
if(!do_after(user, 1.5 SECONDS, target = src))
/obj/item/mod/control/wrench_act(mob/living/user, obj/item/wrench)
if(..())
return TRUE
if(seconds_electrified && get_charge() && shock(user))
return TRUE
if(open)
if(!core)
balloon_alert(user, "no core!")
return TRUE
balloon_alert(user, "removing core...")
wrench.play_tool_sound(src, 100)
if(!wrench.use_tool(src, user, 3 SECONDS) || !open)
balloon_alert(user, "interrupted!")
return
balloon_alert(user, "cell removed")
playsound(src, 'sound/machines/click.ogg', 50, TRUE, SILENCED_SOUND_EXTRARANGE)
if(!user.put_in_hands(cell))
cell.forceMove(drop_location())
update_cell_alert()
return
return TRUE
wrench.play_tool_sound(src, 100)
balloon_alert(user, "core removed")
core.forceMove(drop_location())
update_charge_alert()
return TRUE
return ..()
/obj/item/mod/control/screwdriver_act(mob/living/user, obj/item/screwdriver)
@@ -352,20 +354,20 @@
return FALSE
install(attacking_item, user)
return TRUE
else if(istype(attacking_item, /obj/item/stock_parts/cell))
else if(istype(attacking_item, /obj/item/mod/core))
if(!open)
balloon_alert(user, "open the cover first!")
playsound(src, 'sound/machines/scanbuzz.ogg', 25, TRUE, SILENCED_SOUND_EXTRARANGE)
return FALSE
if(cell)
balloon_alert(user, "cell already installed!")
if(core)
balloon_alert(user, "core already installed!")
playsound(src, 'sound/machines/scanbuzz.ogg', 25, TRUE, SILENCED_SOUND_EXTRARANGE)
return FALSE
attacking_item.forceMove(src)
cell = attacking_item
balloon_alert(user, "cell installed")
var/obj/item/mod/core/attacking_core = attacking_item
attacking_core.install(src)
balloon_alert(user, "core installed")
playsound(src, 'sound/machines/click.ogg', 50, TRUE, SILENCED_SOUND_EXTRARANGE)
update_cell_alert()
update_charge_alert()
return TRUE
else if(is_wire_tool(attacking_item) && open)
wires.interact(user)
@@ -384,8 +386,12 @@
return ..()
/obj/item/mod/control/get_cell()
if(open)
return cell
if(!open)
return
var/obj/item/stock_parts/cell/cell = get_charge_source()
if(!istype(cell))
return
return cell
/obj/item/mod/control/GetAccess()
if(ai_controller)
@@ -418,7 +424,7 @@
/obj/item/mod/control/doStrip(mob/stripper, mob/owner)
if(active && !toggle_activate(stripper, force_deactivate = TRUE))
return
for(var/obj/item/part in mod_parts)
for(var/obj/item/part as anything in mod_parts)
if(part.loc == src)
continue
conceal(null, part)
@@ -437,7 +443,7 @@
RegisterSignal(wearer, COMSIG_ATOM_EXITED, .proc/on_exit)
RegisterSignal(wearer, COMSIG_PROCESS_BORGCHARGER_OCCUPANT, .proc/on_borg_charge)
RegisterSignal(src, COMSIG_ITEM_PRE_UNEQUIP, .proc/on_unequip)
update_cell_alert()
update_charge_alert()
for(var/obj/item/mod/module/module as anything in modules)
module.on_equip()
@@ -452,7 +458,7 @@
/obj/item/mod/control/proc/on_unequip()
SIGNAL_HANDLER
for(var/obj/item/part in mod_parts)
for(var/obj/item/part as anything in mod_parts)
if(part.loc != src)
return COMPONENT_ITEM_BLOCK_UNEQUIP
@@ -492,6 +498,8 @@
module_image.underlays += image(icon = 'icons/hud/radial.dmi', icon_state = "module_selected")
else if(module.active)
module_image.underlays += image(icon = 'icons/hud/radial.dmi', icon_state = "module_active")
if(!COOLDOWN_FINISHED(module, cooldown_timer))
module_image.add_overlay(image(icon = 'icons/hud/radial.dmi', icon_state = "module_cooldown"))
items += list(module.name = module_image)
if(!length(items))
return
@@ -525,11 +533,11 @@
return TRUE
/obj/item/mod/control/proc/shock(mob/living/user)
if(!istype(user) || cell?.charge < 1)
if(!istype(user) || get_charge() < 1)
return FALSE
do_sparks(5, TRUE, src)
var/check_range = TRUE
return electrocute_mob(user, cell, src, 0.7, check_range)
return electrocute_mob(user, get_charge_source(), src, 0.7, check_range)
/obj/item/mod/control/proc/install(module, mob/user)
var/obj/item/mod/module/new_module = module
@@ -558,6 +566,13 @@
new_module.on_install()
if(wearer)
new_module.on_equip()
var/datum/action/item_action/mod/pinned_module/action = new_module.pinned_to[wearer]
if(action)
action.Grant(wearer)
if(ai)
var/datum/action/item_action/mod/pinned_module/action = new_module.pinned_to[ai]
if(action)
action.Grant(ai)
if(user)
balloon_alert(user, "[new_module] added")
playsound(src, 'sound/machines/click.ogg', 50, TRUE, SILENCED_SOUND_EXTRARANGE)
@@ -572,6 +587,7 @@
old_module.on_deactivation()
if(wearer)
old_module.on_unequip()
old_module.pinned_to.Cut()
old_module.on_uninstall()
old_module.mod = null
@@ -583,28 +599,36 @@
req_access = card.access.Copy()
balloon_alert(user, "access updated")
/obj/item/mod/control/proc/update_cell_alert()
/obj/item/mod/control/proc/get_charge_source()
return core?.charge_source()
/obj/item/mod/control/proc/get_charge()
return core?.charge_amount() || 0
/obj/item/mod/control/proc/get_max_charge()
return core?.max_charge_amount() || 1 //avoid dividing by 0
/obj/item/mod/control/proc/get_charge_percent()
return ROUND_UP((get_charge() / get_max_charge()) * 100)
/obj/item/mod/control/proc/add_charge(amount)
return core?.add_charge(amount) || FALSE
/obj/item/mod/control/proc/subtract_charge(amount)
return core?.subtract_charge(amount) || FALSE
/obj/item/mod/control/proc/update_charge_alert()
if(!wearer)
return
if(!cell)
wearer.throw_alert("mod_charge", /atom/movable/screen/alert/nocell)
if(!core)
wearer.throw_alert("mod_charge", /atom/movable/screen/alert/nocore)
return
var/remaining_cell = cell.charge/cell.maxcharge
switch(remaining_cell)
if(0.75 to INFINITY)
wearer.clear_alert("mod_charge")
if(0.5 to 0.75)
wearer.throw_alert("mod_charge", /atom/movable/screen/alert/lowcell, 1)
if(0.25 to 0.5)
wearer.throw_alert("mod_charge", /atom/movable/screen/alert/lowcell, 2)
if(0.01 to 0.25)
wearer.throw_alert("mod_charge", /atom/movable/screen/alert/lowcell, 3)
else
wearer.throw_alert("mod_charge", /atom/movable/screen/alert/emptycell)
core.update_charge_alert()
/obj/item/mod/control/proc/update_speed()
for(var/obj/item/part as anything in mod_parts)
part.slowdown = (active ? slowdown_active : slowdown_inactive) / length(mod_parts)
var/list/all_parts = mod_parts + src
for(var/obj/item/part as anything in all_parts)
part.slowdown = (active ? slowdown_active : slowdown_inactive) / length(all_parts)
wearer?.update_equipment_speed_mods()
/obj/item/mod/control/proc/power_off()
@@ -616,9 +640,9 @@
if(part.loc == src)
return
if(part == cell)
cell = null
update_cell_alert()
if(part == core)
core.uninstall()
update_charge_alert()
return
if(part.loc == wearer)
return
@@ -634,10 +658,11 @@
/obj/item/mod/control/proc/on_borg_charge(datum/source, amount)
SIGNAL_HANDLER
if(!cell)
update_charge_alert()
var/obj/item/stock_parts/cell/cell = get_charge_source()
if(!istype(cell))
return
cell.give(amount)
update_cell_alert()
/obj/item/mod/control/proc/on_potion(atom/movable/source, obj/item/slimepotion/speed/speed_potion, mob/living/user)
SIGNAL_HANDLER
+246
View File
@@ -0,0 +1,246 @@
/obj/item/mod/core
name = "MOD core"
desc = "A non-functional MOD core. Inform the admins if you see this."
icon = 'icons/obj/clothing/modsuit/mod_construction.dmi'
icon_state = "mod-core"
inhand_icon_state = "electronic"
lefthand_file = 'icons/mob/inhands/misc/devices_lefthand.dmi'
righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi'
/// MOD unit we are powering.
var/obj/item/mod/control/mod
/obj/item/mod/core/Destroy()
if(mod)
uninstall()
return ..()
/obj/item/mod/core/proc/install(obj/item/mod/control/mod_unit)
mod = mod_unit
mod.core = src
forceMove(mod)
/obj/item/mod/core/proc/uninstall()
mod.core = null
mod = null
/obj/item/mod/core/proc/charge_source()
return
/obj/item/mod/core/proc/charge_amount()
return 0
/obj/item/mod/core/proc/max_charge_amount()
return 1
/obj/item/mod/core/proc/add_charge(amount)
return FALSE
/obj/item/mod/core/proc/subtract_charge(amount)
return FALSE
/obj/item/mod/core/proc/update_charge_alert()
mod.wearer.clear_alert("mod_charge")
/obj/item/mod/core/standard
name = "MOD standard core"
icon_state = "mod-core-standard"
desc = "Growing in the most lush, fertile areas of the planet Sprout, there is a crystal known as the Heartbloom. \
These rare, organic piezoelectric crystals are of incredible cultural significance to the artist castes of the \
Ethereals, owing to their appearance; which is exactly similar to that of an Ethereal's heart.\n\
Which one you have in your suit is unclear, but either way, \
it's been repurposed to be an internal power source for a Modular Outerwear Device."
/// Installed cell.
var/obj/item/stock_parts/cell/cell
/obj/item/mod/core/standard/Destroy()
if(cell)
QDEL_NULL(cell)
return ..()
/obj/item/mod/core/standard/install(obj/item/mod/control/mod_unit)
. = ..()
if(cell)
install_cell(cell)
RegisterSignal(mod, COMSIG_PARENT_EXAMINE, .proc/on_examine)
RegisterSignal(mod, COMSIG_ATOM_ATTACK_HAND, .proc/on_attack_hand)
RegisterSignal(mod, COMSIG_PARENT_ATTACKBY, .proc/on_attackby)
/obj/item/mod/core/standard/uninstall()
if(!QDELETED(cell))
cell.forceMove(drop_location())
uninstall_cell()
UnregisterSignal(mod, list(COMSIG_PARENT_EXAMINE, COMSIG_ATOM_ATTACK_HAND, COMSIG_PARENT_ATTACKBY))
return ..()
/obj/item/mod/core/standard/charge_source()
return cell
/obj/item/mod/core/standard/charge_amount()
var/obj/item/stock_parts/cell/charge_source = charge_source()
return charge_source?.charge || 0
/obj/item/mod/core/standard/max_charge_amount(amount)
var/obj/item/stock_parts/cell/charge_source = charge_source()
return charge_source?.maxcharge || 1
/obj/item/mod/core/standard/add_charge(amount)
var/obj/item/stock_parts/cell/charge_source = charge_source()
if(!charge_source)
return FALSE
return charge_source.give(amount)
/obj/item/mod/core/standard/subtract_charge(amount)
var/obj/item/stock_parts/cell/charge_source = charge_source()
if(!charge_source)
return FALSE
return charge_source.use(amount)
/obj/item/mod/core/standard/update_charge_alert()
var/obj/item/stock_parts/cell/charge_source = charge_source()
if(!charge_source)
mod.wearer.throw_alert("mod_charge", /atom/movable/screen/alert/nocell)
return
var/remaining_cell = charge_amount() / max_charge_amount()
switch(remaining_cell)
if(0.75 to INFINITY)
mod.wearer.clear_alert("mod_charge")
if(0.5 to 0.75)
mod.wearer.throw_alert("mod_charge", /atom/movable/screen/alert/lowcell, 1)
if(0.25 to 0.5)
mod.wearer.throw_alert("mod_charge", /atom/movable/screen/alert/lowcell, 2)
if(0.01 to 0.25)
mod.wearer.throw_alert("mod_charge", /atom/movable/screen/alert/lowcell, 3)
else
mod.wearer.throw_alert("mod_charge", /atom/movable/screen/alert/emptycell)
/obj/item/mod/core/standard/proc/install_cell(new_cell)
cell = new_cell
cell.forceMove(src)
RegisterSignal(src, COMSIG_ATOM_EXITED, .proc/on_exit)
/obj/item/mod/core/standard/proc/uninstall_cell()
if(!cell)
return
cell = null
UnregisterSignal(src, COMSIG_ATOM_EXITED)
/obj/item/mod/core/standard/proc/on_exit(datum/source, obj/item/stock_parts/cell, direction)
SIGNAL_HANDLER
if(!istype(cell) || cell.loc == src)
return
uninstall_cell()
/obj/item/mod/core/standard/proc/on_examine(datum/source, mob/examiner, list/examine_text)
SIGNAL_HANDLER
if(!mod.open)
return
examine_text += cell ? "You could remove the cell with an empty hand." : "You could use a cell on it to install one."
/obj/item/mod/core/standard/proc/on_attack_hand(datum/source, mob/living/user)
SIGNAL_HANDLER
if(mod.seconds_electrified && charge_amount() && mod.shock(user))
return COMPONENT_CANCEL_ATTACK_CHAIN
if(mod.open && mod.loc == user)
INVOKE_ASYNC(src, .proc/mod_uninstall_cell, user)
return COMPONENT_CANCEL_ATTACK_CHAIN
return NONE
/obj/item/mod/core/standard/proc/mod_uninstall_cell(mob/living/user)
if(!cell)
mod.balloon_alert(user, "no cell!")
return
mod.balloon_alert(user, "removing cell...")
if(!do_after(user, 1.5 SECONDS, target = mod))
mod.balloon_alert(user, "interrupted!")
return
mod.balloon_alert(user, "cell removed")
playsound(mod, 'sound/machines/click.ogg', 50, TRUE, SILENCED_SOUND_EXTRARANGE)
uninstall_cell()
cell.forceMove(drop_location())
user.put_in_hands(cell)
mod.update_charge_alert()
/obj/item/mod/core/standard/proc/on_attackby(datum/source, obj/item/attacking_item, mob/user)
SIGNAL_HANDLER
if(istype(attacking_item, /obj/item/stock_parts/cell))
if(!mod.open)
mod.balloon_alert(user, "open the cover first!")
playsound(mod, 'sound/machines/scanbuzz.ogg', 25, TRUE, SILENCED_SOUND_EXTRARANGE)
return NONE
if(cell)
mod.balloon_alert(user, "cell already installed!")
playsound(mod, 'sound/machines/scanbuzz.ogg', 25, TRUE, SILENCED_SOUND_EXTRARANGE)
return COMPONENT_NO_AFTERATTACK
install_cell(attacking_item)
mod.balloon_alert(user, "cell installed")
playsound(mod, 'sound/machines/click.ogg', 50, TRUE, SILENCED_SOUND_EXTRARANGE)
mod.update_charge_alert()
return COMPONENT_NO_AFTERATTACK
return NONE
/obj/item/mod/core/ethereal
name = "MOD ethereal core"
icon_state = "mod-core-ethereal"
desc = "A reverse engineered core of a Modular Outerwear Device. Using natural liquid electricity from Ethereals, \
preventing the need to use external sources to convert electric charge."
/// A modifier to all charge we use, ethereals don't need to spend as much energy as normal suits.
var/charge_modifier = 0.1
/obj/item/mod/core/ethereal/charge_source()
var/obj/item/organ/stomach/ethereal/ethereal_stomach = mod.wearer.getorganslot(ORGAN_SLOT_STOMACH)
if(!istype(ethereal_stomach))
return
return ethereal_stomach
/obj/item/mod/core/ethereal/charge_amount()
var/obj/item/organ/stomach/ethereal/charge_source = charge_source()
return charge_source?.crystal_charge || ETHEREAL_CHARGE_NONE
/obj/item/mod/core/ethereal/max_charge_amount()
return ETHEREAL_CHARGE_FULL
/obj/item/mod/core/ethereal/add_charge(amount)
var/obj/item/organ/stomach/ethereal/charge_source = charge_source()
if(!charge_source)
return FALSE
charge_source.adjust_charge(amount*charge_modifier)
return TRUE
/obj/item/mod/core/ethereal/subtract_charge(amount)
var/obj/item/organ/stomach/ethereal/charge_source = charge_source()
if(!charge_source)
return FALSE
charge_source.adjust_charge(-amount*charge_modifier)
return TRUE
/obj/item/mod/core/ethereal/update_charge_alert()
var/obj/item/organ/stomach/ethereal/charge_source = charge_source()
if(charge_source)
mod.wearer.clear_alert("mod_charge")
return
mod.wearer.throw_alert("mod_charge", /atom/movable/screen/alert/nocell)
/obj/item/mod/core/infinite
name = "MOD infinite core"
icon_state = "mod-core-infinite"
desc = "A fusion core using the rare palladium to sustain enough energy for the lifetime of the MOD's user. \
This might be because of the slowly killing poison inside, but those are just rumors."
/obj/item/mod/core/infinite/charge_source()
return src
/obj/item/mod/core/infinite/charge_amount()
return INFINITY
/obj/item/mod/core/infinite/max_charge_amount()
return INFINITY
/obj/item/mod/core/infinite/add_charge(amount)
return TRUE
/obj/item/mod/core/infinite/subtract_charge(amount)
return TRUE
+64 -55
View File
@@ -23,6 +23,8 @@
var/armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, BIO = 100, FIRE = 25, ACID = 25, WOUND = 10)
/// Resistance flags shared across the MOD pieces.
var/resistance_flags = NONE
/// Atom flags shared across the MOD pieces.
var/atom_flags = NONE
/// Max heat protection shared across the MOD pieces.
var/max_heat_protection_temperature = SPACE_SUIT_MAX_TEMP_PROTECT
/// Max cold protection shared across the MOD pieces.
@@ -34,7 +36,7 @@
/// How much modules can the MOD carry without malfunctioning.
var/complexity_max = DEFAULT_MAX_COMPLEXITY
/// How much battery power the MOD uses by just being on
var/cell_drain = DEFAULT_CELL_DRAIN
var/charge_drain = DEFAULT_CHARGE_DRAIN
/// Slowdown of the MOD when not active.
var/slowdown_inactive = 1.25
/// Slowdown of the MOD when active.
@@ -228,14 +230,14 @@
mining teams have since heavily tweaked the suit themselves. Aftermarket armor plating has been added, \
giving way to incredible protection against corrosives and thermal protection good enough for volcanic environments. \
The systems have been upgraded as well, giving space for further modification down the line. \
However, all of this has proven to be straining on the cell and the actuators of the suit, \
However, all of this has proven to be straining on the power and the actuators of the suit, \
making it demand more power in exchange."
default_skin = "mining"
armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 50, BIO = 100, FIRE = 100, ACID = 75, WOUND = 15)
resistance_flags = FIRE_PROOF
max_heat_protection_temperature = FIRE_SUIT_MAX_TEMP_PROTECT
complexity_max = DEFAULT_MAX_COMPLEXITY + 5
cell_drain = DEFAULT_CELL_DRAIN * 2
charge_drain = DEFAULT_CHARGE_DRAIN * 2
skins = list(
"mining" = list(
HELMET_LAYER = null,
@@ -273,7 +275,7 @@
and weak against fingers tapping the glass."
default_skin = "medical"
armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 10, BIO = 100, FIRE = 60, ACID = 75, WOUND = 10)
cell_drain = DEFAULT_CELL_DRAIN * 1.5
charge_drain = DEFAULT_CHARGE_DRAIN * 1.5
slowdown_inactive = 1
slowdown_active = 0.5
skins = list(
@@ -338,7 +340,7 @@
armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 10, BIO = 100, FIRE = 100, ACID = 100, WOUND = 10)
resistance_flags = FIRE_PROOF|ACID_PROOF
max_heat_protection_temperature = FIRE_SUIT_MAX_TEMP_PROTECT
cell_drain = DEFAULT_CELL_DRAIN * 1.5
charge_drain = DEFAULT_CHARGE_DRAIN * 1.5
slowdown_inactive = 0.75
slowdown_active = 0.25
inbuilt_modules = list(/obj/item/mod/module/quick_carry/advanced)
@@ -382,6 +384,7 @@
default_skin = "research"
armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 100, BIO = 100, FIRE = 100, ACID = 100, WOUND = 15)
resistance_flags = FIRE_PROOF|ACID_PROOF
atom_flags = PREVENT_CONTENTS_EXPLOSION_1
max_heat_protection_temperature = FIRE_SUIT_MAX_TEMP_PROTECT
complexity_max = DEFAULT_MAX_COMPLEXITY + 5
slowdown_inactive = 1.75
@@ -424,7 +427,7 @@
However, the systems used in these suits are more than a few years out of date, \
leading to an overall lower capacity for modules."
default_skin = "security"
armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 10, BIO = 100, FIRE = 75, ACID = 75, WOUND = 20)
armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 25, BIO = 100, FIRE = 75, ACID = 75, WOUND = 20)
siemens_coefficient = 0
complexity_max = DEFAULT_MAX_COMPLEXITY - 5
slowdown_inactive = 1
@@ -466,7 +469,7 @@
Heatsinks line the sides of the suit, and greater technology has been used in insulating it against \
both corrosive environments and sudden impacts to the user's joints."
default_skin = "safeguard"
armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 25, BIO = 100, FIRE = 100, ACID = 95, WOUND = 25)
armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 40, BIO = 100, FIRE = 100, ACID = 95, WOUND = 25)
resistance_flags = FIRE_PROOF
max_heat_protection_temperature = FIRE_SUIT_MAX_TEMP_PROTECT
siemens_coefficient = 0
@@ -513,6 +516,7 @@
default_skin = "magnate"
armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 50, BIO = 100, FIRE = 100, ACID = 100, WOUND = 20)
resistance_flags = FIRE_PROOF|ACID_PROOF
atom_flags = PREVENT_CONTENTS_EXPLOSION_1
max_heat_protection_temperature = FIRE_IMMUNITY_MAX_TEMP_PROTECT
siemens_coefficient = 0
complexity_max = DEFAULT_MAX_COMPLEXITY + 5
@@ -555,10 +559,9 @@
All you know is that this suit is mysteriously power-efficient, and far too colorful for the Mime to steal."
default_skin = "cosmohonk"
armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 10, BIO = 100, FIRE = 60, ACID = 30, WOUND = 5)
cell_drain = DEFAULT_CELL_DRAIN * 0.25
charge_drain = DEFAULT_CHARGE_DRAIN * 0.25
slowdown_inactive = 1.75
slowdown_active = 1.25
inbuilt_modules = list(/obj/item/mod/module/waddle)
skins = list(
"cosmohonk" = list(
HELMET_LAYER = NECK_LAYER,
@@ -591,12 +594,13 @@
extended_desc = "An advanced combat suit adorned in a sinister crimson red color scheme, produced and manufactured \
for special mercenary operations. The build is a streamlined layering consisting of shaped Plasteel, \
and composite ceramic, while the under suit is lined with a lightweight Kevlar and durathread hybrid weave \
to provide ample protection to the user where the plating doesn't, with an illegal onboard cell powered \
to provide ample protection to the user where the plating doesn't, with an illegal onboard electric powered \
ablative shield module to provide resistance against conventional energy firearms. \
A small tag hangs off of it reading; 'Property of the Gorlex Marauders, with assistance from Cybersun Industries. \
All rights reserved, tampering with suit will void warranty."
default_skin = "syndicate"
armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 35, BIO = 100, FIRE = 50, ACID = 90, WOUND = 25)
atom_flags = PREVENT_CONTENTS_EXPLOSION_1
max_heat_protection_temperature = FIRE_SUIT_MAX_TEMP_PROTECT
siemens_coefficient = 0
slowdown_inactive = 1
@@ -662,6 +666,7 @@
default_skin = "elite"
armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 55, BIO = 100, FIRE = 100, ACID = 100, WOUND = 25)
resistance_flags = FIRE_PROOF|ACID_PROOF
atom_flags = PREVENT_CONTENTS_EXPLOSION_1
max_heat_protection_temperature = FIRE_IMMUNITY_MAX_TEMP_PROTECT
siemens_coefficient = 0
slowdown_inactive = 0.75
@@ -700,9 +705,9 @@
extended_desc = "The Wizard Federation's relatively low-tech MODsuit. This armor employs not \
plasteel or carbon fibre, but space dragon scales for its protection. Recruits are expected to \
gather these themselves, but the effort is well worth it, the suit being well-armored against threats \
both mundane and mystic. Rather than wholly relying on the suit's cell, which would surely perish \
both mundane and mystic. Rather than wholly relying on a cell, which would surely perish \
under the load, several naturally-occurring bluespace gemstones have been utilized as \
supplementary means of power. The hood and platform boots are of unknown usage, but it's speculated that \
default means of power. The hood and platform boots are of unknown usage, but it's speculated that \
wizards trend towards the dramatic."
default_skin = "enchanted"
armor = list(MELEE = 40, BULLET = 40, LASER = 40, ENERGY = 50, BOMB = 35, BIO = 100, FIRE = 100, ACID = 100, WOUND = 30)
@@ -755,7 +760,7 @@
armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 50, BIO = 100, FIRE = 100, ACID = 75, WOUND = 5)
resistance_flags = FIRE_PROOF
complexity_max = DEFAULT_MAX_COMPLEXITY + 5
cell_drain = DEFAULT_CELL_DRAIN * 2
charge_drain = DEFAULT_CHARGE_DRAIN * 2
slowdown_inactive = 2
slowdown_active = 1.5
ui_theme = "hackerman"
@@ -795,6 +800,7 @@
While wearing it you feel an extreme deference to darkness. "
default_skin = "responsory"
armor = list(MELEE = 35, BULLET = 30, LASER = 30, ENERGY = 40, BOMB = 50, BIO = 100, FIRE = 100, ACID = 90, WOUND = 15)
atom_flags = PREVENT_CONTENTS_EXPLOSION_1
resistance_flags = FIRE_PROOF
max_heat_protection_temperature = FIRE_IMMUNITY_MAX_TEMP_PROTECT
siemens_coefficient = 0
@@ -860,6 +866,7 @@
default_skin = "apocryphal"
armor = list(MELEE = 80, BULLET = 80, LASER = 50, ENERGY = 60, BOMB = 100, BIO = 100, FIRE = 100, ACID = 100, WOUND = 25)
resistance_flags = FIRE_PROOF|ACID_PROOF
atom_flags = PREVENT_CONTENTS_EXPLOSION_1
max_heat_protection_temperature = FIRE_IMMUNITY_MAX_TEMP_PROTECT
siemens_coefficient = 0
complexity_max = DEFAULT_MAX_COMPLEXITY + 10
@@ -900,6 +907,7 @@
default_skin = "corporate"
armor = list(MELEE = 35, BULLET = 40, LASER = 40, ENERGY = 50, BOMB = 50, BIO = 100, FIRE = 100, ACID = 100, WOUND = 15)
resistance_flags = FIRE_PROOF|ACID_PROOF
atom_flags = PREVENT_CONTENTS_EXPLOSION_1
max_heat_protection_temperature = FIRE_IMMUNITY_MAX_TEMP_PROTECT
siemens_coefficient = 0
slowdown_inactive = 0.5
@@ -931,6 +939,46 @@
),
)
/datum/mod_theme/chrono
name = "chrono"
desc = "A suit beyond our time, beyond time itself. Used to traverse timelines and \"correct their course\"."
extended_desc = "A suit whose tech goes beyond this era's understanding. The internal mechanisms are all but \
completely alien, but the purpose is quite simple. The suit protects the user from the many incredibly lethal \
and sometimes hilariously painful side effects of jumping timelines, while providing inbuilt equipment for \
making timeline adjustments to correct a bad course."
default_skin = "chrono"
armor = list(MELEE = 60, BULLET = 60, LASER = 60, ENERGY = 60, BOMB = 30, BIO = 100, FIRE = 100, ACID = 100)
resistance_flags = FIRE_PROOF|ACID_PROOF
max_heat_protection_temperature = FIRE_SUIT_MAX_TEMP_PROTECT
complexity_max = DEFAULT_MAX_COMPLEXITY - 10
slowdown_inactive = 0
slowdown_active = 0
skins = list(
"chrono" = list(
HELMET_LAYER = NECK_LAYER,
HELMET_FLAGS = list(
UNSEALED_CLOTHING = SNUG_FIT,
SEALED_CLOTHING = THICKMATERIAL|STOPSPRESSUREDAMAGE|BLOCK_GAS_SMOKE_EFFECT,
UNSEALED_INVISIBILITY = HIDEFACIALHAIR,
SEALED_INVISIBILITY = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE|HIDEHAIR|HIDESNOUT,
SEALED_COVER = HEADCOVERSMOUTH|HEADCOVERSEYES|PEPPERPROOF,
),
CHESTPLATE_FLAGS = list(
UNSEALED_CLOTHING = THICKMATERIAL,
SEALED_CLOTHING = STOPSPRESSUREDAMAGE,
SEALED_INVISIBILITY = HIDEJUMPSUIT,
),
GAUNTLETS_FLAGS = list(
UNSEALED_CLOTHING = THICKMATERIAL,
SEALED_CLOTHING = STOPSPRESSUREDAMAGE,
),
BOOTS_FLAGS = list(
UNSEALED_CLOTHING = THICKMATERIAL,
SEALED_CLOTHING = STOPSPRESSUREDAMAGE,
),
),
)
/datum/mod_theme/debug
name = "debug"
desc = "Strangely nostalgic."
@@ -940,6 +988,7 @@
default_skin = "debug"
armor = list(MELEE = 50, BULLET = 50, LASER = 50, ENERGY = 50, BOMB = 100, BIO = 100, FIRE = 100, ACID = 100, WOUND = 0)
resistance_flags = FIRE_PROOF|ACID_PROOF
atom_flags = PREVENT_CONTENTS_EXPLOSION_1
max_heat_protection_temperature = FIRE_SUIT_MAX_TEMP_PROTECT
complexity_max = 50
slowdown_inactive = 0.5
@@ -981,9 +1030,10 @@
default_skin = "debug"
armor = list(MELEE = 100, BULLET = 100, LASER = 100, ENERGY = 100, BOMB = 100, BIO = 100, FIRE = 100, ACID = 100, WOUND = 100)
resistance_flags = INDESTRUCTIBLE|LAVA_PROOF|FIRE_PROOF|UNACIDABLE|ACID_PROOF
atom_flags = PREVENT_CONTENTS_EXPLOSION_1
max_heat_protection_temperature = FIRE_IMMUNITY_MAX_TEMP_PROTECT
complexity_max = 1000
cell_drain = DEFAULT_CELL_DRAIN * 0
charge_drain = DEFAULT_CHARGE_DRAIN * 0
slowdown_inactive = 0
slowdown_active = 0
skins = list(
@@ -1007,44 +1057,3 @@
),
),
)
/datum/mod_theme/timeline
name = "chrono"
desc = "A suit beyond our time, beyond time itself. Used to traverse timelines and \"correct their course\"."
extended_desc = "A suit whose tech goes beyond this era's understanding. The internal mechanisms are all but \
completely alien, but the purpose is quite simple. The suit protects the user from the many incredibly lethal \
and sometimes hilariously painful side effects of jumping timelines, while providing inbuilt equipment for \
making timeline adjustments to correct a bad course."
default_skin = "timeline"
armor = list(MELEE = 60, BULLET = 60, LASER = 60, ENERGY = 60, BOMB = 30, BIO = 90, FIRE = 100, ACID = 100)
resistance_flags = FIRE_PROOF|ACID_PROOF
max_heat_protection_temperature = FIRE_SUIT_MAX_TEMP_PROTECT
complexity_max = 15
slowdown_inactive = 0
slowdown_active = 0
skins = list(
"timeline" = list(
HELMET_LAYER = null,
HELMET_FLAGS = list(
UNSEALED_CLOTHING = SNUG_FIT|THICKMATERIAL,
SEALED_CLOTHING = STOPSPRESSUREDAMAGE|BLOCK_GAS_SMOKE_EFFECT,
UNSEALED_INVISIBILITY = HIDEFACIALHAIR|HIDEEARS|HIDEHAIR|HIDESNOUT,
SEALED_INVISIBILITY = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE,
UNSEALED_COVER = HEADCOVERSMOUTH,
SEALED_COVER = HEADCOVERSEYES|PEPPERPROOF,
),
CHESTPLATE_FLAGS = list(
UNSEALED_CLOTHING = THICKMATERIAL,
SEALED_CLOTHING = STOPSPRESSUREDAMAGE,
SEALED_INVISIBILITY = HIDEJUMPSUIT,
),
GAUNTLETS_FLAGS = list(
UNSEALED_CLOTHING = THICKMATERIAL,
SEALED_CLOTHING = STOPSPRESSUREDAMAGE,
),
BOOTS_FLAGS = list(
UNSEALED_CLOTHING = THICKMATERIAL,
SEALED_CLOTHING = STOPSPRESSUREDAMAGE,
),
),
)
+67 -56
View File
@@ -1,9 +1,17 @@
/obj/item/mod/control/pre_equipped
cell = /obj/item/stock_parts/cell/high
/// The skin we apply to the suit, defaults to the default_skin of the theme.
var/applied_skin
/// The MOD core we apply to the suit.
var/applied_core = /obj/item/mod/core/standard
/// The cell we apply to the core. Only applies to standard core suits.
var/applied_cell = /obj/item/stock_parts/cell/high
/obj/item/mod/control/pre_equipped/Initialize(mapload, new_theme, new_skin)
/obj/item/mod/control/pre_equipped/Initialize(mapload, new_theme, new_skin, new_core)
new_skin = applied_skin
new_core = new applied_core(src)
if(istype(new_core, /obj/item/mod/core/standard))
var/obj/item/mod/core/standard/cell_core = new_core
cell_core.cell = new applied_cell()
return ..()
/obj/item/mod/control/pre_equipped/standard
@@ -11,7 +19,7 @@
/obj/item/mod/module/storage,
/obj/item/mod/module/welding,
/obj/item/mod/module/flashlight,
)
)
/obj/item/mod/control/pre_equipped/engineering
theme = /datum/mod_theme/engineering
@@ -21,7 +29,7 @@
/obj/item/mod/module/rad_protection,
/obj/item/mod/module/flashlight,
/obj/item/mod/module/magboot,
)
)
/obj/item/mod/control/pre_equipped/atmospheric
theme = /datum/mod_theme/atmospheric
@@ -31,22 +39,22 @@
/obj/item/mod/module/rad_protection,
/obj/item/mod/module/flashlight,
/obj/item/mod/module/t_ray,
)
)
/obj/item/mod/control/pre_equipped/advanced
theme = /datum/mod_theme/advanced
cell = /obj/item/stock_parts/cell/super
applied_cell = /obj/item/stock_parts/cell/super
initial_modules = list(
/obj/item/mod/module/storage/large_capacity,
/obj/item/mod/module/welding,
/obj/item/mod/module/rad_protection,
/obj/item/mod/module/flashlight,
/obj/item/mod/module/jetpack,
)
)
/obj/item/mod/control/pre_equipped/mining
theme = /datum/mod_theme/mining
cell = /obj/item/stock_parts/cell/high/plus
applied_cell = /obj/item/stock_parts/cell/high/plus
initial_modules = list(
/obj/item/mod/module/storage/large_capacity,
/obj/item/mod/module/welding,
@@ -54,7 +62,7 @@
/obj/item/mod/module/flashlight,
/obj/item/mod/module/magboot,
/obj/item/mod/module/drill,
)
)
/obj/item/mod/control/pre_equipped/medical
theme = /datum/mod_theme/medical
@@ -63,69 +71,68 @@
/obj/item/mod/module/flashlight,
/obj/item/mod/module/health_analyzer,
/obj/item/mod/module/quick_carry,
)
)
/obj/item/mod/control/pre_equipped/rescue
theme = /datum/mod_theme/rescue
cell = /obj/item/stock_parts/cell/super
applied_cell = /obj/item/stock_parts/cell/super
initial_modules = list(
/obj/item/mod/module/storage/large_capacity,
/obj/item/mod/module/flashlight,
/obj/item/mod/module/health_analyzer,
/obj/item/mod/module/injector,
)
)
/obj/item/mod/control/pre_equipped/research
theme = /datum/mod_theme/research
cell = /obj/item/stock_parts/cell/super
applied_cell = /obj/item/stock_parts/cell/super
initial_modules = list(
/obj/item/mod/module/storage/large_capacity,
/obj/item/mod/module/welding,
/obj/item/mod/module/flashlight,
/obj/item/mod/module/circuit,
/obj/item/mod/module/t_ray,
)
)
/obj/item/mod/control/pre_equipped/security
theme = /datum/mod_theme/security
applied_cell = /obj/item/stock_parts/cell/high/plus
initial_modules = list(
/obj/item/mod/module/storage,
/obj/item/mod/module/welding,
/obj/item/mod/module/flashlight,
/obj/item/mod/module/holster,
)
)
/obj/item/mod/control/pre_equipped/safeguard
theme = /datum/mod_theme/safeguard
cell = /obj/item/stock_parts/cell/super
applied_cell = /obj/item/stock_parts/cell/super
initial_modules = list(
/obj/item/mod/module/storage/large_capacity,
/obj/item/mod/module/welding,
/obj/item/mod/module/flashlight,
/obj/item/mod/module/jetpack,
/obj/item/mod/module/holster,
)
)
/obj/item/mod/control/pre_equipped/magnate
theme = /datum/mod_theme/magnate
cell = /obj/item/stock_parts/cell/hyper
applied_cell = /obj/item/stock_parts/cell/hyper
initial_modules = list(
/obj/item/mod/module/storage/large_capacity,
/obj/item/mod/module/welding,
/obj/item/mod/module/jetpack,
/obj/item/mod/module/holster,
/obj/item/mod/module/pathfinder,
)
)
/obj/item/mod/control/pre_equipped/cosmohonk
theme = /datum/mod_theme/cosmohonk
initial_modules = list(
/obj/item/mod/module/storage,
/obj/item/mod/module/bikehorn,
)
)
/obj/item/mod/control/pre_equipped/traitor
theme = /datum/mod_theme/syndicate
cell = /obj/item/stock_parts/cell/super
applied_cell = /obj/item/stock_parts/cell/super
initial_modules = list(
/obj/item/mod/module/storage/syndicate,
/obj/item/mod/module/welding,
@@ -133,22 +140,23 @@
/obj/item/mod/module/pathfinder,
/obj/item/mod/module/flashlight,
/obj/item/mod/module/dna_lock,
)
)
/obj/item/mod/control/pre_equipped/nuclear
theme = /datum/mod_theme/syndicate
cell = /obj/item/stock_parts/cell/hyper
applied_cell = /obj/item/stock_parts/cell/hyper
initial_modules = list(
/obj/item/mod/module/storage/syndicate,
/obj/item/mod/module/welding,
/obj/item/mod/module/jetpack,
/obj/item/mod/module/flashlight,
/obj/item/mod/module/holster,
)
/obj/item/mod/module/injector,
)
/obj/item/mod/control/pre_equipped/elite
theme = /datum/mod_theme/elite
cell = /obj/item/stock_parts/cell/bluespace
applied_cell = /obj/item/stock_parts/cell/bluespace
initial_modules = list(
/obj/item/mod/module/storage/syndicate,
/obj/item/mod/module/welding,
@@ -156,42 +164,45 @@
/obj/item/mod/module/jetpack,
/obj/item/mod/module/flashlight,
/obj/item/mod/module/holster,
)
/obj/item/mod/module/injector,
)
/obj/item/mod/control/pre_equipped/enchanted
theme = /datum/mod_theme/enchanted
cell = /obj/item/stock_parts/cell/crystal_cell/wizard
applied_core = /obj/item/mod/core/infinite
initial_modules = list(
/obj/item/mod/module/storage/large_capacity,
/obj/item/mod/module/energy_shield/wizard,
/obj/item/mod/module/emp_shield,
)
)
/obj/item/mod/control/pre_equipped/prototype
theme = /datum/mod_theme/prototype
cell = /obj/item/stock_parts/cell/high/plus
applied_cell = /obj/item/stock_parts/cell/upgraded
initial_modules = list(
/obj/item/mod/module/storage,
/obj/item/mod/module/welding,
/obj/item/mod/module/rad_protection,
/obj/item/mod/module/flashlight,
/obj/item/mod/module/tether,
)
)
/obj/item/mod/control/pre_equipped/responsory
theme = /datum/mod_theme/responsory
cell = /obj/item/stock_parts/cell/hyper
applied_cell = /obj/item/stock_parts/cell/hyper
initial_modules = list(
/obj/item/mod/module/storage/large_capacity,
/obj/item/mod/module/welding,
/obj/item/mod/module/emp_shield,
/obj/item/mod/module/flashlight,
/obj/item/mod/module/holster,
)
)
/// The insignia type, insignias show what sort of member of the ERT you're dealing with.
var/insignia_type = /obj/item/mod/module/insignia
/// Additional module we add, as a treat.
var/additional_module = /obj/item/mod/module
/obj/item/mod/control/pre_equipped/responsory/Initialize(mapload, new_theme, new_skin)
/obj/item/mod/control/pre_equipped/responsory/Initialize(mapload, new_theme, new_skin, new_core)
initial_modules.Insert(1, insignia_type)
initial_modules.Add(additional_module)
return ..()
@@ -233,7 +244,7 @@
/obj/item/mod/module/emp_shield,
/obj/item/mod/module/flashlight,
/obj/item/mod/module/holster,
)
)
/obj/item/mod/control/pre_equipped/responsory/inquisitory/commander
insignia_type = /obj/item/mod/module/insignia/commander
@@ -253,26 +264,38 @@
/obj/item/mod/control/pre_equipped/apocryphal
theme = /datum/mod_theme/apocryphal
cell = /obj/item/stock_parts/cell/bluespace
applied_cell = /obj/item/stock_parts/cell/bluespace
initial_modules = list(
/obj/item/mod/module/storage/bluespace,
/obj/item/mod/module/welding,
/obj/item/mod/module/emp_shield,
/obj/item/mod/module/jetpack,
/obj/item/mod/module/holster,
)
)
/obj/item/mod/control/pre_equipped/corporate
theme = /datum/mod_theme/corporate
cell = /obj/item/stock_parts/cell/bluespace
applied_core = /obj/item/mod/core/infinite
initial_modules = list(
/obj/item/mod/module/storage/bluespace,
/obj/item/mod/module/holster,
)
)
/obj/item/mod/control/pre_equipped/chrono
theme = /datum/mod_theme/chrono
applied_core = /obj/item/mod/core/infinite
initial_modules = list(
/obj/item/mod/module/eradication_lock,
/obj/item/mod/module/emp_shield,
/obj/item/mod/module/timeline_jumper,
/obj/item/mod/module/timestopper,
/obj/item/mod/module/rewinder,
/obj/item/mod/module/tem,
)
/obj/item/mod/control/pre_equipped/debug
theme = /datum/mod_theme/debug
cell = /obj/item/stock_parts/cell/bluespace
applied_core = /obj/item/mod/core/infinite
initial_modules = list( //one of every type of module, for testing if they all work correctly
/obj/item/mod/module/storage/bluespace,
/obj/item/mod/module/welding,
@@ -281,11 +304,11 @@
/obj/item/mod/module/rad_protection,
/obj/item/mod/module/tether,
/obj/item/mod/module/injector,
)
)
/obj/item/mod/control/pre_equipped/administrative
theme = /datum/mod_theme/administrative
cell = /obj/item/stock_parts/cell/infinite/abductor
applied_core = /obj/item/mod/core/infinite
initial_modules = list(
/obj/item/mod/module/storage/bluespace,
/obj/item/mod/module/welding,
@@ -293,18 +316,6 @@
/obj/item/mod/module/quick_carry/advanced,
/obj/item/mod/module/magboot/advanced,
/obj/item/mod/module/jetpack,
)
/obj/item/mod/control/pre_equipped/timeline
theme = /datum/mod_theme/timeline
cell = /obj/item/stock_parts/cell/bluespace
initial_modules = list(
/obj/item/mod/module/eradication_lock,
/obj/item/mod/module/emp_shield,
/obj/item/mod/module/timeline_jumper,
/obj/item/mod/module/timestopper,
/obj/item/mod/module/rewinder,
/obj/item/mod/module/tem,
)
//these exist for the prefs menu
+2 -2
View File
@@ -16,8 +16,8 @@
data["wearer_name"] = wearer ? (wearer.get_authentification_name("Unknown") || "Unknown") : "No Occupant"
data["wearer_job"] = wearer ? wearer.get_assignment("Unknown", "Unknown", FALSE) : "No Job"
data["AI"] = ai?.name
data["cell"] = cell?.name
data["charge"] = cell ? round(cell.percent(), 1) : 0
data["core"] = core?.name
data["charge"] = get_charge_percent()
data["modules"] = list()
for(var/obj/item/mod/module/module as anything in modules)
var/list/module_data = list(
+15 -9
View File
@@ -12,11 +12,11 @@
/// How much space it takes up in the MOD
var/complexity = 0
/// Power use when idle
var/idle_power_cost = DEFAULT_CELL_DRAIN * 0
var/idle_power_cost = DEFAULT_CHARGE_DRAIN * 0
/// Power use when active
var/active_power_cost = DEFAULT_CELL_DRAIN * 0
var/active_power_cost = DEFAULT_CHARGE_DRAIN * 0
/// Power use when used, we call it manually
var/use_power_cost = DEFAULT_CELL_DRAIN * 0
var/use_power_cost = DEFAULT_CHARGE_DRAIN * 0
/// ID used by their TGUI
var/tgui_id
/// Linked MODsuit
@@ -106,14 +106,14 @@
if(!COOLDOWN_FINISHED(src, cooldown_timer))
balloon_alert(mod.wearer, "on cooldown!")
return FALSE
if(!mod.active || mod.activating || !mod.cell?.charge)
if(!mod.active || mod.activating || !mod.get_charge())
balloon_alert(mod.wearer, "unpowered!")
return FALSE
if(!allowed_in_phaseout && istype(mod.wearer.loc, /obj/effect/dummy/phased_mob))
//specifically a to_chat because the user is phased out.
to_chat(mod.wearer, span_warning("You cannot activate this right now."))
return FALSE
if(SEND_SIGNAL(src, COMSIG_MOD_MODULE_TRIGGERED) & MOD_ABORT_USE)
if(SEND_SIGNAL(src, COMSIG_MODULE_TRIGGERED) & MOD_ABORT_USE)
return FALSE
if(module_type == MODULE_ACTIVE)
if(mod.selected_module && !mod.selected_module.on_deactivation())
@@ -133,6 +133,7 @@
active = TRUE
COOLDOWN_START(src, cooldown_timer, cooldown_time)
mod.wearer.update_inv_back()
SEND_SIGNAL(src, COMSIG_MODULE_ACTIVATED)
return TRUE
/// Called when the module is deactivated
@@ -149,6 +150,7 @@
UnregisterSignal(mod.wearer, used_signal)
used_signal = null
mod.wearer.update_inv_back()
SEND_SIGNAL(src, COMSIG_MODULE_DEACTIVATED)
return TRUE
/// Called when the module is used
@@ -162,15 +164,18 @@
//specifically a to_chat because the user is phased out.
to_chat(mod.wearer, span_warning("You cannot activate this right now."))
return FALSE
if(SEND_SIGNAL(src, COMSIG_MOD_MODULE_TRIGGERED) & MOD_ABORT_USE)
if(SEND_SIGNAL(src, COMSIG_MODULE_TRIGGERED) & MOD_ABORT_USE)
return FALSE
COOLDOWN_START(src, cooldown_timer, cooldown_time)
addtimer(CALLBACK(mod.wearer, /mob.proc/update_inv_back), cooldown_time)
mod.wearer.update_inv_back()
SEND_SIGNAL(src, COMSIG_MODULE_USED)
return TRUE
/// Called when an activated module without a device is used
/obj/item/mod/module/proc/on_select_use(atom/target)
if(mod.wearer.incapacitated(ignore_grab = TRUE))
return FALSE
mod.wearer.face_atom(target)
if(!on_use())
return FALSE
@@ -197,15 +202,16 @@
/obj/item/mod/module/proc/on_active_process(delta_time)
return
/// Drains power from the suit cell
/// Drains power from the suit charge
/obj/item/mod/module/proc/drain_power(amount)
if(!check_power(amount))
return FALSE
mod.cell.charge = max(0, mod.cell.charge - amount)
mod.subtract_charge(amount)
return TRUE
/// Checks if there is enough power in the suit
/obj/item/mod/module/proc/check_power(amount)
if(!mod.cell || (mod.cell.charge < amount))
if(mod.get_charge() < amount)
return FALSE
return TRUE
+6 -10
View File
@@ -9,7 +9,7 @@
so this extra armor provides zero ability for extravehicular activity while deployed."
icon_state = "armor_booster"
module_type = MODULE_TOGGLE
active_power_cost = DEFAULT_CELL_DRAIN * 0.3
active_power_cost = DEFAULT_CHARGE_DRAIN * 0.3
removable = FALSE
incompatible_modules = list(/obj/item/mod/module/armor_booster)
cooldown_time = 0.5 SECONDS
@@ -44,8 +44,6 @@
var/obj/item/clothing/clothing_part = part
if(clothing_part.clothing_flags & STOPSPRESSUREDAMAGE)
clothing_part.clothing_flags &= ~STOPSPRESSUREDAMAGE
clothing_part.heat_protection = NONE
clothing_part.cold_protection = NONE
spaceproofed[clothing_part] = TRUE
/obj/item/mod/module/armor_booster/on_deactivation()
@@ -66,8 +64,6 @@
var/obj/item/clothing/clothing_part = part
if(spaceproofed[clothing_part])
clothing_part.clothing_flags |= STOPSPRESSUREDAMAGE
clothing_part.heat_protection = initial(clothing_part.heat_protection)
clothing_part.cold_protection = initial(clothing_part.cold_protection)
spaceproofed = list()
/obj/item/mod/module/armor_booster/elite
@@ -84,8 +80,8 @@
though with its' low amount of separate charges, the user remains mortal."
icon_state = "energy_shield"
complexity = 3
idle_power_cost = DEFAULT_CELL_DRAIN * 0.5
use_power_cost = DEFAULT_CELL_DRAIN * 2
idle_power_cost = DEFAULT_CHARGE_DRAIN * 0.5
use_power_cost = DEFAULT_CHARGE_DRAIN * 2
incompatible_modules = list(/obj/item/mod/module/energy_shield)
/// Max charges of the shield.
var/max_charges = 3
@@ -134,8 +130,8 @@
This shield can perfectly nullify attacks ranging from high-caliber rifles to magic missiles, \
though can also be drained by more mundane attacks. It will not protect the caster from social ridicule."
icon_state = "battlemage_shield"
idle_power_cost = DEFAULT_CELL_DRAIN * 0 //magic
use_power_cost = DEFAULT_CELL_DRAIN * 0 //magic too
idle_power_cost = DEFAULT_CHARGE_DRAIN * 0 //magic
use_power_cost = DEFAULT_CHARGE_DRAIN * 0 //magic too
max_charges = 15
recharge_start_delay = 0 SECONDS
charge_recovery = 8
@@ -226,7 +222,7 @@
in protest of these modules being legal."
icon_state = "noslip"
complexity = 1
idle_power_cost = DEFAULT_CELL_DRAIN * 0.1
idle_power_cost = DEFAULT_CHARGE_DRAIN * 0.1
incompatible_modules = list(/obj/item/mod/module/noslip)
/obj/item/mod/module/noslip/on_suit_activation()
@@ -26,7 +26,7 @@
icon_state = "tray"
module_type = MODULE_TOGGLE
complexity = 1
active_power_cost = DEFAULT_CELL_DRAIN * 0.2
active_power_cost = DEFAULT_CHARGE_DRAIN * 0.2
incompatible_modules = list(/obj/item/mod/module/t_ray)
cooldown_time = 0.5 SECONDS
/// T-ray scan range.
@@ -45,7 +45,7 @@
icon_state = "magnet"
module_type = MODULE_TOGGLE
complexity = 2
active_power_cost = DEFAULT_CELL_DRAIN * 0.5
active_power_cost = DEFAULT_CHARGE_DRAIN * 0.5
incompatible_modules = list(/obj/item/mod/module/magboot, /obj/item/mod/module/atrocinator)
cooldown_time = 0.5 SECONDS
/// Slowdown added onto the suit.
@@ -86,7 +86,7 @@
icon_state = "tether"
module_type = MODULE_ACTIVE
complexity = 3
use_power_cost = DEFAULT_CELL_DRAIN
use_power_cost = DEFAULT_CHARGE_DRAIN
incompatible_modules = list(/obj/item/mod/module/tether)
cooldown_time = 1.5 SECONDS
@@ -144,7 +144,7 @@
giving a voice to an otherwise silent killer."
icon_state = "radshield"
complexity = 2
idle_power_cost = DEFAULT_CELL_DRAIN * 0.3
idle_power_cost = DEFAULT_CHARGE_DRAIN * 0.3
incompatible_modules = list(/obj/item/mod/module/rad_protection)
tgui_id = "rad_counter"
/// Radiation threat level being perceived.
@@ -187,8 +187,8 @@
icon_state = "constructor"
module_type = MODULE_USABLE
complexity = 2
idle_power_cost = DEFAULT_CELL_DRAIN * 0.2
use_power_cost = DEFAULT_CELL_DRAIN * 2
idle_power_cost = DEFAULT_CHARGE_DRAIN * 0.2
use_power_cost = DEFAULT_CHARGE_DRAIN * 2
incompatible_modules = list(/obj/item/mod/module/constructor, /obj/item/mod/module/quick_carry)
cooldown_time = 11 SECONDS
@@ -218,8 +218,8 @@
module_type = MODULE_TOGGLE
// complexity = 3
complexity = 0
active_power_cost = DEFAULT_CELL_DRAIN*0.75
// use_power_cost = DEFAULT_CELL_DRAIN*3
active_power_cost = DEFAULT_CHARGE_DRAIN*0.75
// use_power_cost = DEFAULT_CHARGE_DRAIN*3
removable = FALSE
incompatible_modules = list(/obj/item/mod/module/kinesis)
cooldown_time = 0.5 SECONDS
+25 -18
View File
@@ -32,12 +32,20 @@
modstorage.max_combined_w_class = max_combined_w_class
modstorage.max_items = max_items
SEND_SIGNAL(src, COMSIG_TRY_STORAGE_SET_LOCKSTATE, FALSE)
RegisterSignal(mod.chestplate, COMSIG_ITEM_PRE_UNEQUIP, .proc/on_chestplate_unequip)
/obj/item/mod/module/storage/on_uninstall()
var/datum/component/storage/modstorage = mod.GetComponent(/datum/component/storage)
storage.slaves -= modstorage
qdel(modstorage)
SEND_SIGNAL(src, COMSIG_TRY_STORAGE_SET_LOCKSTATE, TRUE)
UnregisterSignal(mod.chestplate, COMSIG_ITEM_PRE_UNEQUIP)
/obj/item/mod/module/storage/proc/on_chestplate_unequip(obj/item/source, force, atom/newloc, no_move, invdrop, silent)
if(QDELETED(source) || newloc == mod.wearer || !mod.wearer.s_store)
return
to_chat(mod.wearer, span_notice("[src] tries to store [mod.wearer.s_store] inside itself."))
SEND_SIGNAL(src, COMSIG_TRY_STORAGE_INSERT, mod.wearer.s_store, mod.wearer, TRUE)
/obj/item/mod/module/storage/large_capacity
name = "MOD expanded storage module"
@@ -72,12 +80,12 @@
name = "MOD ion jetpack module"
desc = "A series of electric thrusters installed across the suit, this is a module highly anticipated by trainee Engineers. \
Rather than using gasses for combustion thrust, these jets are capable of accelerating ions using \
charge from the suit's cell. Some say this isn't Nakamura Engineering's first foray into jet-enabled suits."
charge from the suit's charge. Some say this isn't Nakamura Engineering's first foray into jet-enabled suits."
icon_state = "jetpack"
module_type = MODULE_TOGGLE
complexity = 3
active_power_cost = DEFAULT_CELL_DRAIN * 0.5
use_power_cost = DEFAULT_CELL_DRAIN
active_power_cost = DEFAULT_CHARGE_DRAIN * 0.5
use_power_cost = DEFAULT_CHARGE_DRAIN
incompatible_modules = list(/obj/item/mod/module/jetpack)
cooldown_time = 0.5 SECONDS
overlay_state_inactive = "module_jetpack"
@@ -200,7 +208,7 @@
However, it will take from the suit's power to do so. Luckily, your PDA already has one of these."
icon_state = "empshield"
complexity = 1
idle_power_cost = DEFAULT_CELL_DRAIN * 0.3
idle_power_cost = DEFAULT_CHARGE_DRAIN * 0.3
incompatible_modules = list(/obj/item/mod/module/emp_shield)
/obj/item/mod/module/emp_shield/on_install()
@@ -218,7 +226,7 @@
icon_state = "flashlight"
module_type = MODULE_TOGGLE
complexity = 1
active_power_cost = DEFAULT_CELL_DRAIN * 0.3
active_power_cost = DEFAULT_CHARGE_DRAIN * 0.3
incompatible_modules = list(/obj/item/mod/module/flashlight)
cooldown_time = 0.5 SECONDS
overlay_state_inactive = "module_light"
@@ -227,8 +235,8 @@
light_range = 3
light_power = 1
light_on = FALSE
/// Cell drain per range amount.
var/base_power = DEFAULT_CELL_DRAIN * 0.1
/// Charge drain per range amount.
var/base_power = DEFAULT_CHARGE_DRAIN * 0.1
/// Minimum range we can set.
var/min_range = 2
/// Maximum range we can set.
@@ -287,13 +295,13 @@
/obj/item/mod/module/dispenser
name = "MOD burger dispenser module"
desc = "A rare piece of technology reverse-engineered from a prototype found in a Donk Corporation vessel. \
This can draw incredible amounts of power from the suit's cell to create edible organic matter in the \
This can draw incredible amounts of power from the suit's charge to create edible organic matter in the \
palm of the wearer's glove; however, research seemed to have entirely stopped at burgers. \
Notably, all attempts to get it to dispense Earl Grey tea have failed."
icon_state = "dispenser"
module_type = MODULE_USABLE
complexity = 3
use_power_cost = DEFAULT_CELL_DRAIN * 2
use_power_cost = DEFAULT_CHARGE_DRAIN * 2
incompatible_modules = list(/obj/item/mod/module/dispenser)
cooldown_time = 5 SECONDS
/// Path we dispense.
@@ -323,7 +331,7 @@
Useful for mining, monorail tracks, or even skydiving!"
icon_state = "longfall"
complexity = 1
use_power_cost = DEFAULT_CELL_DRAIN * 5
use_power_cost = DEFAULT_CHARGE_DRAIN * 5
incompatible_modules = list(/obj/item/mod/module/longfall)
/obj/item/mod/module/longfall/on_suit_activation()
@@ -349,7 +357,7 @@
icon_state = "regulator"
module_type = MODULE_TOGGLE
complexity = 2
active_power_cost = DEFAULT_CELL_DRAIN * 0.3
active_power_cost = DEFAULT_CHARGE_DRAIN * 0.3
incompatible_modules = list(/obj/item/mod/module/thermal_regulator)
cooldown_time = 0.5 SECONDS
/// The temperature we are regulating to.
@@ -384,7 +392,7 @@
Nakamura Engineering swears up and down there's airbrakes."
icon_state = "pathfinder"
complexity = 2
use_power_cost = DEFAULT_CELL_DRAIN * 10
use_power_cost = DEFAULT_CHARGE_DRAIN * 10
incompatible_modules = list(/obj/item/mod/module/pathfinder)
/// The pathfinding implant.
var/obj/item/implant/mod/implant
@@ -425,12 +433,11 @@
if(!ishuman(user))
return
var/mob/living/carbon/human/human_user = user
if(human_user.back && !human_user.dropItemToGround(human_user.back))
if(human_user.get_item_by_slot(mod.slot_flags) && !human_user.dropItemToGround(human_user.get_item_by_slot(mod.slot_flags)))
return
if(!human_user.equip_to_slot_if_possible(mod, mod.slot_flags, qdel_on_fail = FALSE, disable_warning = TRUE))
return
for(var/obj/item/part as anything in mod.mod_parts)
mod.deploy(null, part)
mod.quick_deploy(user)
human_user.update_action_buttons(TRUE)
balloon_alert(human_user, "[mod] attached")
playsound(mod, 'sound/machines/ping.ogg', 50, TRUE)
@@ -531,7 +538,7 @@
..()
implant = Target
/datum/action/item_action/mod_recall/Trigger()
/datum/action/item_action/mod_recall/Trigger(trigger_flags)
. = ..()
if(!.)
return
@@ -550,7 +557,7 @@
icon_state = "dnalock"
module_type = MODULE_USABLE
complexity = 2
use_power_cost = DEFAULT_CELL_DRAIN * 3
use_power_cost = DEFAULT_CHARGE_DRAIN * 3
incompatible_modules = list(/obj/item/mod/module/dna_lock, /obj/item/mod/module/eradication_lock)
cooldown_time = 0.5 SECONDS
/// The DNA we lock with.
@@ -627,7 +634,7 @@
The purple glass of the visor seems to be constructed for nostalgic purposes."
icon_state = "plasma_stabilizer"
complexity = 1
idle_power_cost = DEFAULT_CELL_DRAIN * 0.3
idle_power_cost = DEFAULT_CHARGE_DRAIN * 0.3
incompatible_modules = list(/obj/item/mod/module/plasma_stabilizer)
overlay_state_inactive = "module_plasma"
+26 -18
View File
@@ -12,10 +12,10 @@
incompatible_modules = list(/obj/item/mod/module/springlock)
/obj/item/mod/module/springlock/on_install()
mod.activation_step_time *= 0.75
mod.activation_step_time *= 0.5
/obj/item/mod/module/springlock/on_uninstall()
mod.activation_step_time /= 0.75
mod.activation_step_time *= 2
/obj/item/mod/module/springlock/on_suit_activation()
RegisterSignal(mod.wearer, COMSIG_ATOM_EXPOSE_REAGENTS, .proc/on_wearer_exposed)
@@ -26,6 +26,7 @@
///Signal fired when wearer is exposed to reagents
/obj/item/mod/module/springlock/proc/on_wearer_exposed(atom/source, list/reagents, datum/reagents/source_reagents, methods, volume_modifier, show_message)
SIGNAL_HANDLER
if(!(methods & (VAPOR|PATCH|TOUCH)))
return //remove non-touch reagent exposure
to_chat(mod.wearer, span_danger("[src] makes an ominous click sound..."))
@@ -36,6 +37,7 @@
///Signal fired when wearer attempts to activate/deactivate suits
/obj/item/mod/module/springlock/proc/on_activate_spring_block(datum/source, user)
SIGNAL_HANDLER
balloon_alert(user, "springlocks aren't responding...?")
return MOD_CANCEL_ACTIVATE
@@ -49,7 +51,7 @@
playsound(mod.wearer, 'sound/effects/snap.ogg', 75, TRUE, frequency = 0.5)
playsound(mod.wearer, 'sound/effects/splat.ogg', 50, TRUE, frequency = 0.5)
mod.wearer.client?.give_award(/datum/award/achievement/misc/springlock, mod.wearer)
mod.wearer.apply_damage(500, BRUTE, forced = TRUE, sharpness = SHARP_POINTY, def_zone = BODY_ZONE_CHEST) //boggers, bogchamp, etc
mod.wearer.apply_damage(500, BRUTE, forced = TRUE, spread_damage = TRUE, sharpness = SHARP_POINTY) //boggers, bogchamp, etc
mod.wearer.death() //just in case, for some reason, they're still alive
flash_color(mod.wearer, flash_color = "#FF0000", flash_time = 10 SECONDS)
@@ -70,13 +72,13 @@
var/list/songs = list()
/// A list of the colors the module can take.
var/static/list/rainbow_order = list(
"#FF6666",
"#FFAA66",
"#FFFF66",
"#66FF66",
"#66AAFF",
"#AA66FF",
)
list(1,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,1, 0,0,0,0),
list(1,0,0,0, 0,0.5,0,0, 0,0,0,0, 0,0,0,1, 0,0,0,0),
list(1,0,0,0, 0,1,0,0, 0,0,0,0, 0,0,0,1, 0,0,0,0),
list(0,0,0,0, 0,1,0,0, 0,0,0,0, 0,0,0,1, 0,0,0,0),
list(0,0,0,0, 0,0.5,0,0, 0,0,1,0, 0,0,0,1, 0,0,0,0),
list(1,0,0,0, 0,0,0,0, 0,0,1,0, 0,0,0,1, 0,0,0,0),
)
/obj/item/mod/module/visor/rave/Initialize(mapload)
. = ..()
@@ -102,7 +104,7 @@
rave_screen = mod.wearer.add_client_colour(/datum/client_colour/rave)
rave_screen.update_colour(rainbow_order[rave_number])
if(selection)
mod.wearer.playsound_local(get_turf(src), null, 50, channel = CHANNEL_JUKEBOX, S = sound(selection.song_path), use_reverb = FALSE)
SEND_SOUND(mod.wearer, sound(selection.song_path, volume = 50, channel = CHANNEL_JUKEBOX))
/obj/item/mod/module/visor/rave/on_deactivation()
. = ..()
@@ -111,6 +113,7 @@
QDEL_NULL(rave_screen)
if(selection)
mod.wearer.stop_sound_channel(CHANNEL_JUKEBOX)
SEND_SOUND(mod.wearer, sound('sound/machines/terminal_off.ogg', volume = 50, channel = CHANNEL_JUKEBOX))
/obj/item/mod/module/visor/rave/generate_worn_overlay(mutable_appearance/standing)
. = ..()
@@ -127,7 +130,7 @@
/obj/item/mod/module/visor/rave/get_configuration()
. = ..()
if(length(songs))
.["selection"] = add_ui_configuration("Song", "list", selection.song_name, songs)
.["selection"] = add_ui_configuration("Song", "list", selection.song_name, clean_songs())
/obj/item/mod/module/visor/rave/configure_edit(key, value)
switch(key)
@@ -136,6 +139,11 @@
return
selection = songs[value]
/obj/item/mod/module/visor/rave/proc/clean_songs()
. = list()
for(var/track in songs)
. += track
///Tanner - Tans you with spraytan.
/obj/item/mod/module/tanner
name = "MOD tanning module"
@@ -144,7 +152,7 @@
icon_state = "tanning"
module_type = MODULE_USABLE
complexity = 1
use_power_cost = DEFAULT_CELL_DRAIN * 5
use_power_cost = DEFAULT_CHARGE_DRAIN * 5
incompatible_modules = list(/obj/item/mod/module/tanner)
cooldown_time = 30 SECONDS
@@ -167,7 +175,7 @@
icon_state = "bloon"
module_type = MODULE_USABLE
complexity = 1
use_power_cost = DEFAULT_CELL_DRAIN*0.5
use_power_cost = DEFAULT_CHARGE_DRAIN*0.5
incompatible_modules = list(/obj/item/mod/module/balloon)
cooldown_time = 15 SECONDS
@@ -183,7 +191,7 @@
mod.wearer.put_in_hands(balloon)
drain_power(use_power_cost)
/// Paper Dispenser - Dispenses (sometimes burning) paper sheets.
///Paper Dispenser - Dispenses (sometimes burning) paper sheets.
/obj/item/mod/module/paper_dispenser
name = "MOD paper dispenser module"
desc = "A simple module designed by the bureaucrats of Torch Bay. \
@@ -191,7 +199,7 @@
icon_state = "paper_maker"
module_type = MODULE_USABLE
complexity = 1
use_power_cost = DEFAULT_CELL_DRAIN * 0.5
use_power_cost = DEFAULT_CHARGE_DRAIN * 0.5
incompatible_modules = list(/obj/item/mod/module/paper_dispenser)
cooldown_time = 5 SECONDS
/// The total number of sheets created by this MOD. The more sheets, them more likely they set on fire.
@@ -233,8 +241,8 @@
icon_state = "atrocinator"
module_type = MODULE_TOGGLE
complexity = 2
active_power_cost = DEFAULT_CELL_DRAIN
incompatible_modules = list(/obj/item/mod/module/atrocinator, /obj/item/mod/module/magboot)
active_power_cost = DEFAULT_CHARGE_DRAIN
incompatible_modules = list(/obj/item/mod/module/atrocinator, /obj/item/mod/module/magboot, /obj/item/mod/module/anomaly_locked/antigrav)
cooldown_time = 0.5 SECONDS
overlay_state_inactive = "module_atrocinator"
/// How many steps the user has taken since turning the suit on, used for footsteps.
+4 -4
View File
@@ -14,7 +14,7 @@
icon_state = "health"
module_type = MODULE_ACTIVE
complexity = 2
use_power_cost = DEFAULT_CELL_DRAIN
use_power_cost = DEFAULT_CHARGE_DRAIN
incompatible_modules = list(/obj/item/mod/module/health_analyzer)
cooldown_time = 0.5 SECONDS
tgui_id = "health_analyzer"
@@ -67,7 +67,7 @@
or simply for fun. However, Nanotrasen has locked the module's ability to assist in hand-to-hand combat."
icon_state = "carry"
complexity = 1
idle_power_cost = DEFAULT_CELL_DRAIN * 0.3
idle_power_cost = DEFAULT_CHARGE_DRAIN * 0.3
incompatible_modules = list(/obj/item/mod/module/quick_carry, /obj/item/mod/module/constructor)
/obj/item/mod/module/quick_carry/on_suit_activation()
@@ -98,7 +98,7 @@
icon_state = "injector"
module_type = MODULE_ACTIVE
complexity = 1
active_power_cost = DEFAULT_CELL_DRAIN * 0.3
active_power_cost = DEFAULT_CHARGE_DRAIN * 0.3
device = /obj/item/reagent_containers/syringe/mod
incompatible_modules = list(/obj/item/mod/module/injector)
cooldown_time = 0.5 SECONDS
@@ -125,7 +125,7 @@
icon_state = "organ_thrower"
module_type = MODULE_ACTIVE
complexity = 2
use_power_cost = DEFAULT_CELL_DRAIN
use_power_cost = DEFAULT_CHARGE_DRAIN
incompatible_modules = list(/obj/item/mod/module/organ_thrower, /obj/item/mod/module/microwave_beam)
cooldown_time = 0.5 SECONDS
var/max_organs = 5
+11 -8
View File
@@ -9,7 +9,7 @@
icon_state = "scanner"
module_type = MODULE_TOGGLE
complexity = 1
active_power_cost = DEFAULT_CELL_DRAIN * 0.2
active_power_cost = DEFAULT_CHARGE_DRAIN * 0.2
incompatible_modules = list(/obj/item/mod/module/reagent_scanner)
cooldown_time = 0.5 SECONDS
@@ -64,7 +64,7 @@
to the HUD. Useful for universal translation, or perhaps as a calculator."
module_type = MODULE_USABLE
complexity = 3
idle_power_cost = DEFAULT_CELL_DRAIN * 0.5
idle_power_cost = DEFAULT_CHARGE_DRAIN * 0.5
incompatible_modules = list(/obj/item/mod/module/circuit)
cooldown_time = 0.5 SECONDS
var/obj/item/integrated_circuit/circuit
@@ -79,11 +79,11 @@
starting_circuit = circuit, \
)
/obj/item/mod/module/circuit/on_install()
/*/obj/item/mod/module/circuit/on_install()
circuit.set_cell(mod.cell)
/obj/item/mod/module/circuit/on_uninstall()
circuit.set_cell(mod.cell)
circuit.set_cell(mod.cell)*/
/obj/item/mod/module/circuit/on_suit_activation()
circuit.set_on(TRUE)
@@ -254,7 +254,8 @@
icon_state = "antigrav"
module_type = MODULE_TOGGLE
complexity = 3
active_power_cost = DEFAULT_CELL_DRAIN * 0.7
active_power_cost = DEFAULT_CHARGE_DRAIN * 0.7
incompatible_modules = list(/obj/item/mod/module/anomaly_locked, /obj/item/mod/module/atrocinator)
cooldown_time = 0.5 SECONDS
accepted_anomalies = list(/obj/item/assembly/signaler/anomaly/grav)
@@ -288,7 +289,7 @@
icon_state = "teleporter"
module_type = MODULE_ACTIVE
complexity = 3
use_power_cost = DEFAULT_CELL_DRAIN * 5
use_power_cost = DEFAULT_CHARGE_DRAIN * 5
cooldown_time = 5 SECONDS
accepted_anomalies = list(/obj/item/assembly/signaler/anomaly/bluespace)
/// Time it takes to teleport
@@ -307,9 +308,11 @@
animate(mod.wearer, teleport_time, color = COLOR_CYAN, transform = user_matrix.Scale(4, 0.25), easing = EASE_OUT)
if(!do_after(mod.wearer, teleport_time, target = mod))
balloon_alert(mod.wearer, "interrupted!")
animate(mod.wearer, teleport_time, color = null, transform = user_matrix.Scale(0.25, 4), easing = EASE_IN)
var/matrix/post_matrix = matrix(mod.wearer.transform)
animate(mod.wearer, teleport_time, color = null, transform = post_matrix.Scale(0.25, 4), easing = EASE_IN)
return
animate(mod.wearer, teleport_time*0.1, color = null, transform = user_matrix.Scale(0.25, 4), easing = EASE_IN)
var/matrix/post_matrix = matrix(mod.wearer.transform)
animate(mod.wearer, teleport_time*0.1, color = null, transform = post_matrix.Scale(0.25, 4), easing = EASE_IN)
if(!do_teleport(mod.wearer, target_turf, asoundin = 'sound/effects/phasein.ogg'))
return
drain_power(use_power_cost)
+8 -8
View File
@@ -9,8 +9,8 @@
icon_state = "cloak"
module_type = MODULE_TOGGLE
complexity = 4
active_power_cost = DEFAULT_CELL_DRAIN * 2
use_power_cost = DEFAULT_CELL_DRAIN * 10
active_power_cost = DEFAULT_CHARGE_DRAIN * 2
use_power_cost = DEFAULT_CHARGE_DRAIN * 10
incompatible_modules = list(/obj/item/mod/module/stealth)
cooldown_time = 5 SECONDS
/// Whether or not the cloak turns off on bumping.
@@ -26,7 +26,7 @@
RegisterSignal(mod.wearer, COMSIG_LIVING_MOB_BUMP, .proc/unstealth)
RegisterSignal(mod.wearer, COMSIG_HUMAN_MELEE_UNARMED_ATTACK, .proc/on_unarmed_attack)
RegisterSignal(mod.wearer, COMSIG_ATOM_BULLET_ACT, .proc/on_bullet_act)
RegisterSignal(mod.wearer, list(COMSIG_ITEM_ATTACK, COMSIG_PARENT_ATTACKBY, COMSIG_ATOM_ATTACK_HAND, COMSIG_ATOM_ATTACK_PAW, COMSIG_ATOM_HITBY, COMSIG_ATOM_HULK_ATTACK, COMSIG_ATOM_ATTACK_PAW, COMSIG_CARBON_CUFF_ATTEMPTED), .proc/unstealth)
RegisterSignal(mod.wearer, list(COMSIG_ITEM_ATTACK, COMSIG_PARENT_ATTACKBY, COMSIG_ATOM_ATTACK_HAND, COMSIG_ATOM_HITBY, COMSIG_ATOM_HULK_ATTACK, COMSIG_ATOM_ATTACK_PAW, COMSIG_CARBON_CUFF_ATTEMPTED), .proc/unstealth)
animate(mod.wearer, alpha = stealth_alpha, time = 1.5 SECONDS)
drain_power(use_power_cost)
@@ -66,13 +66,13 @@
desc = "The latest in stealth technology, this module is a definite upgrade over previous versions. \
The field has been tuned to be even more responsive and fast-acting, with enough stability to \
continue operation of the field even if the user bumps into others. \
The draw on the power cell has been reduced drastically, \
making this perfect for activities like standing near sentry turrets for extended periods of time."
The power draw has been reduced drastically, making this perfect for activities like \
standing near sentry turrets for extended periods of time."
icon_state = "cloak_ninja"
bumpoff = FALSE
stealth_alpha = 20
active_power_cost = DEFAULT_CELL_DRAIN
use_power_cost = DEFAULT_CELL_DRAIN * 5
active_power_cost = DEFAULT_CHARGE_DRAIN
use_power_cost = DEFAULT_CHARGE_DRAIN * 5
cooldown_time = 3 SECONDS
///Holster - Instantly holsters any not huge gun.
@@ -85,7 +85,7 @@
icon_state = "holster"
module_type = MODULE_USABLE
complexity = 2
use_power_cost = DEFAULT_CELL_DRAIN * 0.5
use_power_cost = DEFAULT_CHARGE_DRAIN * 0.5
incompatible_modules = list(/obj/item/mod/module/holster)
cooldown_time = 0.5 SECONDS
/// Gun we have holstered.
+4 -4
View File
@@ -8,7 +8,7 @@
icon_state = "bikehorn"
module_type = MODULE_USABLE
complexity = 1
use_power_cost = DEFAULT_CELL_DRAIN
use_power_cost = DEFAULT_CHARGE_DRAIN
incompatible_modules = list(/obj/item/mod/module/bikehorn)
cooldown_time = 1 SECONDS
@@ -28,7 +28,7 @@
icon_state = "microwave_beam"
module_type = MODULE_ACTIVE
complexity = 2
use_power_cost = DEFAULT_CELL_DRAIN * 5
use_power_cost = DEFAULT_CHARGE_DRAIN * 5
incompatible_modules = list(/obj/item/mod/module/microwave_beam, /obj/item/mod/module/organ_thrower)
cooldown_time = 10 SECONDS
@@ -64,8 +64,8 @@
miniaturized etheric blasts of space-time beneath the user's feet, this enables them to... \
to waddle around, bouncing to and fro with a pep in their step."
icon_state = "waddle"
idle_power_cost = DEFAULT_CELL_DRAIN * 0.2
removable = FALSE
complexity = 1
idle_power_cost = DEFAULT_CHARGE_DRAIN * 0.2
incompatible_modules = list(/obj/item/mod/module/waddle)
/obj/item/mod/module/waddle/on_suit_activation()
+5 -5
View File
@@ -9,7 +9,7 @@
icon_state = "gps"
module_type = MODULE_ACTIVE
complexity = 1
active_power_cost = DEFAULT_CELL_DRAIN * 0.3
active_power_cost = DEFAULT_CHARGE_DRAIN * 0.3
device = /obj/item/gps/mod
incompatible_modules = list(/obj/item/mod/module/gps)
cooldown_time = 0.5 SECONDS
@@ -29,7 +29,7 @@
icon_state = "clamp"
module_type = MODULE_ACTIVE
complexity = 3
use_power_cost = DEFAULT_CELL_DRAIN
use_power_cost = DEFAULT_CHARGE_DRAIN
incompatible_modules = list(/obj/item/mod/module/clamp)
cooldown_time = 0.5 SECONDS
overlay_state_inactive = "module_clamp"
@@ -73,7 +73,7 @@
playsound(src, 'sound/mecha/hydraulic.ogg', 25, TRUE)
drain_power(use_power_cost)
/obj/item/mod/module/clamp/on_uninstall()
/obj/item/mod/module/clamp/on_suit_deactivation()
for(var/atom/movable/crate as anything in stored_crates)
crate.forceMove(drop_location())
stored_crates -= crate
@@ -86,7 +86,7 @@
icon_state = "drill"
module_type = MODULE_ACTIVE
complexity = 2
use_power_cost = DEFAULT_CELL_DRAIN
use_power_cost = DEFAULT_CHARGE_DRAIN
incompatible_modules = list(/obj/item/mod/module/drill)
cooldown_time = 0.5 SECONDS
@@ -136,7 +136,7 @@
icon_state = "ore"
module_type = MODULE_USABLE
complexity = 2
use_power_cost = DEFAULT_CELL_DRAIN * 0.2
use_power_cost = DEFAULT_CHARGE_DRAIN * 0.2
incompatible_modules = list(/obj/item/mod/module/orebag)
cooldown_time = 0.5 SECONDS
/// The ores stored in the bag.
+18 -23
View File
@@ -12,11 +12,10 @@
out to be a good deterrent."
icon_state = "eradicationlock"
module_type = MODULE_USABLE
complexity = 2
use_power_cost = DEFAULT_CELL_DRAIN * 3
removable = FALSE
use_power_cost = DEFAULT_CHARGE_DRAIN * 3
incompatible_modules = list(/obj/item/mod/module/eradication_lock, /obj/item/mod/module/dna_lock)
cooldown_time = 0.5 SECONDS
removable = FALSE //copy paste this comment - no timeline modules should be removable
/// The ckey we lock with, to allow all alternate versions of the user, huhehuehe
var/true_owner_ckey
@@ -62,11 +61,10 @@
safety reasons while preparing a rewind."
icon_state = "rewinder"
module_type = MODULE_USABLE
complexity = 1
use_power_cost = DEFAULT_CELL_DRAIN * 5
removable = FALSE
use_power_cost = DEFAULT_CHARGE_DRAIN * 5
incompatible_modules = list(/obj/item/mod/module/rewinder)
cooldown_time = 20 SECONDS
removable = FALSE //copy paste this comment - no timeline modules should be removable
/obj/item/mod/module/rewinder/on_use()
. = ..()
@@ -76,15 +74,15 @@
playsound(src, 'sound/items/modsuit/time_anchor_set.ogg', 50, TRUE)
//stops all mods from triggering during rewinding
for(var/obj/item/mod/module/module as anything in mod.modules)
RegisterSignal(module, COMSIG_MOD_MODULE_TRIGGERED, .proc/on_module_triggered)
RegisterSignal(module, COMSIG_MODULE_TRIGGERED, .proc/on_module_triggered)
mod.wearer.AddComponent(/datum/component/dejavu/timeline, 1, 10 SECONDS)
RegisterSignal(mod, COMSIG_MOD_ACTIVATE, .proc/on_activate_block)
addtimer(CALLBACK(src, .proc/unblock_suit_activation), 10 SECONDS)
///unregisters the modsuit deactivation blocking signal, after dejavu functionality finishes.
///Unregisters the modsuit deactivation blocking signal, after dejavu functionality finishes.
/obj/item/mod/module/rewinder/proc/unblock_suit_activation()
for(var/obj/item/mod/module/module as anything in mod.modules)
UnregisterSignal(module, COMSIG_MOD_MODULE_TRIGGERED)
UnregisterSignal(module, COMSIG_MODULE_TRIGGERED)
UnregisterSignal(mod, COMSIG_MOD_ACTIVATE)
///Signal fired when wearer attempts to activate/deactivate suits
@@ -99,7 +97,7 @@
balloon_alert(mod.wearer, "not while rewinding!")
return MOD_ABORT_USE
///timestopper - Need I really explain? It's the wizard's time stop, but the user channels it by not moving instead of a duration.
///Timestopper - Need I really explain? It's the wizard's time stop, but the user channels it by not moving instead of a duration.
/obj/item/mod/module/timestopper
name = "MOD timestopper module"
desc = "A module that can halt time in a small radius around the user... for as long as they \
@@ -107,11 +105,10 @@
module has a hefty cooldown period to avoid reality errors."
icon_state = "timestop"
module_type = MODULE_USABLE
complexity = 3
use_power_cost = DEFAULT_CELL_DRAIN * 5
removable = FALSE
use_power_cost = DEFAULT_CHARGE_DRAIN * 5
incompatible_modules = list(/obj/item/mod/module/timestopper)
cooldown_time = 60 SECONDS
removable = FALSE //copy paste this comment - no timeline modules should be removable
///the current timestop in progress
var/obj/effect/timestop/channelled/timestop
@@ -124,15 +121,15 @@
return
//stops all mods from triggering during timestop- including timestop itself
for(var/obj/item/mod/module/module as anything in mod.modules)
RegisterSignal(module, COMSIG_MOD_MODULE_TRIGGERED, .proc/on_module_triggered)
RegisterSignal(module, COMSIG_MODULE_TRIGGERED, .proc/on_module_triggered)
timestop = new /obj/effect/timestop/channelled(get_turf(mod.wearer), 2, INFINITY, list(mod.wearer))
RegisterSignal(timestop, COMSIG_PARENT_QDELETING, .proc/unblock_suit_activation)
///unregisters the modsuit deactivation blocking signal, after timestop functionality finishes.
///Unregisters the modsuit deactivation blocking signal, after timestop functionality finishes.
/obj/item/mod/module/timestopper/proc/unblock_suit_activation(datum/source)
SIGNAL_HANDLER
for(var/obj/item/mod/module/module as anything in mod.modules)
UnregisterSignal(module, COMSIG_MOD_MODULE_TRIGGERED)
UnregisterSignal(module, COMSIG_MODULE_TRIGGERED)
UnregisterSignal(source, COMSIG_PARENT_QDELETING)
UnregisterSignal(mod, COMSIG_MOD_ACTIVATE)
timestop = null
@@ -149,18 +146,17 @@
balloon_alert(user, "not while channelling timestop!")
return MOD_CANCEL_ACTIVATE
///timeline jumper - Infinite phasing. needs some special effects
///Timeline Jumper - Infinite phasing. needs some special effects
/obj/item/mod/module/timeline_jumper
name = "MOD timeline jumper module"
desc = "A module used to traverse timelines, phasing the user in and out of the stream of events."
icon_state = "timeline_jumper"
module_type = MODULE_USABLE
complexity = 2
use_power_cost = DEFAULT_CELL_DRAIN * 5
removable = FALSE
use_power_cost = DEFAULT_CHARGE_DRAIN * 5
incompatible_modules = list(/obj/item/mod/module/timeline_jumper)
cooldown_time = 5 SECONDS
allowed_in_phaseout = TRUE
removable = FALSE //copy paste this comment - no timeline modules should be removable
///the dummy for phasing from this module, the wearer is phased out while this exists.
var/obj/effect/dummy/phased_mob/chrono/phased_mob
@@ -210,11 +206,10 @@
timestream. They never are, they never were, they never will be."
icon_state = "chronogun"
module_type = MODULE_ACTIVE
complexity = 3
use_power_cost = DEFAULT_CELL_DRAIN * 5
removable = FALSE
use_power_cost = DEFAULT_CHARGE_DRAIN * 5
incompatible_modules = list(/obj/item/mod/module/tem)
cooldown_time = 0.5 SECONDS
removable = FALSE //copy paste this comment - no timeline modules should be removable
///reference to the chrono field being controlled by this module
var/obj/structure/chrono_field/field = null
///where the chronofield maker was when the field went up
+1 -1
View File
@@ -6,7 +6,7 @@
desc = "A heads-up display installed into the visor of the suit. They say these also let you see behind you."
module_type = MODULE_TOGGLE
complexity = 2
active_power_cost = DEFAULT_CELL_DRAIN * 0.3
active_power_cost = DEFAULT_CHARGE_DRAIN * 0.3
incompatible_modules = list(/obj/item/mod/module/visor)
cooldown_time = 0.5 SECONDS
/// The HUD type given by the visor.