RCD Improvements + Holofans + fixes (#6738)

This commit is contained in:
BlackMajor
2023-08-07 03:07:59 +12:00
committed by GitHub
parent 70c3599a77
commit 7fd1ff3dc5
22 changed files with 1571 additions and 13 deletions

View File

@@ -15,4 +15,10 @@
#define MAT_CARPET_PURPLE "purple carpet"
#define MAT_CARPET_ORANGE "orange carpet"
#define PHASE_SHIELDED 16 // Prevents shadekin phasing in/out in this area
#define PHASE_SHIELDED 16 // Prevents shadekin phasing in/out in this area
#define RCD_FIRELOCK "Firelock" // Builds an emergency glass shutter
#define RCD_WINDOOR "Windoor" // Build a window door
#define RCD_FRAME "Frame" // Build a Machine or Computer frame
#define RCD_WALLFRAME "WallFrame" // Build a selection of wall frames
#define RCD_CONVEYOR "Conveyor" // Build direction conveyors

View File

@@ -261,6 +261,8 @@ GLOBAL_LIST_EMPTY(radial_menus)
current_user = M.client
//Blank
menu_holder = image(icon='icons/effects/effects.dmi',loc=anchor,icon_state="nothing",layer = LAYER_HUD_ABOVE)
menu_holder.plane = PLANE_PLAYER_HUD_ABOVE //CHOMPEdit - fixed plane
menu_holder.appearance_flags |= RESET_TRANSFORM //CHOMPEdit - fix radial scaling improperly based on mob size
menu_holder.appearance_flags |= KEEP_APART
menu_holder.vis_contents += elements + close_button
current_user.images += menu_holder

View File

@@ -134,8 +134,13 @@ GLOBAL_LIST_EMPTY(entertainment_screens)
if(isliving(usr) && Adjacent(usr) && !usr.incapacitated())
toggle()
visible_message("<b>[usr]</b> toggles [src] [enabled ? "on" : "off"].","You toggle [src] [enabled ? "on" : "off"].", runemessage = "click")
else
//CHOMPEdit start - Changing click to only come into play when shift or alt clicking. These things are ANNOYING.
return
if(modifiers["shift"])
attack_hand(usr)
return
..()
//CHOMPEdit end
/obj/machinery/computer/security/telescreen/entertainment/update_icon()
return // NUH

View File

@@ -13,10 +13,10 @@
power_channel = ENVIRON
explosion_resistance = 10
// Doors do their own stuff
bullet_vulnerability = 0
blocks_emissive = EMISSIVE_BLOCK_GENERIC // Not quite as nice as /tg/'s custom masks. We should make those sometime
var/aiControlDisabled = 0 //If 1, AI control is disabled until the AI hacks back in and disables the lock. If 2, the AI has bypassed the lock. If -1, the control is enabled but the AI had bypassed it earlier, so if it is disabled again the AI would have no trouble getting back in.
@@ -1004,7 +1004,7 @@ About the new airlock wires panel:
/* // CHOMPEDIT: disabling becaue alt-clicking to view a turf is pretty important.
/obj/machinery/door/airlock/AltClick(mob/user as mob)
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
if(!Adjacent(user))
return
@@ -1563,7 +1563,7 @@ About the new airlock wires panel:
src.lock()
return
/* CHOMPEdit - moved this block to modular_chomp\code\game\objects\items\weapons\rcd.dm
/obj/machinery/door/airlock/rcd_values(mob/living/user, obj/item/weapon/rcd/the_rcd, passed_mode)
switch(passed_mode)
if(RCD_DECONSTRUCT)
@@ -1583,3 +1583,4 @@ About the new airlock wires panel:
qdel(src)
return TRUE
return FALSE
*/

View File

@@ -31,7 +31,7 @@
var/make_rwalls = FALSE // If true, when building walls, they will be reinforced.
/* VOREStation Removal - Unused
/obj/item/weapon/rcd/Initialize()
src.spark_system = new /datum/effect/effect/system/spark_spread
spark_system.set_up(5, 0, src)
spark_system.attach(src)
@@ -103,6 +103,10 @@
return FALSE
var/list/rcd_results = A.rcd_values(user, src, modes[mode_index])
//CHOMPEdit start
if(rcd_results == 1)
return FALSE
//CHOMPEdit end
if(!rcd_results)
to_chat(user, span("warning", "\The [src] blinks a red light as you point it towards \the [A], indicating \
that it won't work. Try changing the mode, or use it on something else."))

View File

@@ -64,6 +64,7 @@
qdel(effects[A])
effects -= A
/* CHOMPEdit - moved this block to modular_chomp\code\game\objects\items\weapons\rcd.dm
/obj/item/weapon/rcd/attackby(obj/item/weapon/W, mob/user)
if(istype(W, /obj/item/weapon/rcd_ammo))
var/obj/item/weapon/rcd_ammo/cartridge = W
@@ -82,6 +83,7 @@
update_icon()
return TRUE
return ..()
*/
/obj/item/weapon/rcd/proc/check_menu(mob/living/user)
if(!istype(user))
@@ -106,6 +108,7 @@
return TRUE
/* CHOMPEdit - moved this block to modular_chomp\code\game\objects\items\weapons\rcd.dm
/obj/item/weapon/rcd/attack_self(mob/living/user)
..()
var/list/choices = list(
@@ -170,6 +173,7 @@
return
playsound(src, 'sound/effects/pop.ogg', 50, FALSE)
to_chat(user, "<span class='notice'>You change RCD's mode to '[choice]'.</span>")
*/
//////////////////
/obj/item/weapon/rcd/electric/update_icon()

View File

@@ -73,6 +73,8 @@
/obj/item/weapon/extinguisher/mini,
/obj/item/weapon/tape_roll,
/obj/item/device/integrated_electronics/wirer,
/obj/item/weapon/pipe_dispenser, //CHOMPAdd
/obj/item/weapon/holosign_creator/combifan, //CHOMPAdd
/obj/item/device/integrated_electronics/debugger, //Vorestation edit adding debugger to toolbelt can hold list
/obj/item/weapon/shovel/spade, //VOREStation edit. If it can hold minihoes and hatchers, why not the gardening spade?
/obj/item/stack/nanopaste, //VOREStation edit. Think of it as a tube of superglue. Belts hold that all the time.
@@ -479,6 +481,7 @@
/obj/item/taperoll,
/obj/item/weapon/reagent_containers/spray,
/obj/item/weapon/soap,
/obj/item/weapon/holosign_creator, //CHOMPAdd
/obj/item/device/lightreplacer //VOREStation edit
)

