mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-19 19:13:30 +01:00
Refactor honksquads
This commit is contained in:
@@ -1223,3 +1223,64 @@
|
||||
var/obj/item/radio/headset/R = H.l_ear
|
||||
if(istype(R))
|
||||
R.flags |= NODROP
|
||||
|
||||
/datum/outfit/admin/honksquad
|
||||
name = "Honksquad"
|
||||
|
||||
uniform = /obj/item/clothing/under/rank/clown
|
||||
mask = /obj/item/clothing/mask/gas/clown_hat
|
||||
back = /obj/item/storage/backpack/clown
|
||||
id = /obj/item/card/id/clown
|
||||
|
||||
backpack_contents = list(
|
||||
/obj/item/storage/box/survival = 1,
|
||||
/obj/item/bikehorn = 1,
|
||||
/obj/item/stamp/clown = 1,
|
||||
/obj/item/toy/crayon/rainbow = 1,
|
||||
/obj/item/reagent_containers/spray/waterflower = 1,
|
||||
/obj/item/reagent_containers/food/snacks/grown/banana = 1,
|
||||
)
|
||||
|
||||
shoes = /obj/item/clothing/shoes/clown_shoes
|
||||
suit = /obj/item/clothing/suit/storage/det_suit
|
||||
pda = /obj/item/pda/clown
|
||||
l_ear = /obj/item/radio/headset
|
||||
r_pocket = /obj/item/reagent_containers/food/pill/patch/jestosterone
|
||||
|
||||
/datum/outfit/admin/honksquad/pre_equip(mob/living/carbon/human/H, visualsOnly = FALSE)
|
||||
. = ..()
|
||||
if(H.gender == FEMALE)
|
||||
uniform = /obj/item/clothing/under/rank/clown/sexy
|
||||
mask = /obj/item/clothing/mask/gas/clown_hat/sexy
|
||||
|
||||
if(prob(50))
|
||||
backpack_contents.Add(/obj/item/gun/energy/clown = 1)
|
||||
else
|
||||
backpack_contents.Add(/obj/item/gun/throw/piecannon = 1)
|
||||
|
||||
/datum/outfit/admin/honksquad/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE)
|
||||
. = ..()
|
||||
if(visualsOnly)
|
||||
return
|
||||
|
||||
// Setup their clumsy gene
|
||||
H.dna.SetSEState(GLOB.clumsyblock, TRUE)
|
||||
H.check_mutations = TRUE
|
||||
|
||||
// Setup their headset
|
||||
var/obj/item/radio/R = H.l_ear
|
||||
if(istype(R))
|
||||
R.set_frequency(DTH_FREQ) // Clowns can be part of "special operations"
|
||||
|
||||
// And their PDA
|
||||
var/obj/item/pda/P = H.wear_pda
|
||||
if(istype(P))
|
||||
P.owner = H.real_name
|
||||
P.ownjob = "Clown"
|
||||
P.name = "PDA-[H.real_name] ([P.ownjob])"
|
||||
|
||||
// And their ID
|
||||
var/obj/item/card/id/I = H.wear_id
|
||||
if(istype(I))
|
||||
apply_to_card(I, H, list(ACCESS_CLOWN), "Clown")
|
||||
H.sec_hud_set_ID()
|
||||
|
||||
@@ -1,110 +0,0 @@
|
||||
#define SALVAGE_SHIP_MOVE_TIME 300
|
||||
#define SALVAGE_SHIP_COOLDOWN 800
|
||||
|
||||
/obj/machinery/computer/salvage_ship
|
||||
name = "salvage ship terminal"
|
||||
icon = 'icons/obj/computer.dmi'
|
||||
icon_keyboard = "syndie_key"
|
||||
icon_screen = "syndishuttle"
|
||||
req_access = list(ACCESS_SALVAGE_CAPTAIN)
|
||||
var/area/curr_location
|
||||
var/moving = 0
|
||||
var/lastMove = 0
|
||||
|
||||
|
||||
/obj/machinery/computer/salvage_ship/New()
|
||||
. = ..()
|
||||
curr_location = locate(/area/shuttle/salvage/start)
|
||||
|
||||
|
||||
/obj/machinery/computer/salvage_ship/proc/salvage_move_to(area/destination as area)
|
||||
if(moving) return
|
||||
if(lastMove + SALVAGE_SHIP_COOLDOWN > world.time) return
|
||||
var/area/dest_location = locate(destination)
|
||||
if(curr_location == dest_location) return
|
||||
|
||||
moving = 1
|
||||
lastMove = world.time
|
||||
|
||||
if(curr_location.z != dest_location.z)
|
||||
var/area/transit_location = locate(/area/shuttle/salvage/transit)
|
||||
curr_location.move_contents_to(transit_location)
|
||||
curr_location = transit_location
|
||||
sleep(SALVAGE_SHIP_MOVE_TIME)
|
||||
|
||||
curr_location.move_contents_to(dest_location)
|
||||
curr_location = dest_location
|
||||
moving = 0
|
||||
return 1
|
||||
|
||||
/obj/machinery/computer/salvage_ship/attack_ai(mob/user as mob)
|
||||
src.add_hiddenprint(user)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/machinery/computer/salvage_ship/attack_hand(mob/user as mob)
|
||||
if(!allowed(user))
|
||||
to_chat(user, "<span class='warning'>Access Denied</span>")
|
||||
return
|
||||
|
||||
user.set_machine(src)
|
||||
|
||||
var/dat = {"Location: [curr_location]<br>
|
||||
Ready to move[max(lastMove + SALVAGE_SHIP_COOLDOWN - world.time, 0) ? " in [max(round((lastMove + SALVAGE_SHIP_COOLDOWN - world.time) * 0.1), 0)] seconds" : ": now"]<br>
|
||||
<a href='?src=[UID()];start=1'>Middle of Nowhere</a><br>
|
||||
<a href='?src=[UID()];arrivals=1'>Station Auxiliary Docking</a> |
|
||||
<a href='?src=[UID()];north=1'>North of the Station</a> |
|
||||
<a href='?src=[UID()];east=1'>East of the Station</a> |
|
||||
<a href='?src=[UID()];south=1'>South of the Station</a><br>
|
||||
<a href='?src=[UID()];trading_post=1'>Trading Post</a><br>
|
||||
<a href='?src=[UID()];clown_asteroid=1'>Clown Asteroid</a> |
|
||||
<a href='?src=[UID()];derelict=1'>Derelict Station</a> |
|
||||
<a href='?src=[UID()];djstation=1'>Ruskie DJ Station</a><br>
|
||||
<a href='?src=[UID()];commssat=1'>Communications Satellite</a> |
|
||||
<a href='?src=[UID()];abandoned_ship=1'>Abandoned Ship</a><br>
|
||||
<a href='?src=[user.UID()];mach_close=computer'>Close</a>"}
|
||||
|
||||
user << browse(dat, "window=computer;size=575x450")
|
||||
onclose(user, "computer")
|
||||
return
|
||||
|
||||
|
||||
/obj/machinery/computer/salvage_ship/Topic(href, href_list)
|
||||
if(..())
|
||||
return 1
|
||||
if(!isliving(usr)) return
|
||||
var/mob/living/user = usr
|
||||
|
||||
if(in_range(src, user) || istype(user, /mob/living/silicon))
|
||||
user.set_machine(src)
|
||||
|
||||
if(href_list["salvage"])
|
||||
salvage_move_to(/area/shuttle/salvage/start)
|
||||
else if(href_list["start"])
|
||||
salvage_move_to(/area/shuttle/salvage/start)
|
||||
else if(href_list["arrivals"])
|
||||
salvage_move_to(/area/shuttle/salvage/arrivals)
|
||||
else if(href_list["derelict"])
|
||||
salvage_move_to(/area/shuttle/salvage/derelict)
|
||||
else if(href_list["djstation"])
|
||||
salvage_move_to(/area/shuttle/salvage/djstation)
|
||||
else if(href_list["north"])
|
||||
salvage_move_to(/area/shuttle/salvage/north)
|
||||
else if(href_list["east"])
|
||||
salvage_move_to(/area/shuttle/salvage/east)
|
||||
else if(href_list["south"])
|
||||
salvage_move_to(/area/shuttle/salvage/south)
|
||||
else if(href_list["commssat"])
|
||||
salvage_move_to(/area/shuttle/salvage/commssat)
|
||||
else if(href_list["abandoned_ship"])
|
||||
salvage_move_to(/area/shuttle/salvage/abandoned_ship)
|
||||
else if(href_list["clown_asteroid"])
|
||||
salvage_move_to(/area/shuttle/salvage/clown_asteroid)
|
||||
else if(href_list["trading_post"])
|
||||
salvage_move_to(/area/shuttle/salvage/trading_post)
|
||||
|
||||
add_fingerprint(usr)
|
||||
updateUsrDialog()
|
||||
return
|
||||
|
||||
/obj/machinery/computer/salvage_ship/bullet_act(obj/item/projectile/Proj)
|
||||
visible_message("[Proj] ricochets off [src]!")
|
||||
@@ -59,15 +59,6 @@
|
||||
if(X.prefs.sound & SOUND_ADMINHELP)
|
||||
SEND_SOUND(X, sound('sound/effects/adminhelp.ogg'))
|
||||
|
||||
/proc/HONK_announce(text, mob/Sender)
|
||||
var/msg = sanitize(copytext(text, 1, MAX_MESSAGE_LEN))
|
||||
msg = "<span class='boldnotice'><font color=pink>HONK: </font>[key_name(Sender, 1)] ([ADMIN_PP(Sender,"PP")]) ([ADMIN_VV(Sender,"VV")]) ([ADMIN_TP(Sender,"TP")]) ([ADMIN_SM(Sender,"SM")]) ([admin_jump_link(Sender)]) ([ADMIN_BSA(Sender,"BSA")]) (<A HREF='?_src_=holder;HONKReply=[Sender.UID()]'>RPLY</A>):</span> [msg]"
|
||||
for(var/client/X in GLOB.admins)
|
||||
if(R_EVENT & X.holder.rights)
|
||||
to_chat(X, msg)
|
||||
if(X.prefs.sound & SOUND_ADMINHELP)
|
||||
SEND_SOUND(X, sound('sound/effects/adminhelp.ogg'))
|
||||
|
||||
/proc/ERT_Announce(text, mob/Sender, repeat_warning)
|
||||
var/msg = sanitize(copytext(text, 1, MAX_MESSAGE_LEN))
|
||||
msg = "<span class='adminnotice'><b><font color=orange>ERT REQUEST: </font>[key_name(Sender, 1)] ([ADMIN_PP(Sender,"PP")]) ([ADMIN_VV(Sender,"VV")]) ([ADMIN_TP(Sender,"TP")]) ([ADMIN_SM(Sender,"SM")]) ([admin_jump_link(Sender)]) ([ADMIN_BSA(Sender,"BSA")]) (<A HREF='?_src_=holder;ErtReply=[Sender.UID()]'>RESPOND</A>):</b> [msg]</span>"
|
||||
|
||||
@@ -693,7 +693,6 @@
|
||||
#include "code\game\machinery\computer\power.dm"
|
||||
#include "code\game\machinery\computer\prisoner.dm"
|
||||
#include "code\game\machinery\computer\robot.dm"
|
||||
#include "code\game\machinery\computer\salvage_ship.dm"
|
||||
#include "code\game\machinery\computer\security.dm"
|
||||
#include "code\game\machinery\computer\sm_monitor.dm"
|
||||
#include "code\game\machinery\computer\station_alert.dm"
|
||||
|
||||
Reference in New Issue
Block a user