Skip to content

Commit

Permalink
Возвращаю телесало, чиним пистолет кадета, исправляем ошибку в назван…
Browse files Browse the repository at this point in the history
…ие платы, возвращаем reagents (#2360)

Co-authored-by: UEDCommander <[email protected]>
  • Loading branch information
Teteshnik1 and UEDCommander authored Jun 17, 2024
1 parent c1e9ba3 commit 5048a0b
Show file tree
Hide file tree
Showing 16 changed files with 1,350 additions and 21 deletions.
1 change: 1 addition & 0 deletions code/game/objects/items/devices/multitool.dm
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

origin_tech = list(TECH_MAGNET = 1, TECH_ENGINEERING = 1)

var/buffer
var/buffer_name
var/atom/buffer_object

Expand Down
Binary file modified icons/obj/telescience.dmi
Binary file not shown.
1 change: 0 additions & 1 deletion mods/antagonists/_antagonists.dme
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
#include "code/revolutionary.dm"
#include "code/operative.dm"
#include "code/traitor.dm"
#include "code/teleportation.dm"
#include "code/uplink.dm"

#endif
16 changes: 1 addition & 15 deletions mods/antagonists/code/teleportation.dm
Original file line number Diff line number Diff line change
@@ -1,15 +1 @@
/proc/animated_teleportation(atom/movable/target, atom/anchor)
if(ismob(target))
to_chat(target, SPAN_WARNING("You feel like something pulling you in bluespace."))
var/obj/temporary/A = new(get_turf(target), 24.5, 'mods/antagonists/icons/effects/bs_silk.dmi', "silc_teleport_back")
target.set_dir(2)
target.forceMove(A)
addtimer(new Callback(GLOBAL_PROC, GLOBAL_PROC_REF(animated_teleportation_ending), target, anchor), 23)

/proc/animated_teleportation_ending(atom/movable/target, atom/anchor)
target.set_dir(2)
target.forceMove(new /obj/temporary(get_turf(anchor), 26.5, 'mods/antagonists/icons/effects/bs_silk.dmi', "silc_get_hub"))
addtimer(new Callback(GLOBAL_PROC, GLOBAL_PROC_REF(finalize_animated_teleportation), target, anchor), 24)

/proc/finalize_animated_teleportation(atom/movable/target, atom/anchor)
target.dropInto(get_turf(anchor))
// delete
9 changes: 7 additions & 2 deletions mods/guns/code/energy.dm
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,13 @@
/obj/item/gun/energy/confuseray/secure
name = "disorientator"
desc = "The W-T Mk. 6 Disorientator fitted with an NT1017 secure fire chip. It has a NanoTrasen logo on the grip."
icon = 'mods/guns/icons/obj/confuseray_secure.dmi'
icon_state = "confusesecure"
icon = 'icons/obj/guns/confuseray.dmi'
item_icons = list(
slot_l_hand_str = 'mods/guns/icons/mob/lefthand_guns_cadet.dmi',
slot_r_hand_str = 'mods/guns/icons/mob/righthand_guns_cadet.dmi',
)
icon_state = "confuseray"
item_state = "confuseray"
req_access = list(list(access_brig, access_bridge))

/obj/item/gun/energy/stunrevolver/secure
Expand Down
Binary file added mods/guns/icons/mob/lefthand_guns_cadet.dmi
Binary file not shown.
Binary file added mods/guns/icons/mob/righthand_guns_cadet.dmi
Binary file not shown.
7 changes: 6 additions & 1 deletion mods/machinery/_machinery.dme
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@
#include "code/gravity_generator/main.dm"
#include "code/gravity_generator/wires.dm"
#include "code/sealing_generator.dm"
#include "code\telepads.dm"
#include "code/telepads.dm"
#include "code/tele_pads.dm"
#include "code/gps.dm"
#include "code/bcrystal.dm"
#include "code/telesci_computer.dm"
#include "code/tele.dm"

#endif
57 changes: 57 additions & 0 deletions mods/machinery/code/bcrystal.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
// Bluespace crystals, used in telescience and when crushed it will blink you to a random turf.

/obj/item/bluespace_crystal
name = "bluespace crystal"
desc = "A glowing bluespace crystal, not much is known about how they work. It looks very delicate."
icon = 'icons/obj/telescience.dmi'
icon_state = "bluespace_crystal"
w_class = 1
origin_tech = list(TECH_BLUESPACE = 4, TECH_MATERIAL = 3)
var/blink_range = 8 // The teleport range when crushed/thrown at someone.


/obj/item/bluespace_crystal/New()
..()
pixel_x = rand(-5, 5)
pixel_y = rand(-5, 5)
// create_reagents(10)
// reagents.add_reagent("bluespace_dust", blink_range)

/obj/item/bluespace_crystal/attack_self(mob/user)
user.visible_message("<span class='warning'>[user] crushes [src]!</span>", "<span class='danger'>You crush [src]!</span>")
var/datum/effect/spark_spread/sparks = new /datum/effect/spark_spread()
sparks.set_up(5, 0, get_turf(user))
sparks.start()
playsound(src.loc, "sparks", 50, 1)
playsound(src.loc, 'sound/effects/phasein.ogg', 25, 1)
blink_mob(user)
user.unEquip(src)
qdel(src)

/obj/item/bluespace_crystal/proc/blink_mob(mob/living/L)
var/turf/T = get_random_turf_in_range(L, blink_range, 1)
L.forceMove(T)
var/datum/effect/spark_spread/sparks = new /datum/effect/spark_spread()
sparks.set_up(5, 0, T)
sparks.start()

/obj/item/bluespace_crystal/throw_impact(atom/hit_atom)
if(!..()) // not caught in mid-air
visible_message("<span class='notice'>[src] fizzles and disappears upon impact!</span>")
var/turf/T = get_turf(hit_atom)
var/datum/effect/spark_spread/sparks = new /datum/effect/spark_spread()
sparks.set_up(5, 0, T)
sparks.start()
playsound(src.loc, "sparks", 50, 1)
if(isliving(hit_atom))
blink_mob(hit_atom)
playsound(T, 'sound/effects/phasein.ogg', 25, 1)
qdel(src)

// Artifical bluespace crystal, doesn't give you much research.

/obj/item/bluespace_crystal/artificial
name = "artificial bluespace crystal"
desc = "An artificially made bluespace crystal, it looks delicate."
origin_tech = list(TECH_BLUESPACE = 2)
blink_range = 4 // Not as good as the organic stuff!
95 changes: 95 additions & 0 deletions mods/machinery/code/gps.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
GLOBAL_LIST_EMPTY(GPS_list)

GLOBAL_LIST_EMPTY(gps_by_type)

/obj/item/device/gps
name = "global positioning system"
desc = "Helping lost spacemen find their way through the planets since 2016."
icon = 'icons/obj/telescience.dmi'
icon_state = "gps-c"
w_class = 2
slot_flags = SLOT_BELT
origin_tech = list(TECH_ENGINEERING = 2, TECH_DATA = 2, TECH_BLUESPACE = 2)
matter = list(MATERIAL_ALUMINIUM = 250, MATERIAL_STEEL = 250, MATERIAL_GLASS = 50)
var/gps_prefix = "COM"
var/gpstag = "COM0"
emped = 0
var/turf/locked_location

/obj/item/device/gps/Initialize()
. = ..()
GLOB.GPS_list += src
LAZYADD(GLOB.gps_by_type["[type]"], src)
gpstag = "[gps_prefix][LAZYLEN(GLOB.gps_by_type["[type]"])]"
name = "global positioning system ([gpstag])"
AddOverlays(image(icon, "working"))

/obj/item/device/gps/Destroy()
GLOB.GPS_list -= src
var/list/typelist = GLOB.gps_by_type["[type]"]
LAZYREMOVE(typelist, src)
return ..()

/obj/item/device/gps/emp_act(severity)
emped = 1
CutOverlays()
AddOverlays(image(icon, "emp"))
addtimer(new Callback(src, .proc/post_emp), 300)

/obj/item/device/gps/proc/post_emp()
emped = 0
CutOverlays()
AddOverlays(image(icon, "working"))

/obj/item/device/gps/attack_self(mob/user)

var/obj/item/device/gps/t = ""
var/gps_window_height = 110 + LAZYLEN(GLOB.GPS_list) * 20 // Variable window height, depending on how many GPS units there are to show
if(emped)
t += "ERROR"
else
t += "<BR><A href='?src=\ref[src];tag=1'>Set Tag</A> "
t += "<BR>Tag: [gpstag]"
if(locked_location?.loc)
t += "<BR>Bluespace coordinates saved: [locked_location.loc]"
gps_window_height += 20

for(var/obj/item/device/gps/G in GLOB.GPS_list)
var/turf/pos = get_turf(G)
var/area/gps_area = get_area(G)
var/tracked_gpstag = G.gpstag
if(G.emped == 1 || !pos)
t += "<BR>[tracked_gpstag]: ERROR"
else
t += "<BR>[tracked_gpstag]: [format_text(gps_area.name)] ([pos.x], [pos.y], [pos.z])"

var/datum/browser/popup = new(user, "GPS", name, 360, min(gps_window_height, 800))
popup.set_content(t)
popup.set_title_image(user.browse_rsc_icon(src.icon, src.icon_state))
popup.open()

/obj/item/device/gps/Topic(href, href_list)
..()
if(href_list["tag"] )
var/a = input("Please enter desired tag.", name, gpstag) as text
a = uppertext(copytext(sanitize(a), 1, 5))
if(src.loc == usr)
gpstag = a
name = "global positioning system ([gpstag])"
attack_self(usr)

/obj/item/device/gps/science
icon_state = "gps-s"
gps_prefix = "SCI"
gpstag = "SCI0"

/obj/item/device/gps/engineering
icon_state = "gps-e"
gps_prefix = "ENG"
gpstag = "ENG0"

/obj/item/device/gps/mining
icon_state = "gps-m"
gps_prefix = "MIN"
gpstag = "MIN0"
desc = "A positioning system helpful for rescuing trapped or injured miners, keeping one on you at all times while mining might just save your life."
15 changes: 15 additions & 0 deletions mods/machinery/code/tele.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/proc/animated_teleportation(atom/movable/target, atom/anchor)
if(ismob(target))
to_chat(target, SPAN_WARNING("You feel like something pulling you in bluespace."))
var/obj/temporary/A = new(get_turf(target), 24.5, 'mods/antagonists/icons/effects/bs_silk.dmi', "silc_teleport_back")
target.set_dir(2)
target.forceMove(A)
addtimer(new Callback(GLOBAL_PROC, GLOBAL_PROC_REF(animated_teleportation_ending), target, anchor), 23)

/proc/animated_teleportation_ending(atom/movable/target, atom/anchor)
target.set_dir(2)
target.forceMove(new /obj/temporary(get_turf(anchor), 26.5, 'mods/antagonists/icons/effects/bs_silk.dmi', "silc_get_hub"))
addtimer(new Callback(GLOBAL_PROC, GLOBAL_PROC_REF(finalize_animated_teleportation), target, anchor), 24)

/proc/finalize_animated_teleportation(atom/movable/target, atom/anchor)
target.dropInto(get_turf(anchor))
52 changes: 52 additions & 0 deletions mods/machinery/code/tele_pads.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
///SCI TELEPAD///
/obj/machinery/telepad
name = "telepad"
desc = "A bluespace telepad used for teleporting objects to and from a location."
icon = 'icons/obj/telescience.dmi'
icon_state = "pad-idle"
anchored = TRUE
use_power = 1
idle_power_usage = 200
active_power_usage = 5000
construct_state = /singleton/machine_construction/default/panel_closed
uncreated_component_parts = null
stat_immune = 0

var/efficiency

/obj/machinery/telepad/RefreshParts()
efficiency = total_component_rating_of_type(/obj/item/stock_parts/capacitor)

/obj/machinery/telepad/components_are_accessible(path)
return panel_open

/obj/machinery/telepad/use_tool(obj/item/tool, mob/living/user, list/click_params)
if(component_attackby(tool, user)) return TRUE
if(panel_open)
if(istype(tool, /obj/item/device/multitool))
var/obj/item/device/multitool/M = tool
M.buffer = src
to_chat(user, "<span class='caution'>You save the data in the [tool.name]'s buffer.</span>")
return
// Алмазная фокусирующая линза. Гы-гы
if(istype(tool, /obj/item/stack/material/diamond))
var/obj/item/stock_parts/building_material/material = get_component_of_type(/obj/item/stock_parts/building_material, TRUE)
if(material && material.number_of_type(/obj/item/stack/material/diamond)>0)
to_chat(user, "<span class='caution'>Machine have already installed \an [tool.name]</span>")
return
if(user.drop_from_inventory(tool))
install_component(tool)
return

else
if(istype(tool, /obj/item/device/multitool))
to_chat(user, "<span class='caution'>You should open [src]'s maintenance panel first.</span>")
return
.=..()

/obj/machinery/telepad/on_update_icon()
switch (panel_open)
if (1)
icon_state = "pad-idle-o"
if (0)
icon_state = "pad-idle"
38 changes: 36 additions & 2 deletions mods/machinery/code/telepads.dm
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
uncreated_component_parts = null

/obj/item/stock_parts/circuitboard/tele_pad
name = "circuit board (telepad)"
name = "circuit board (teleporter pad)"
board_type = "machine"
origin_tech = list(TECH_DATA = 4, TECH_BLUESPACE = 4)
build_path = /obj/machinery/tele_pad
Expand All @@ -20,7 +20,7 @@

/datum/design/circuit/tele_pad
name = "telepad machine"
id = "telepad"
id = "teleporter_pad"
req_tech = list(TECH_DATA = 4, TECH_BLUESPACE = 4)
build_path = /obj/item/stock_parts/circuitboard/tele_pad
sort_string = "MAAAA"
Expand All @@ -31,3 +31,37 @@
req_tech = list(TECH_DATA = 4, TECH_BLUESPACE = 4)
build_path = /obj/item/stock_parts/circuitboard/tele_projector
sort_string = "MAAAA"

/obj/item/stock_parts/circuitboard/telepad
name = "circuit board (telepad)"
board_type = "machine"
origin_tech = list(TECH_DATA = 4, TECH_ENGINEERING = 3, TECH_MATERIAL = 3, TECH_BLUESPACE = 4)
build_path = /obj/machinery/telepad
req_components = list(
/obj/item/bluespace_crystal = 2,
/obj/item/stock_parts/capacitor = 1
)
additional_spawn_components = list(
/obj/item/stock_parts/console_screen = 1,
/obj/item/stock_parts/keyboard = 1,
/obj/item/stock_parts/power/apc/buildable = 1
)

/obj/item/stock_parts/circuitboard/telesci_console
name = "circuit board (telescience console)"
build_path = /obj/machinery/computer/telescience
origin_tech = list(TECH_DATA = 3, TECH_BLUESPACE = 2)

/datum/design/circuit/telepad
name = "telepad"
id = "telepad"
req_tech = list(TECH_DATA = 4, TECH_ENGINEERING = 3, TECH_MATERIAL = 3, TECH_BLUESPACE = 4)
build_path = /obj/item/stock_parts/circuitboard/telepad
sort_string = "HAAAF"

/datum/design/circuit/telesci_console
name = "telepad control console"
id = "telesci_console"
req_tech = list(TECH_DATA = 3, TECH_BLUESPACE = 2)
build_path = /obj/item/stock_parts/circuitboard/telesci_console
sort_string = "HAAAD"
Loading

0 comments on commit 5048a0b

Please sign in to comment.