View File

@@ -81,6 +81,7 @@
/obj/item/weapon/storage/bag/trash,
/obj/item/weapon/storage/belt/janitor,
/obj/item/device/vac_attachment, //CHOMPAdd
/obj/item/weapon/holosign_creator, //CHOMPAdd
/obj/item/clothing/shoes/galoshes
)

View File

@@ -37,6 +37,7 @@
/obj/item/clothing/head/beret/engineering/ce/white,
/obj/item/weapon/tank/emergency/oxygen/double, //VOREStation Edit: chief gets the good shit
/obj/item/weapon/reagent_containers/spray/windowsealant, //VOREStation Add,
/obj/item/weapon/rcd/advanced/loaded, //CHOMPAdd
/obj/item/weapon/pipe_dispenser) //YW Add
/obj/structure/closet/secure_closet/engineering_chief/Initialize()
@@ -138,6 +139,7 @@
/obj/item/clothing/suit/storage/hooded/wintercoat/engineering/atmos,
/obj/item/clothing/shoes/boots/winter/atmos,
/obj/item/weapon/tank/emergency/oxygen/engi,
/obj/item/weapon/holosign_creator/combifan, //CHOMPAdd
/obj/item/weapon/storage/belt/utility/atmostech) //VOREStation edit. They don't get a toolbox to fill it from, so why not give a spare one that's full already?
/obj/structure/closet/secure_closet/atmos_personal/Initialize()

