forked from Baystation12/Baystation12
-
Notifications
You must be signed in to change notification settings - Fork 70
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Возвращаю телесало, чиним пистолет кадета, исправляем ошибку в назван…
…ие платы, возвращаем reagents (#2360) Co-authored-by: UEDCommander <[email protected]>
- Loading branch information
1 parent
c1e9ba3
commit 5048a0b
Showing
16 changed files
with
1,350 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.