diff --git a/code/game/objects/items/weapons/storage/belt.dm b/code/game/objects/items/weapons/storage/belt.dm index f73d387d53f..69fcdfe5968 100644 --- a/code/game/objects/items/weapons/storage/belt.dm +++ b/code/game/objects/items/weapons/storage/belt.dm @@ -469,7 +469,8 @@ /obj/item/rfd/mining, /obj/item/gun/custom_ka, /obj/item/device/orbital_dropper, - /obj/item/ore_detector + /obj/item/ore_detector, + /obj/item/device/spaceflare ) /obj/item/storage/belt/hydro diff --git a/code/modules/mining/machine_vending.dm b/code/modules/mining/machine_vending.dm index 93b7b6fc5fd..0d5b65970a4 100644 --- a/code/modules/mining/machine_vending.dm +++ b/code/modules/mining/machine_vending.dm @@ -50,6 +50,7 @@ var/global/list/minevendor_list = list( //keep in order of price new /datum/data/mining_equipment(/obj/vehicle/train/cargo/engine/mining, -1, 800, 1), new /datum/data/mining_equipment(/obj/item/device/mine_bot_upgrade/ka, 10, 800), new /datum/data/mining_equipment(/obj/item/oreportal, 35, 800), + new /datum/data/mining_equipment(/obj/item/device/spaceflare, 5, 800), new /datum/data/mining_equipment(/obj/item/lazarus_injector, 25, 1000), new /datum/data/mining_equipment(/obj/item/storage/backpack/cell, 5, 1000), new /datum/data/mining_equipment(/obj/machinery/mining/drill, -1, 1000, 1), diff --git a/code/modules/research/designs/protolathe/tool_designs.dm b/code/modules/research/designs/protolathe/tool_designs.dm index 0d1709c6ef2..4d0442312b9 100644 --- a/code/modules/research/designs/protolathe/tool_designs.dm +++ b/code/modules/research/designs/protolathe/tool_designs.dm @@ -168,3 +168,9 @@ req_tech = list(TECH_POWER = 7, TECH_MATERIAL = 3, TECH_COMBAT = 5) materials = list(DEFAULT_WALL_MATERIAL = 7000, MATERIAL_GLASS = 2250, MATERIAL_URANIUM = 3250, MATERIAL_GOLD = 2500) build_path = /obj/item/recharger_backpack + +/datum/design/item/tool/spaceflare + name = "Bluespace Flare" + req_tech = list(TECH_BLUESPACE = 4, TECH_MAGNET = 3, TECH_DATA = 2) + materials = list(DEFAULT_WALL_MATERIAL = 1000, MATERIAL_GLASS = 1000, MATERIAL_PHORON = 400) + build_path = /obj/item/device/spaceflare diff --git a/code/modules/research/xenoarchaeology/misc.dm b/code/modules/research/xenoarchaeology/misc.dm index 3af49ad1288..81bad34b3f3 100644 --- a/code/modules/research/xenoarchaeology/misc.dm +++ b/code/modules/research/xenoarchaeology/misc.dm @@ -98,6 +98,7 @@ new /obj/item/storage/bag/fossils(src) new /obj/item/device/hand_labeler(src) new /obj/item/ore_detector(src) + new /obj/item/device/spaceflare(src) // 2 Drills new /obj/item/pickaxe/drill(src) diff --git a/code/modules/research/xenoarchaeology/tools/gearbelt.dm b/code/modules/research/xenoarchaeology/tools/gearbelt.dm index 775b5ac0ae5..c10941f67cb 100644 --- a/code/modules/research/xenoarchaeology/tools/gearbelt.dm +++ b/code/modules/research/xenoarchaeology/tools/gearbelt.dm @@ -28,5 +28,6 @@ /obj/item/storage/box/excavation, /obj/item/anobattery, /obj/item/device/ano_scanner, - /obj/item/ore_detector + /obj/item/ore_detector, + /obj/item/device/spaceflare ) diff --git a/code/modules/shuttles/landmarks.dm b/code/modules/shuttles/landmarks.dm index 6853872b4b8..7f488541256 100644 --- a/code/modules/shuttles/landmarks.dm +++ b/code/modules/shuttles/landmarks.dm @@ -154,35 +154,110 @@ /obj/item/device/spaceflare name = "bluespace flare" desc = "Burst transmitter used to broadcast all needed information for shuttle navigation systems. Has a flare attached for marking the spot where you probably shouldn't be standing." + icon = 'icons/obj/space_flare.dmi' icon_state = "bluflare" light_color = "#3728ff" - var/active + origin_tech = list(TECH_BLUESPACE = 4, TECH_MAGNET = 3, TECH_DATA = 2) + /// Boolean. Whether or not the spaceflare has been activated. + var/active = FALSE + /// The shuttle landmark synced to this beacon. This is set when the beacon is activated. + var/obj/effect/shuttle_landmark/automatic/spaceflare/landmark /obj/item/device/spaceflare/attack_self(var/mob/user) - if(!active) - visible_message("[user] pulls the cord, activating \the [src].") - activate() + if(activate(user)) + user.visible_message(SPAN_NOTICE("\The [user] pulls the cord, activating \the [src]."), SPAN_NOTICE("You pull the cord, activating \the [src]."), SPAN_ITALIC("You hear the sound of something being struck and ignited.")) -/obj/item/device/spaceflare/proc/activate() +/obj/item/device/spaceflare/proc/activate(mob/user) if(active) - return + to_chat(user, SPAN_WARNING("\The [src] is already active.")) + return FALSE var/turf/T = get_turf(src) - var/mob/M = loc - if(istype(M) && !M.unEquip(src, T)) - return + if(isspaceturf(T) || isopenspace(T)) + to_chat(user, SPAN_WARNING("\The [src] needs to be activated on solid ground.")) + return FALSE + if(istype(user) && !user.unEquip(src, T)) + return FALSE + if(loc != T) + return FALSE - active = 1 - anchored = 1 + active = TRUE + anchored = TRUE - var/obj/effect/shuttle_landmark/automatic/mark = new(T) - mark.name = "beacon signal ([T.x],[T.y])" - T.hotspot_expose(1500, 5) + log_and_message_admins("activated a bluespace flare in [get_area(src)]", user, get_turf(src)) + landmark = new(T, src) update_icon() + return TRUE + +/obj/item/device/spaceflare/proc/deactivate(silent = FALSE) + if (!active) + return FALSE + + active = FALSE + anchored = FALSE + QDEL_NULL(landmark) + update_icon() + if (!silent) + visible_message(SPAN_WARNING("\The [src] stops burning and deactivates.")) + return TRUE /obj/item/device/spaceflare/update_icon() - if(active) - icon_state = "bluflare_on" + if (active) + icon_state = "[initial(icon_state)]_on" set_light(0.3, 0.1, 6, 2, "85d1ff") + else + icon_state = initial(icon_state) + set_light(0) + +/obj/item/device/spaceflare/Destroy() + deactivate(TRUE) + . = ..() + +/obj/item/device/spaceflare/attack_hand(mob/user) + if(active) + var/choice = tgui_alert(user, "Do you want to deactivate \the [src]?", "Bluespace Flare", list("Yes","No")) + if(choice == "Yes") + user.visible_message(SPAN_NOTICE("\The [user] presses a button, deactivating \the [src]'s signal"), SPAN_NOTICE("You press a button on the side of \the [src], shutting down its signal."), SPAN_ITALIC("You hear the sound of a flare fizzling out.")) + deactivate() + else + ..() + +//Activated by a bluespace flare +/obj/effect/shuttle_landmark/automatic/spaceflare + name = "Bluespace Beacon Signal" + /// The beacon object synced to this landmark. If this is ever null or qdeleted the landmark should delete itself. + var/obj/item/device/spaceflare/beacon + +/obj/effect/shuttle_landmark/automatic/spaceflare/Initialize(mapload, obj/item/device/spaceflare/beacon) + . = ..() + + if(!istype(beacon)) + stack_trace("\A [src] was initialized with an invalid or nonexistent beacon.") + return INITIALIZE_HINT_QDEL + + if(beacon.landmark && beacon.landmark != src) + stack_trace("\A [src] was initialized with a beacon that already has a synced landmark.") + return INITIALIZE_HINT_QDEL + + src.beacon = beacon + RegisterSignal(beacon, COMSIG_MOVABLE_MOVED, PROC_REF(update_beacon_moved), TRUE) + //GLOB.moved_event.register(beacon, src, /obj/effect/shuttle_landmark/automatic/spaceflare/proc/update_beacon_moved) + +/obj/effect/shuttle_landmark/automatic/spaceflare/Destroy() + UnregisterSignal(beacon, COMSIG_MOVABLE_MOVED) + //GLOB.moved_event.unregister(beacon, src, /obj/effect/shuttle_landmark/automatic/spaceflare/proc/update_beacon_moved) + if (beacon?.active) + stack_trace("\A [src] was destroyed with a still active beacon.") + beacon.deactivate() + beacon = null + . = ..() + +/obj/effect/shuttle_landmark/automatic/spaceflare/proc/update_beacon_moved(atom/movable/moving_instance, atom/old_loc, atom/new_loc) + if(!isturf(new_loc) || isspaceturf(new_loc) || isopenturf(new_loc)) + stack_trace("\A [src]'s beacon was moved to a non-turf or unacceptable location.") + beacon.deactivate() + return + forceMove(new_loc) + name = "[initial(name)] ([x],[y])" //This one activates away site ghostroles on the z-level. /obj/effect/shuttle_landmark/automatic/ghostrole_activation diff --git a/html/changelogs/RustingWithYou - spaceflare.yml b/html/changelogs/RustingWithYou - spaceflare.yml new file mode 100644 index 00000000000..3d0a5205381 --- /dev/null +++ b/html/changelogs/RustingWithYou - spaceflare.yml @@ -0,0 +1,41 @@ +################################ +# Example Changelog File +# +# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb. +# +# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.) +# When it is, any changes listed below will disappear. +# +# Valid Prefixes: +# bugfix +# wip (For works in progress) +# tweak +# soundadd +# sounddel +# rscadd (general adding of nice things) +# rscdel (general deleting of nice things) +# imageadd +# imagedel +# maptweak +# spellcheck (typo fixes) +# experiment +# balance +# admin +# backend +# security +# refactor +################################# + +# Your name. +author: RustingWithYou + +# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again. +delete-after: True + +# Any changes you've made. See valid prefix list above. +# INDENT WITH TWO SPACES. NOT TABS. SPACES. +# SCREW THIS UP AND IT WON'T WORK. +# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries. +# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog. +changes: + - rscadd: "Ports Baystation's bluespace flares." diff --git a/icons/obj/device.dmi b/icons/obj/device.dmi index 164424eb7de..37ef33a38cc 100644 Binary files a/icons/obj/device.dmi and b/icons/obj/device.dmi differ diff --git a/icons/obj/space_flare.dmi b/icons/obj/space_flare.dmi new file mode 100644 index 00000000000..f87df7bd6c4 Binary files /dev/null and b/icons/obj/space_flare.dmi differ diff --git a/maps/sccv_horizon/sccv_horizon-1_deck_1.dmm b/maps/sccv_horizon/sccv_horizon-1_deck_1.dmm index 2b9d8e08a5b..f121303e1f1 100644 --- a/maps/sccv_horizon/sccv_horizon-1_deck_1.dmm +++ b/maps/sccv_horizon/sccv_horizon-1_deck_1.dmm @@ -9544,8 +9544,9 @@ "gua" = ( /obj/structure/table/steel, /obj/item/storage/toolbox/mechanical{ - pixel_y = 3 + pixel_y = 8 }, +/obj/machinery/recharger, /turf/simulated/floor/tiled/dark, /area/hangar/control) "gub" = ( @@ -21309,8 +21310,14 @@ /obj/effect/floor_decal/corner/dark_blue{ dir = 9 }, -/obj/structure/table/steel, -/obj/machinery/recharger, +/obj/effect/floor_decal/industrial/outline/yellow, +/obj/item/storage/toolbox/mechanical{ + pixel_y = 8 + }, +/obj/structure/table/rack, +/obj/item/device/spaceflare, +/obj/item/device/spaceflare, +/obj/item/device/spaceflare, /turf/simulated/floor/tiled/dark, /area/hangar/control) "oDd" = (