View File

@@ -365,6 +365,7 @@
cover = 60
girder_material = "resin"
/* CHOMPEdit - moved this block to modular_chomp\code\game\objects\items\weapons\rcd.dm
/obj/structure/girder/rcd_values(mob/living/user, obj/item/weapon/rcd/the_rcd, passed_mode)
var/turf/simulated/T = get_turf(src)
if(!istype(T) || T.density)
@@ -413,6 +414,7 @@
to_chat(user, span("notice", "You deconstruct \the [src]."))
qdel(src)
return TRUE
*/
/obj/structure/girder/bay
wall_type = /turf/simulated/wall/bay

View File

@@ -248,7 +248,7 @@
/obj/structure/grille/broken/rustic
icon_state = "grillerustic-b"
/* CHOMPEdit - moved this block to modular_chomp\code\game\objects\items\weapons\rcd.dm
/obj/structure/grille/rcd_values(mob/living/user, obj/item/weapon/rcd/the_rcd, passed_mode)
switch(passed_mode)
if(RCD_WINDOWGRILLE)
@@ -281,6 +281,7 @@
WD.anchored = TRUE
return TRUE
return FALSE
*/
/obj/structure/grille/take_damage(var/damage)
health -= damage

View File

@@ -686,6 +686,7 @@
return TRUE
. = ..()
/* CHOMPEdit - moved this block to modular_chomp\code\game\objects\items\weapons\rcd.dm
/obj/structure/window/rcd_values(mob/living/user, obj/item/weapon/rcd/the_rcd, passed_mode)
switch(passed_mode)
if(RCD_DECONSTRUCT)
@@ -702,3 +703,4 @@
qdel(src)
return TRUE
return FALSE
*/

View File

@@ -112,6 +112,7 @@
/turf/simulated/floor/can_engrave()
return (!flooring || flooring.can_engrave)
/* CHOMPEdit - moved this block to modular_chomp\code\game\objects\items\weapons\rcd.dm
/turf/simulated/floor/rcd_values(mob/living/user, obj/item/weapon/rcd/the_rcd, passed_mode)
switch(passed_mode)
if(RCD_FLOORWALL)
@@ -179,10 +180,10 @@
to_chat(user, span("notice", "You deconstruct \the [src]."))
ChangeTurf(get_base_turf_by_area(src), preserve_outdoors = TRUE)
return TRUE
*/
/turf/simulated/floor/AltClick(mob/user)
if(isliving(user))
var/mob/living/livingUser = user
if(try_graffiti(livingUser, livingUser.get_active_hand()))
return
. = ..()
. = ..()

View File

@@ -309,6 +309,7 @@
/turf/simulated/wall/can_engrave()
return (material && material.hardness >= 10 && material.hardness <= 100)
/* CHOMPEdit - moved this block to modular_chomp\code\game\objects\items\weapons\rcd.dm
/turf/simulated/wall/rcd_values(mob/living/user, obj/item/weapon/rcd/the_rcd, passed_mode)
if(material.integrity > 1000) // Don't decon things like elevatorium.
return FALSE
@@ -332,6 +333,7 @@
ChangeTurf(/turf/simulated/floor/airless, preserve_outdoors = TRUE)
return TRUE
return FALSE
*/
/turf/simulated/wall/AltClick(mob/user)
if(isliving(user))

View File

