Engineering/Miner Cyborg NV Meson Upgrade (#20115)

* laws, module, etc

* cmag functionality

* playsound whoopies

* judges my flavortext creative skills

* stun time

* should revert all of this stuff

* night vision

* upgrade and module service

* design and techweb

* I HATE WEBEDITS
This commit is contained in:
Rune Knight
2023-09-09 15:02:29 -07:00
committed by GitHub
parent 368e063aaf
commit dd8a51ff55
8 changed files with 73 additions and 17 deletions

View File

@@ -9,7 +9,7 @@
/// Module is compatible with Engineering Cyborg models
#define BORG_MODULE_ENGINEERING (1<<4)
/// Module is compatible with Service Cyborg model
#define BORG_MODEL_SERVICE (1<<5)
#define BORG_MODULE_SERVICE (1<<5)
/// Module is compatible with Ripley Exosuit models
#define EXOSUIT_MODULE_RIPLEY (1<<0)

View File

@@ -18,9 +18,10 @@
#define INVISIBILITY_ABSTRACT 101 //only used for abstract objects (e.g. spacevine_controller), things that are not really there.
#define BORGMESON (1<<0)
#define BORGTHERM (1<<1)
#define BORGXRAY (1<<2)
#define BORGMATERIAL (1<<3)
#define BORGMESON_NIGHTVISION (1<<1)
#define BORGTHERM (1<<2)
#define BORGXRAY (1<<3)
#define BORGMATERIAL (1<<4)
//for clothing visor toggles, these determine which vars to toggle
#define VISOR_FLASHPROTECT (1<<0)

View File

@@ -230,7 +230,7 @@
sub_category += "Medical"
if(module_types & BORG_MODULE_ENGINEERING)
sub_category += "Engineering"
if(module_types & BORG_MODEL_SERVICE)
if(module_types & BORG_MODULE_SERVICE)
sub_category += "Service"
else
sub_category += "All Cyborgs"

View File

@@ -4,7 +4,6 @@
/obj/item/borg
icon = 'icons/mob/robot_items.dmi'
/obj/item/borg/stun
name = "electrically-charged arm"
icon_state = "elecarm"
@@ -700,7 +699,6 @@
/obj/item/borg/sight
var/sight_mode = null
/obj/item/borg/sight/xray
name = "\proper X-ray vision"
icon = 'icons/obj/decals.dmi'
@@ -717,12 +715,17 @@
sight_mode = BORGTHERM
icon_state = "thermal"
/obj/item/borg/sight/meson
name = "\proper meson vision"
sight_mode = BORGMESON
icon_state = "meson"
/obj/item/borg/sight/meson/nightvision
name = "\proper night vision meson vision"
icon = 'icons/obj/clothing/glasses.dmi'
icon_state = "nvgmeson"
sight_mode = BORGMESON_NIGHTVISION
/obj/item/borg/sight/material
name = "\proper material vision"
sight_mode = BORGMATERIAL
@@ -732,7 +735,6 @@
name = "hud"
var/obj/item/clothing/glasses/hud/hud = null
/obj/item/borg/sight/hud/med
name = "medical hud"
icon_state = "healthhud"
@@ -741,7 +743,6 @@
. = ..()
hud = new /obj/item/clothing/glasses/hud/health(src)
/obj/item/borg/sight/hud/sec
name = "security hud"
icon_state = "securityhud"

View File

@@ -675,7 +675,7 @@
icon_state = "cyborg_upgrade3"
require_module = TRUE
module_types = list(/obj/item/robot_module/service)
module_flags = BORG_MODEL_SERVICE
module_flags = BORG_MODULE_SERVICE
/obj/item/borg/upgrade/condiment_synthesizer/action(mob/living/silicon/robot/R, user = usr)
. = ..()
@@ -1376,13 +1376,52 @@
for(var/obj/item/storage/bag/gem/cyborg/satchel in R.module.modules)
R.module.remove_module(satchel, TRUE)
/obj/item/borg/upgrade/nv_mesons
name = "cyborg night vision mesons"
desc = "An upgrade for cyborgs that replaces their normal meson goggles, if they have them, with a night vision variant."
icon_state = "cyborg_upgrade5"
require_module = TRUE
module_types = list(/obj/item/robot_module/engineering, /obj/item/robot_module/miner)
/// Replaces the cyborg's meson goggles with night vision meson goggles.
/obj/item/borg/upgrade/nv_mesons/action(mob/living/silicon/robot/R, user = usr)
. = ..()
if(!.)
return FALSE
for(var/obj/item/borg/sight/meson/meson in R.module.modules)
R.module.remove_module(meson, TRUE)
var/obj/item/borg/sight/meson/nightvision/nvgmeson = locate() in R.module.modules
if(nvgmeson)
to_chat(user, span_warning("This cyborg is already equipped with night vision mesons."))
return FALSE
nvgmeson = new(R.module)
R.module.basic_modules += nvgmeson
R.module.add_module(nvgmeson, FALSE, TRUE)
/obj/item/borg/upgrade/nv_mesons/deactivate(mob/living/silicon/robot/R, user = usr)
. = ..()
if(!.)
return FALSE
for(var/obj/item/borg/sight/meson/nightvision/nvgmeson in R.module.modules)
R.module.remove_module(nvgmeson, TRUE)
var/obj/item/borg/sight/meson/meson = locate() in R.module.modules
if(!meson)
meson = new(R.module)
R.module.basic_modules += meson
R.module.add_module(meson, FALSE, TRUE)
/obj/item/borg/upgrade/service_cookbook
name = "service cyborg cookbook"
desc = "An upgrade to the service cyborg which lets them create more food."
icon_state = "cyborg_upgrade3"
require_module = TRUE
module_types = list(/obj/item/robot_module/service)
module_flags = BORG_MODEL_SERVICE
module_flags = BORG_MODULE_SERVICE
/obj/item/borg/upgrade/service_cookbook/action(mob/living/silicon/robot/R, user = usr)
. = ..()

View File

@@ -1061,13 +1061,18 @@
if(sight_mode & BORGMESON)
sight |= SEE_TURFS
lighting_alpha = LIGHTING_PLANE_ALPHA_INVISIBLE
see_in_dark = 1
lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE
see_in_dark = 2
if(sight_mode & BORGMESON_NIGHTVISION)
sight |= SEE_TURFS
lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE
see_in_dark = 8
if(sight_mode & BORGMATERIAL)
sight |= SEE_OBJS
lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE
see_in_dark = 1
see_in_dark = 2
if(sight_mode & BORGXRAY)
sight |= (SEE_TURFS|SEE_MOBS|SEE_OBJS)

View File

@@ -1038,6 +1038,16 @@
construction_time = 4 SECONDS
category = list("Cyborg Upgrade Modules")
/datum/design/borg_upgrade_nv_mesons
name = "Cyborg Upgrade (Night Vision Mesons)"
id = "borg_upgrade_nv_mesons"
build_type = MECHFAB
build_path = /obj/item/borg/upgrade/nv_mesons
/// Exact cost of NV Mesons for humans.
materials = list(/datum/material/iron = 600, /datum/material/glass = 600, /datum/material/plasma = 350, /datum/material/uranium = 1000, /datum/material/plastic = 150)
construction_time = 4 SECONDS
category = list("Cyborg Upgrade Modules")
/datum/design/borg_upgrade_service_cookbook
name = "Cyborg Upgrade (Cookbook)"
id = "borg_upgrade_service_cookbook"

View File

@@ -463,7 +463,7 @@
display_name = "Night Vision Technology"
description = "Allows seeing in the dark without actual light!"
prereq_ids = list("integrated_HUDs", "adv_engi", "emp_adv")
design_ids = list("health_hud_night", "security_hud_night", "diagnostic_hud_night", "night_visision_goggles", "nvgmesons", "nightscigoggles")
design_ids = list("health_hud_night", "security_hud_night", "diagnostic_hud_night", "night_visision_goggles", "nvgmesons", "nightscigoggles", "borg_upgrade_nv_mesons")
research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 5000)
////////////////////////Medical////////////////////////