Better borg modules (#17507)

* Combines all the engineering borg tools into one multitool

Sprites from /tg/
Combines:
Wirecutters, Crowbar, Welder, Wrench, Crowbar, Screwdriver

* this is a WAY better way to do it

* a

* dont worry about overlays anymore

* Better grippers and better lists

In which I go insane having to continually patch exploit after exploit in gripper code, resulting in it looking like a mad man's scribbles.

* No deleting shoes when putting them on someone

* empty pocket is now empty

* RENAMING stuff instead of copypaste

* MORE borg stuff

* more bugproofing

* Admin proc

* this

* this

* Framework for TGUI

* Update robot_simple_items.dm

* Fix

* Framework v2

* Update ModifyRobotMultiBelt.tsx

* goooo

* Update modify_robot.dm

* modify

* sub category

* .

* string to define

* some globs

* more

* .

* .

* .

* add sanely

* push that real quick

* .

* sanity

* .

* .

* .

* .

* .

* .

* .

* Cut

* .

* gives to those that need

* push

* clean up

* auto fix

* .

* .

* .

* getmodule

* Update robot_simple_items.dm

* .

* untyped

* Update stack.dm

* .

* .

* .

* .

* -

* .

* Update _map_selection.dm

* Update _map_selection.dm

---------

Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
Cameron Lennox
2025-06-19 18:56:26 -04:00
committed by GitHub
co-authored by Kashargul
parent ff07e2aa4f
commit 3b4bcef49b
62 changed files with 1772 additions and 1082 deletions
+14 -14
View File
@@ -8,7 +8,7 @@
// Now that I've scared away half the people looking at this file, here's the relevant info:
// Banning areas: Go to global_lists_vr, jump to the BUILDABLE_AREA_TYPES and read the comments left there.
// Banning areas: Go to global_lists_vr, jump to the GLOB.BUILDABLE_AREA_TYPES and read the comments left there.
@@ -339,11 +339,11 @@
if(A.outdoors)
return AREA_SPACE
for (var/type in BUILDABLE_AREA_TYPES)
for (var/type in GLOB.BUILDABLE_AREA_TYPES)
if ( istype(A,type) )
return AREA_SPACE
for (var/type in SPECIALS)
for (var/type in GLOB.SPECIALS)
if ( istype(A,type) )
return AREA_SPECIAL
return AREA_STATION
@@ -471,7 +471,7 @@
to_chat(creator, span_warning("You need more paper before you can even think of editing this area!"))
return
var/list/turfs = detect_room(get_turf(creator), area_or_turf_fail_types, BP_MAX_ROOM_SIZE*2)
var/list/turfs = detect_room(get_turf(creator), GLOB.area_or_turf_fail_types, BP_MAX_ROOM_SIZE*2)
if(!turfs)
to_chat(creator, span_warning("The new area must have a floor and not a part of a shuttle."))
return
@@ -483,7 +483,7 @@
for(var/i in 1 to length(turfs))
var/area/place = get_area(turfs[i])
if(blacklisted_areas[place.type])
if(GLOB.blacklisted_areas[place.type])
continue
if(!place.requires_power || (place.flag_check(BLUE_SHIELDED)))
continue // No expanding powerless rooms etc
@@ -551,7 +551,7 @@
to_chat(creator, span_warning("You need more paper before you can even think of editing this area!"))
return
var/res = detect_room_ex(get_turf(creator), can_create_areas_into, area_or_turf_fail_types)
var/res = detect_room_ex(get_turf(creator), can_create_areas_into, GLOB.area_or_turf_fail_types)
if(!res)
to_chat(creator, span_warning("There is an area forbidden from being edited here! Use the fine-tune area creator! (3x3)"))
return
@@ -578,7 +578,7 @@
var/str //What the new area is named.
var/can_make_new_area = 1 //If they can make a new area here or not.
var/list/nearby_turfs_to_check = detect_room(get_turf(creator), area_or_turf_fail_types, BP_MAX_ROOM_SIZE*2) //Get the nearby areas.
var/list/nearby_turfs_to_check = detect_room(get_turf(creator), GLOB.area_or_turf_fail_types, BP_MAX_ROOM_SIZE*2) //Get the nearby areas.
if(!nearby_turfs_to_check)
to_chat(creator, span_warning("The new area must have a floor and not a part of a shuttle."))
@@ -589,10 +589,10 @@
for(var/i in 1 to length(nearby_turfs_to_check))
var/area/place = get_area(nearby_turfs_to_check[i])
if(blacklisted_areas[place.type])
if(GLOB.blacklisted_areas[place.type])
if(!creator.lastarea != place) //Stops them from merging a blacklisted area to make it larger. Allows them to merge a blacklisted area into an allowed area. (Expansion!)
continue
if(!BUILDABLE_AREA_TYPES[place.type]) //TODOTODOTODO
if(!GLOB.BUILDABLE_AREA_TYPES[place.type]) //TODOTODOTODO
can_make_new_area = 0
if(!place.requires_power || (place.flag_check(BLUE_SHIELDED)))
continue // No expanding powerless rooms etc
@@ -810,14 +810,14 @@
/proc/get_new_area_type(area/A) //1 = can build in. 0 = can not build in.
if (!A)
A = get_area(usr)
if(A.outdoors) //ALWAYS able to build outdoors. This means if it's missed in BUILDABLE_AREA_TYPES it's fine.
if(A.outdoors) //ALWAYS able to build outdoors. This means if it's missed in GLOB.BUILDABLE_AREA_TYPES it's fine.
return 1
for (var/type in BUILDABLE_AREA_TYPES) //This works well.
for (var/type in GLOB.BUILDABLE_AREA_TYPES) //This works well.
if ( istype(A,type) )
return 1
for (var/type in SPECIALS)
for (var/type in GLOB.SPECIALS)
if ( istype(A,type) )
return 0
return 0 //If it's not a buildable area, don't let them build in it.
@@ -891,7 +891,7 @@
var/area/oldA = get_area(get_turf(creator)) //The old area (area currently standing in)
var/str //What the new area is named.
var/list/nearby_turfs_to_check = detect_room(get_turf(creator), area_or_turf_fail_types, 70) //Get the nearby areas.
var/list/nearby_turfs_to_check = detect_room(get_turf(creator), GLOB.area_or_turf_fail_types, 70) //Get the nearby areas.
if(!nearby_turfs_to_check)
to_chat(creator, span_warning("The new area must have a floor and not a part of a shuttle."))
@@ -901,7 +901,7 @@
return
//They can select an area they want to turn their current area into.
str = sanitizeSafe(tgui_input_text(usr, "What would you like to name the area?", "Area Name", null, MAX_NAME_LEN), MAX_NAME_LEN)
str = sanitizeSafe(tgui_input_text(creator, "What would you like to name the area?", "Area Name", null, MAX_NAME_LEN), MAX_NAME_LEN)
if(isnull(str)) //They pressed cancel.
to_chat(creator, span_warning("No new area made. Cancelling."))
return
@@ -11,10 +11,10 @@
if(var_value)
ghostjoin = TRUE
active_ghost_pods |= src
GLOB.active_ghost_pods |= src
else
ghostjoin = FALSE
active_ghost_pods -= src
GLOB.active_ghost_pods -= src
ghostjoin_icon()
. = TRUE
@@ -63,7 +63,7 @@
/// Inject a ghost into this mob. Assumes you've done all sanity before this point.
/mob/living/simple_mob/proc/ghost_join(mob/observer/dead/D)
log_and_message_admins("joined [src] as a ghost [ADMIN_FLW(src)]", D)
active_ghost_pods -= src
GLOB.active_ghost_pods -= src
// Move the ghost in
if(D.mind)
@@ -159,7 +159,7 @@
target.faction = user.faction
target.revivedby = user.name
target.ghostjoin = 1
active_ghost_pods += target
GLOB.active_ghost_pods += target
target.ghostjoin_icon()
last_used = world.time
charges--
@@ -189,7 +189,7 @@
log_and_message_admins("used a denecrotizer to revive a simple mob: [target]. [ADMIN_FLW(src)]", user)
if(!target.mind) //if it doesn't have a mind then no one has been playing as it, and it is safe to offer to ghosts.
target.ghostjoin = 1
active_ghost_pods |= target
GLOB.active_ghost_pods |= target
target.ghostjoin_icon()
last_used = world.time
charges--
@@ -67,13 +67,6 @@
return
/obj/item/multitool/cyborg
name = "multitool"
desc = "Optimised and stripped-down version of a regular multitool."
toolspeed = 0.5
/datum/category_item/catalogue/anomalous/precursor_a/alien_multitool
name = "Precursor Alpha Object - Pulse Tool"
desc = "This ancient object appears to be an electrical tool. \
@@ -32,23 +32,23 @@
name = "Nanite Synthesizer"
/datum/matter_synth/metal
name = "Metal Synthesizer"
name = METAL_SYNTH
/datum/matter_synth/plasteel
name = "Plasteel Synthesizer"
name = PLASTEEL_SYNTH
max_energy = 10000
/datum/matter_synth/glass
name = "Glass Synthesizer"
name = GLASS_SYNTH
/datum/matter_synth/wood
name = "Wood Synthesizer"
name = WOOD_SYNTH
/datum/matter_synth/plastic
name = "Plastic Synthesizer"
name = PLASTIC_SYNTH
/datum/matter_synth/wire
name = "Wire Synthesizer"
name = WIRE_SYNTH
max_energy = 50
recharge_rate = 2
@@ -58,7 +58,7 @@
recharge_rate = 1
/datum/matter_synth/cloth
name = "Cloth Synthesizer"
name = CLOTH_SYNTH
/datum/matter_synth/beacon
name = "Beacon Synthesizer"
+2
View File
@@ -50,6 +50,8 @@
return 1
if (src && usr && usr.machine == src)
usr << browse(null, "window=stack")
if(islist(synths))
synths.Cut()
return ..()
/obj/item/stack/update_icon()
@@ -225,46 +225,7 @@
throw_range = 5
attack_verb = list("attacked", "hit", "bludgeoned")
/*
* Cyborg Tools
*/
/obj/item/surgical/retractor/cyborg
icon_state = "cyborg_retractor"
toolspeed = 0.5
/obj/item/surgical/hemostat/cyborg
icon_state = "cyborg_hemostat"
toolspeed = 0.5
/obj/item/surgical/cautery/cyborg
icon_state = "cyborg_cautery"
toolspeed = 0.5
/obj/item/surgical/surgicaldrill/cyborg
icon_state = "cyborg_drill"
toolspeed = 0.5
/obj/item/surgical/scalpel/cyborg
icon_state = "cyborg_scalpel"
toolspeed = 0.5
/obj/item/surgical/circular_saw/cyborg
icon_state = "cyborg_saw"
toolspeed = 0.5
/obj/item/surgical/bonegel/cyborg
toolspeed = 0.5
/obj/item/surgical/FixOVein/cyborg
toolspeed = 0.5
/obj/item/surgical/bonesetter/cyborg
icon_state = "cyborg_setter"
toolspeed = 0.5
/obj/item/surgical/bioregen/cyborg //VoreStation edit: let the borgs S U C C
icon_state = "cyborg_bioregen"
toolspeed = 0.5
/*
* Alien Tools
@@ -64,13 +64,6 @@
origin_tech = list(TECH_COMBAT = 4, TECH_ENGINEERING = 3)
reach = 2
/obj/item/tool/crowbar/cyborg
name = "hydraulic crowbar"
desc = "A hydraulic prying tool, compact but powerful. Designed to replace crowbars in industrial synthetics."
usesound = 'sound/items/jaws_pry.ogg'
force = 10
toolspeed = 0.5
/obj/item/tool/crowbar/power
name = "power pryer"
desc = "You shouldn't see this."
@@ -100,12 +100,6 @@
random_color = FALSE
reach = 2
/obj/item/tool/screwdriver/cyborg
name = "powered screwdriver"
desc = "An electrical screwdriver, designed to be both precise and quick."
usesound = 'sound/items/drill_use.ogg'
toolspeed = 0.5
/obj/item/tool/screwdriver/power
name = "power screwdriver"
desc = "You shouldn't see this."
@@ -362,11 +362,6 @@
origin_tech = list(TECH_ENGINEERING = 2, TECH_PHORON = 2)
matter = list(MAT_STEEL = 70, MAT_GLASS = 60)
/obj/item/weldingtool/largetank/cyborg
name = "integrated welding tool"
desc = "An advanced welder designed to be used in robotic systems."
toolspeed = 0.5
/obj/item/weldingtool/hugetank
name = "upgraded welding tool"
desc = "A much larger welder with a huge tank."
@@ -639,6 +634,10 @@
..()
/obj/item/weldingtool/electric/proc/get_external_power_supply()
if(istype(src.loc, /obj/item/robotic_multibelt)) //We are in a multibelt
if(istype(src.loc.loc, /mob/living/silicon/robot)) //We are in a multibelt that is in a robot! This is sanity in case someone spawns a multibelt in via admin commands.
var/mob/living/silicon/robot/R = src.loc.loc
return R.cell
if(isrobot(src.loc))
var/mob/living/silicon/robot/R = src.loc
return R.cell
@@ -659,9 +658,6 @@
/obj/item/weldingtool/electric/mounted
use_external_power = 1
/obj/item/weldingtool/electric/mounted/cyborg
toolspeed = 0.5
/obj/item/weldingtool/electric/mounted/exosuit
var/obj/item/mecha_parts/mecha_equipment/equip_mount = null
flame_intensity = 1
@@ -81,12 +81,6 @@
origin_tech = list(TECH_MATERIAL = 5, TECH_ENGINEERING = 4)
random_color = FALSE
/obj/item/tool/wirecutters/cyborg
name = "wirecutters"
desc = "This cuts wires. With science."
usesound = 'sound/items/jaws_cut.ogg'
toolspeed = 0.5
/obj/item/tool/wirecutters/hybrid
name = "strange wirecutters"
desc = "This cuts wires. With " + span_purple("Science!")
@@ -19,12 +19,6 @@
pickup_sound = 'sound/items/pickup/wrench.ogg'
tool_qualities = list(TOOL_WRENCH)
/obj/item/tool/wrench/cyborg
name = "automatic wrench"
desc = "An advanced robotic wrench. Can be found in industrial synthetic shells."
usesound = 'sound/items/drill_use.ogg'
toolspeed = 0.5
/obj/item/tool/wrench/pipe
name = "pipe wrench"
desc = "A wrench used for plumbing. Can make a good makeshift weapon."
@@ -37,7 +37,7 @@
if(!AMBLINAL.mind)
AMBLINAL.ghostjoin = 1
AMBLINAL.ghostjoin_icon()
active_ghost_pods |= AMBLINAL
GLOB.active_ghost_pods |= AMBLINAL
//VOREStation Add End
user.visible_message(span_notice("[user] pries \the [src] open."), \
span_notice("You pry open \the [src]."), \
+2 -2
View File
@@ -252,7 +252,7 @@
if(istype(W,/obj/item/grab || /obj/item/holder))
gargoyle.vore_attackby(W, user)
return
if(gargoyle.adminbus_trash || is_type_in_list(W,edible_trash) && W.trash_eatable && !is_type_in_list(W,item_vore_blacklist))
if(gargoyle.adminbus_trash || is_type_in_list(W, GLOB.edible_trash) && W.trash_eatable && !is_type_in_list(W, GLOB.item_vore_blacklist))
to_chat(user, span_warning("You slip [W] into [gargoyle]'s [lowertext(gargoyle.vore_selected.name)] ."))
user.drop_item()
W.forceMove(gargoyle.vore_selected)
@@ -276,7 +276,7 @@
/obj/structure/gargoyle/hitby(atom/movable/AM as mob|obj,var/speed = THROWFORCE_SPEED_DIVISOR)
if(istype(AM,/obj/item) && gargoyle && gargoyle.vore_selected && gargoyle.trash_catching)
var/obj/item/I = AM
if(gargoyle.adminbus_trash || is_type_in_list(I,edible_trash) && I.trash_eatable && !is_type_in_list(I,item_vore_blacklist))
if(gargoyle.adminbus_trash || is_type_in_list(I, GLOB.edible_trash) && I.trash_eatable && !is_type_in_list(I, GLOB.item_vore_blacklist))
gargoyle.hitby(AM, speed)
return
else if(isliving(AM) && gargoyle)
@@ -1,5 +1,5 @@
/obj/structure/ghost_pod/proc/reset_ghostpod() //Makes the ghost pod usable again and re-adds it to the active ghost pod list if it is not on it.
active_ghost_pods |= src
GLOB.active_ghost_pods |= src
used = FALSE
busy = FALSE
@@ -174,8 +174,7 @@
/obj/structure/ghost_pod/ghost_activated/maintpred/redgate/Initialize(mapload)
. = ..()
if(!(src in active_ghost_pods))
active_ghost_pods += src
GLOB.active_ghost_pods += src
/obj/structure/ghost_pod/ghost_activated/maint_lurker
name = "strange maintenance hole"
@@ -260,8 +259,7 @@
/obj/structure/ghost_pod/ghost_activated/maint_lurker/Initialize(mapload)
. = ..()
if(!(src in active_ghost_pods))
active_ghost_pods += src
GLOB.active_ghost_pods += src
/// redspace variant
@@ -51,10 +51,7 @@
// Override this to create whatever mob you need. Be sure to call ..() if you don't want it to make infinite mobs.
/obj/structure/ghost_pod/proc/create_occupant(var/mob/M)
used = TRUE
//VOREStation Addition Start
if(src in active_ghost_pods)
active_ghost_pods -= src
//VOREStation Addition End
GLOB.active_ghost_pods -= src
return TRUE
@@ -1,7 +1,6 @@
/obj/structure/ghost_pod/Destroy()
if(src in active_ghost_pods)
active_ghost_pods -= src
..()
GLOB.active_ghost_pods -= src
. = ..()
/obj/structure/ghost_pod
var/spawn_active = FALSE
@@ -47,8 +46,7 @@
create_occupant(user)
/obj/structure/ghost_pod/proc/ghostpod_startup(var/notify = FALSE)
if(!(src in active_ghost_pods))
active_ghost_pods += src
GLOB.active_ghost_pods |= src
if(notify)
trigger()
+1 -1
View File
@@ -1,7 +1,7 @@
// checks for when items are consumed by trash/ore eater
/obj/item/proc/on_trash_eaten(var/mob/living/user)
SHOULD_CALL_PARENT(TRUE)
if(is_type_in_list(src,item_vore_blacklist) && !user.adminbus_trash) //If someone has adminbus, they can eat whatever they want.
if(is_type_in_list(src, GLOB.item_vore_blacklist) && !user.adminbus_trash) //If someone has adminbus, they can eat whatever they want.
to_chat(user, span_warning("You are not allowed to eat this."))
return FALSE
if(!trash_eatable) //OOC pref. This /IS/ respected, even if adminbus_trash is enabled