@@ -44,7 +44,7 @@
//Lighting related
set_luminosity(!(dynamic_lighting))
if(opacity)
directional_opacity = ALL_CARDINALS
@@ -377,6 +377,7 @@
UNSETEMPTY(dangerous_objects) // This nulls the list var if it's empty.
// color = "#00FF00"
/* CHOMPEdit - moved this block to modular_chomp\code\game\objects\items\weapons\rcd.dm
// This is all the way up here since its the common ancestor for things that need to get replaced with a floor when an RCD is used on them.
// More specialized turfs like walls should instead override this.
// The code for applying lattices/floor tiles onto lattices could also utilize something similar in the future.
@@ -401,7 +402,7 @@
ChangeTurf(/turf/simulated/floor/airless, preserve_outdoors = TRUE)
return TRUE
return FALSE
*/
// We're about to be the A-side in a turf translation
/turf/proc/pre_translate_A(var/turf/B)

View File

@@ -118,7 +118,7 @@ GLOBAL_LIST_EMPTY(unique_deployable)
template_id = "shelter_epsilon"
unique_id = "shelter_5"
is_ship = TRUE
/obj/item/device/survivalcapsule/popcabin
name = "pop-out cabin shelter capsule"
desc = "A cozy cabin; crammed into a survival capsule."
@@ -295,6 +295,15 @@ GLOBAL_LIST_EMPTY(unique_deployable)
var/buildstacktype = /obj/item/stack/material/steel
var/buildstackamount = 5
//CHOMPAdd start - fans weren't updating atmos when destroyed or placed
/obj/structure/fans/Destroy()
update_nearby_tiles()
return ..()
/obj/structure/fans/Initialize(mapload)
.=..()
update_nearby_tiles()
//CHOMPAdd end
/*
/obj/structure/fans/proc/deconstruct()
new buildstacktype(loc,buildstackamount)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 20 KiB

View File

@@ -0,0 +1,64 @@
/obj/item/weapon/holosign_creator
name = "holographic sign projector"
desc = "A handy-dandy holographic projector that displays a janitorial sign."
icon = 'icons/obj/device.dmi'
icon_state = "signmaker"
item_state = "electronic"
force = 0
w_class = 2
throwforce = 0
throw_speed = 3
throw_range = 7
var/list/signs = list()
var/max_signs = 10
var/creation_time = 0 //time to create a holosign in deciseconds.
var/holosign_type = /obj/structure/holosign/wetsign
var/holocreator_busy = FALSE //to prevent placing multiple holo barriers at once
/obj/item/weapon/holosign_creator/afterattack(atom/target, mob/user, clickchain_flags, list/params)
. = ..()
if(!check_allowed_items(target, 1))
return
var/turf/T = get_turf(target)
var/obj/structure/holosign/H = locate(holosign_type) in T
if(H)
to_chat(user, "<span class='notice'>You use [src] to deactivate [H].</span>")
qdel(H)
else
if(!is_blocked_turf(T, TRUE)) //can't put holograms on a tile that has dense stuff
if(holocreator_busy)
to_chat(user, "<span class='notice'>[src] is busy creating a hologram.</span>")
return
if(signs.len < max_signs)
playsound(src.loc, 'sound/machines/click.ogg', 20, 1)
if(creation_time)
holocreator_busy = TRUE
if(!do_after(user, creation_time, target = target))
holocreator_busy = FALSE
return
holocreator_busy = FALSE
if(signs.len >= max_signs)
return
if(is_blocked_turf(T, TRUE)) //don't try to sneak dense stuff on our tile during the wait.
return
H = new holosign_type(get_turf(target), src)
to_chat(user, "<span class='notice'>You create \a [H] with [src].</span>")
else
to_chat(user, "<span class='notice'>[src] is projecting at max capacity!</span>")
/obj/item/weapon/holosign_creator/attack_self(mob/user)
. = ..()
if(.)
return
if(signs.len)
for(var/H in signs)
qdel(H)
to_chat(user, "<span class='notice'>You clear all active holograms.</span>")
/obj/item/weapon/holosign_creator/combifan
name = "ATMOS holo-combifan projector"
desc = "A holographic projector that creates holographic combi-fans that prevent changes in atmosphere and temperature conditions. Somehow."
icon_state = "signmaker_engi"
holosign_type = /obj/structure/holosign/barrier/combifan
creation_time = 0
max_signs = 3

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,70 @@
/obj/structure/holosign
name = "holo sign"
icon = 'icons/effects/effects_ch.dmi'
anchored = TRUE
var/obj/item/weapon/holosign_creator/projector
var/health = 10
explosion_resistance = 1
/obj/structure/holosign/Initialize(mapload, source_projector)
. = ..()
if(source_projector)
projector = source_projector
projector.signs += src
/* if(overlays) // Fucking god damnit why do we have to have an entire different subsystem for this shit from other codebases.
overlays.add_overlay(src, icon, icon_state, ABOVE_MOB_LAYER, plane, dir, alpha, RESET_ALPHA) //you see mobs under it, but you hit them like they are above it
alpha = 0
*/
/obj/structure/holosign/Destroy()
if(projector)
projector.signs -= src
projector = null
return ..()
/obj/structure/holosign/attack_hand(mob/user, list/params)
. = ..()
if(.)
return
user.setClickCooldown(user.get_attack_speed())
user.do_attack_animation(src)
take_damage(5)
playsound(loc, 'sound/weapons/egloves.ogg', 80, 1)
/obj/structure/holosign/attackby(obj/item/W as obj, mob/user as mob)
user.setClickCooldown(user.get_attack_speed(W))
user.do_attack_animation(src)
playsound(loc, 'sound/weapons/egloves.ogg', 80, 1)
take_damage(W.force)
/obj/structure/holosign/take_damage(var/damage)
health -= damage
spawn(1) healthcheck()
return 1
/obj/structure/holosign/proc/healthcheck()
if(health <= 0)
qdel(src)
/obj/structure/holosign/wetsign
name = "wet floor sign"
desc = "The words flicker as if they mean nothing."
icon_state = "holosign"
/obj/structure/holosign/barrier/combifan
name = "holo combifan"
desc = "A holographic barrier resembling a blue-accented tiny fan. Though it does not prevent solid objects from passing through, gas and temperature changes are kept out."
icon_state = "holo_firelock"
anchored = TRUE
density = FALSE
layer = ABOVE_TURF_LAYER
can_atmos_pass = ATMOS_PASS_NO
alpha = 150
/obj/structure/holosign/barrier/combifan/Destroy()
update_nearby_tiles()
return ..()
/obj/structure/holosign/barrier/combifan/Initialize(mapload)
.=..()
update_nearby_tiles()

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

