Skip to content

Commit

Permalink
[TWEAK] fix telesci GPS and fix recharger (#2369)
Browse files Browse the repository at this point in the history
  • Loading branch information
Teteshnik1 authored Jun 18, 2024
1 parent ab4cbcd commit c0179b4
Show file tree
Hide file tree
Showing 7 changed files with 65 additions and 14 deletions.
2 changes: 2 additions & 0 deletions code/game/machinery/cell_charger.dm
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
power_channel = EQUIP
var/obj/item/cell/charging = null
var/chargelevel = -1
construct_state = /singleton/machine_construction/default/panel_closed
uncreated_component_parts = null

/obj/machinery/cell_charger/on_update_icon()
icon_state = "ccharger[charging ? 1 : 0]"
Expand Down
2 changes: 2 additions & 0 deletions code/game/machinery/recharger.dm
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
var/icon_state_charging = "recharger1"
var/icon_state_idle = "recharger0" //also when unpowered
var/portable = 1
construct_state = /singleton/machine_construction/default/panel_closed
uncreated_component_parts = null

/obj/machinery/recharger/use_tool(obj/item/G, mob/living/user, list/click_params)
var/allowed = 0
Expand Down
10 changes: 9 additions & 1 deletion code/modules/research/designs/designs_bluespace.dm
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,12 @@
materials = list(MATERIAL_GOLD = 3000, MATERIAL_DIAMOND = 1500, MATERIAL_URANIUM = 250, MATERIAL_PLASTIC = 250)
build_path = /obj/item/storage/backpack/holding
sort_string = "VAFAA"

// SIERRA ADD
/datum/design/item/telesci/gps
name = "Telescience GPS"
desc = "Required for calculations in the telescience field."
req_tech = list(TECH_ENGINEERING = 3, TECH_BLUESPACE = 4)
materials = list(MATERIAL_STEEL = 300, MATERIAL_PLASTIC = 250)
build_path = /obj/item/device/telesci/gps
sort_string = "VACAA"
// SIERRA ADD-END
24 changes: 12 additions & 12 deletions mods/machinery/code/gps.dm
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ GLOBAL_LIST_EMPTY(GPS_list)

GLOBAL_LIST_EMPTY(gps_by_type)

/obj/item/device/gps
name = "global positioning system"
/obj/item/device/telesci/gps
name = "telesci positioning system"
desc = "Helping lost spacemen find their way through the planets since 2016."
icon = 'icons/obj/telescience.dmi'
icon_state = "gps-c"
Expand All @@ -13,18 +13,18 @@ GLOBAL_LIST_EMPTY(gps_by_type)
matter = list(MATERIAL_ALUMINIUM = 250, MATERIAL_STEEL = 250, MATERIAL_GLASS = 50)
var/gps_prefix = "COM"
var/gpstag = "COM0"
emped = 0
var/emped = 0
var/turf/locked_location

/obj/item/device/gps/Initialize()
/obj/item/device/telesci/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()
/obj/item/device/telesci/gps/Destroy()
GLOB.GPS_list -= src
var/list/typelist = GLOB.gps_by_type["[type]"]
LAZYREMOVE(typelist, src)
Expand All @@ -41,9 +41,9 @@ GLOBAL_LIST_EMPTY(gps_by_type)
CutOverlays()
AddOverlays(image(icon, "working"))

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

var/obj/item/device/gps/t = ""
var/obj/item/device/telesci/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"
Expand All @@ -54,7 +54,7 @@ GLOBAL_LIST_EMPTY(gps_by_type)
t += "<BR>Bluespace coordinates saved: [locked_location.loc]"
gps_window_height += 20

for(var/obj/item/device/gps/G in GLOB.GPS_list)
for(var/obj/item/device/telesci/gps/G in GLOB.GPS_list)
var/turf/pos = get_turf(G)
var/area/gps_area = get_area(G)
var/tracked_gpstag = G.gpstag
Expand All @@ -68,7 +68,7 @@ GLOBAL_LIST_EMPTY(gps_by_type)
popup.set_title_image(user.browse_rsc_icon(src.icon, src.icon_state))
popup.open()

/obj/item/device/gps/Topic(href, href_list)
/obj/item/device/telesci/gps/Topic(href, href_list)
..()
if(href_list["tag"] )
var/a = input("Please enter desired tag.", name, gpstag) as text
Expand All @@ -78,17 +78,17 @@ GLOBAL_LIST_EMPTY(gps_by_type)
name = "global positioning system ([gpstag])"
attack_self(usr)

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

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

/obj/item/device/gps/mining
/obj/item/device/telesci/gps/mining
icon_state = "gps-m"
gps_prefix = "MIN"
gpstag = "MIN0"
Expand Down
2 changes: 1 addition & 1 deletion mods/machinery/code/telesci_computer.dm
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
var/starting_crystals = 0 //Edit this on the map, seriously.
var/max_crystals = 5
var/list/crystals = list()
var/obj/item/device/gps/inserted_gps
var/obj/item/device/telesci/gps/inserted_gps

/obj/machinery/computer/telescience/Destroy()
eject()
Expand Down
1 change: 1 addition & 0 deletions mods/utility_items/_utility_items.dme
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@
#include "code/noose.dm"
#include "code/wires.dm"
#include "code/reagents.dm"
#include "code/cell_charger.dm"

#endif
38 changes: 38 additions & 0 deletions mods/utility_items/code/cell_charger.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
/obj/item/stock_parts/circuitboard/cell_charger
name = "circuit board (cell_charger)"
board_type = "machine"
origin_tech = list(TECH_DATA = 4, TECH_ENGINEERING = 3)
build_path = /obj/machinery/cell_charger

/obj/item/stock_parts/circuitboard/recharger
name = "circuit board (recharger)"
board_type = "machine"
origin_tech = list(TECH_DATA = 2, TECH_ENGINEERING = 4)
build_path = /obj/machinery/recharger

/obj/item/stock_parts/circuitboard/wallcharger
name = "circuit board (wall recharger)"
board_type = "machine"
origin_tech = list(TECH_DATA = 4, TECH_ENGINEERING = 5)
build_path = /obj/machinery/recharger/wallcharger

/datum/design/circuit/cell_charger
name = "cell charger"
id = "cellcharger"
req_tech = list(TECH_DATA = 5, TECH_ENGINEERING = 3)
build_path = /obj/item/stock_parts/circuitboard/cell_charger
sort_string = "BOOOB"

/datum/design/circuit/recharger
name = "recharger"
id = "recharger"
req_tech = list(TECH_DATA = 3, TECH_ENGINEERING = 5)
build_path = /obj/item/stock_parts/circuitboard/recharger
sort_string = "BOBOB"

/datum/design/circuit/wallcharger
name = "wall recharger"
id = "wallrecharger"
req_tech = list(TECH_DATA = 4, TECH_ENGINEERING = 6)
build_path = /obj/item/stock_parts/circuitboard/wallcharger
sort_string = "BBOBO"

0 comments on commit c0179b4

Please sign in to comment.