mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-07-19 20:06:28 +01:00
04bc9fbd13
this is a bit of https://github.com/cmss13-devs/cmss13/pull/8646 https://github.com/cmss13-devs/cmss13/pull/8875 https://github.com/cmss13-devs/cmss13/pull/8606 https://github.com/cmss13-devs/cmss13/pull/8607 https://github.com/cmss13-devs/cmss13/pull/8359 https://github.com/cmss13-devs/cmss13/pull/7860 ( and thus https://github.com/ParadiseSS13/Paradise/pull/25105 https://github.com/ParadiseSS13/Paradise/pull/25205 https://github.com/ParadiseSS13/Paradise/pull/25363 https://github.com/ParadiseSS13/Paradise/pull/26423 and https://github.com/ParadiseSS13/Paradise/pull/26433 ) https://github.com/tgstation/tgstation/pull/89766 in order to work properly - using the efficient storage method, instead of the byond json method - github pages needs to be enabled and built from the gh-pages branch. because yeah --------- Co-authored-by: harryob <55142896+harryob@users.noreply.github.com>
64 lines
2.3 KiB
Plaintext
64 lines
2.3 KiB
Plaintext
|
|
/obj/machinery/computer/artillerycontrol
|
|
var/reload = 180
|
|
name = "bluespace artillery control"
|
|
icon_state = "control_boxp1"
|
|
icon = 'icons/obj/machinery/particle_accelerator2.dmi'
|
|
density = 1
|
|
anchored = 1
|
|
|
|
/obj/machinery/computer/artillerycontrol/process()
|
|
if(src.reload<180)
|
|
src.reload++
|
|
|
|
/obj/machinery/computer/artillerycontrol/attack_hand(mob/user as mob)
|
|
user.set_machine(src)
|
|
var/dat = "<B>Bluespace Artillery Control:</B><BR>"
|
|
dat += "Locked on<BR>"
|
|
dat += "<B>Charge progress: [reload]/180:</B><BR>"
|
|
dat += "<A href='byond://?src=[REF(src)];fireArea=1'>Open Fire - Area</A><BR>"
|
|
dat += "<A href='byond://?src=[REF(src)];fireCords=1'>Open Fire - Coordinates</A><BR>"
|
|
dat += "Deployment of weapon authorized by <br>[SSatlas.current_map.company_name] Chief Naval Director<br><br>Remember, friendly fire is grounds for termination of your contract and life.<HR>"
|
|
user << browse(HTML_SKELETON(dat), "window=scroll")
|
|
onclose(user, "scroll")
|
|
return
|
|
|
|
/obj/machinery/computer/artillerycontrol/Topic(href, href_list, var/datum/ui_state/state = GLOB.default_state)
|
|
if(..())
|
|
return 1
|
|
|
|
if(href_list["fireArea"])
|
|
var/area/A = input("Area to jump bombard", "Open Fire") in get_sorted_areas()
|
|
var/turf/loc = pick(get_area_turfs(A))
|
|
announce_and_fire(loc, usr)
|
|
else if(href_list["fireCords"])
|
|
var/ix = text2num(input("X"))
|
|
var/iy = text2num(input("Y"))
|
|
var/iz = text2num(input("Z"))
|
|
if(!ix || !iy || !iz)
|
|
return
|
|
var/turf/T = get_turf(locate(ix, iy, iz))
|
|
announce_and_fire(T, usr)
|
|
|
|
/obj/machinery/computer/artillerycontrol/proc/announce_and_fire(var/turf/t, var/mob/user)
|
|
if(!istype(t))
|
|
return
|
|
if ((user.contents.Find(src) || (in_range(src, user) && istype(src.loc, /turf))) || (istype(user, /mob/living/silicon)))
|
|
if (user.stat || user.restrained()) return
|
|
if (src.reload < 180) return
|
|
if ((user.contents.Find(src) || (in_range(src, user) && istype(src.loc, /turf))) || (istype(user, /mob/living/silicon)))
|
|
command_announcement.Announce("Bluespace artillery fire detected. Brace for impact.")
|
|
sound_to(world, ('sound/effects/yamato_fire.ogg'))
|
|
message_admins("[key_name_admin(usr)] has launched an artillery strike.", 1)
|
|
explosion(t,2,5,11)
|
|
reload = 0
|
|
|
|
/obj/structure/artilleryplaceholder
|
|
name = "artillery"
|
|
icon = 'icons/obj/machinery/artillery.dmi'
|
|
anchored = 1
|
|
density = 1
|
|
|
|
/obj/structure/artilleryplaceholder/decorative
|
|
density = 0
|