View File

@@ -4570,16 +4570,19 @@
#include "modular_chomp\code\game\machinery\colormate.dm"
#include "modular_chomp\code\game\machinery\petrification.dm"
#include "modular_chomp\code\game\objects\items.dm"
#include "modular_chomp\code\game\objects\items\holosign_creator.dm"
#include "modular_chomp\code\game\objects\items\petrifier.dm"
#include "modular_chomp\code\game\objects\items\clockwork\ratvarian_spear.dm"
#include "modular_chomp\code\game\objects\items\devices\flipper.dm"
#include "modular_chomp\code\game\objects\items\devices\vacpack.dm"
#include "modular_chomp\code\game\objects\items\weapons\capture_crystal.dm"
#include "modular_chomp\code\game\objects\items\weapons\cigs_lighters.dm"
#include "modular_chomp\code\game\objects\items\weapons\RCD.dm"
#include "modular_chomp\code\game\objects\items\weapons\storage\firstaid.dm"
#include "modular_chomp\code\game\objects\random\mapping.dm"
#include "modular_chomp\code\game\objects\structures\desert_planet_structures.dm"
#include "modular_chomp\code\game\objects\structures\gargoyle.dm"
#include "modular_chomp\code\game\objects\structures\holosign.dm"
#include "modular_chomp\code\game\objects\structures\loot_pile.dm"
#include "modular_chomp\code\game\objects\structures\watercloset_ch.dm"
#include "modular_chomp\code\game\objects\structures\crate_lockers\largecrate.dm"