mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-22 11:38:12 +01:00
Merge branch 'dev' of https://github.com/Baystation12/Baystation12 into newmalf-merge
This commit is contained in:
Executable → Regular
+31
-15
@@ -542,7 +542,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
if (!ui)
|
||||
// the ui does not exist, so we'll create a new() one
|
||||
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
|
||||
ui = new(user, src, ui_key, "pda.tmpl", title, 520, 400)
|
||||
ui = new(user, src, ui_key, "pda.tmpl", title, 520, 400, state = inventory_state)
|
||||
// when the ui is first opened this is the data it will use
|
||||
|
||||
ui.load_cached_data(ManifestJSON)
|
||||
@@ -617,16 +617,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
ownrank = id.rank
|
||||
name = "PDA-[owner] ([ownjob])"
|
||||
if("Eject")//Ejects the cart, only done from hub.
|
||||
if (!isnull(cartridge))
|
||||
var/turf/T = loc
|
||||
if(ismob(T))
|
||||
T = T.loc
|
||||
cartridge.loc = T
|
||||
mode = 0
|
||||
scanmode = 0
|
||||
if (cartridge.radio)
|
||||
cartridge.radio.hostpda = null
|
||||
cartridge = null
|
||||
verb_remove_cartridge()
|
||||
|
||||
//MENU FUNCTIONS===================================
|
||||
|
||||
@@ -825,7 +816,8 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
difficulty += P.cartridge.access_engine
|
||||
difficulty += P.cartridge.access_clown
|
||||
difficulty += P.cartridge.access_janitor
|
||||
difficulty += 3 * P.hidden_uplink
|
||||
if(P.hidden_uplink)
|
||||
difficulty += 3
|
||||
|
||||
if(prob(difficulty))
|
||||
U.show_message("\red An error flashes on your [src].", 1)
|
||||
@@ -946,7 +938,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
j = prob(10)
|
||||
|
||||
if(j) //This kills the PDA
|
||||
P.Del()
|
||||
qdel(P)
|
||||
if(message)
|
||||
message += "It melts in a puddle of plastic."
|
||||
else
|
||||
@@ -1119,6 +1111,30 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
else
|
||||
usr << "<span class='notice'>You cannot do this while restrained.</span>"
|
||||
|
||||
/obj/item/device/pda/verb/verb_remove_cartridge()
|
||||
set category = "Object"
|
||||
set name = "Remove cartridge"
|
||||
set src in usr
|
||||
|
||||
if(issilicon(usr))
|
||||
return
|
||||
|
||||
if (can_use(usr) && !isnull(cartridge))
|
||||
var/turf/T = get_turf(src)
|
||||
cartridge.loc = T
|
||||
if (ismob(loc))
|
||||
var/mob/M = loc
|
||||
M.put_in_hands(cartridge)
|
||||
else
|
||||
cartridge.loc = get_turf(src)
|
||||
mode = 0
|
||||
scanmode = 0
|
||||
if (cartridge.radio)
|
||||
cartridge.radio.hostpda = null
|
||||
cartridge = null
|
||||
usr << "<span class='notice'>You remove \the [cartridge] from the [name].</span>"
|
||||
else
|
||||
usr << "<span class='notice'>You cannot do this while restrained.</span>"
|
||||
|
||||
/obj/item/device/pda/proc/id_check(mob/user as mob, choice as num)//To check for IDs; 1 for in-pda use, 2 for out of pda use.
|
||||
if(choice == 1)
|
||||
@@ -1224,7 +1240,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
if ( !(C:blood_DNA) )
|
||||
user << "\blue No blood found on [C]"
|
||||
if(C:blood_DNA)
|
||||
del(C:blood_DNA)
|
||||
qdel(C:blood_DNA)
|
||||
else
|
||||
user << "\blue Blood found on [C]. Analysing..."
|
||||
spawn(15)
|
||||
@@ -1354,7 +1370,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
explosion(T, 0, 0, 1, rand(1,2))
|
||||
return
|
||||
|
||||
/obj/item/device/pda/Del()
|
||||
/obj/item/device/pda/Destroy()
|
||||
PDAs -= src
|
||||
if (src.id && prob(90)) //IDs are kept in 90% of the cases
|
||||
src.id.loc = get_turf(src.loc)
|
||||
|
||||
@@ -58,10 +58,9 @@
|
||||
icon_state = "cart-s"
|
||||
access_security = 1
|
||||
|
||||
/obj/item/weapon/cartridge/security/New()
|
||||
/obj/item/weapon/cartridge/security/initialize()
|
||||
radio = new /obj/item/radio/integrated/beepsky(src)
|
||||
..()
|
||||
spawn(5)
|
||||
radio = new /obj/item/radio/integrated/beepsky(src)
|
||||
|
||||
/obj/item/weapon/cartridge/detective
|
||||
name = "\improper D.E.T.E.C.T. cartridge"
|
||||
@@ -102,6 +101,7 @@
|
||||
/obj/item/weapon/cartridge/signal
|
||||
name = "generic signaler cartridge"
|
||||
desc = "A data cartridge with an integrated radio signaler module."
|
||||
var/qdeled = 0
|
||||
|
||||
/obj/item/weapon/cartridge/signal/science
|
||||
name = "\improper Signal Ace 2 cartridge"
|
||||
@@ -110,12 +110,13 @@
|
||||
access_reagent_scanner = 1
|
||||
access_atmos = 1
|
||||
|
||||
/obj/item/weapon/cartridge/signal/New()
|
||||
/obj/item/weapon/cartridge/signal/initialize()
|
||||
radio = new /obj/item/radio/integrated/signal(src)
|
||||
..()
|
||||
|
||||
/obj/item/weapon/cartridge/signal/Destroy()
|
||||
qdel(radio)
|
||||
..()
|
||||
spawn(5)
|
||||
radio = new /obj/item/radio/integrated/signal(src)
|
||||
|
||||
|
||||
|
||||
/obj/item/weapon/cartridge/quartermaster
|
||||
name = "\improper Space Parts & Space Vendors cartridge"
|
||||
@@ -123,10 +124,9 @@
|
||||
icon_state = "cart-q"
|
||||
access_quartermaster = 1
|
||||
|
||||
/obj/item/weapon/cartridge/quartermaster/New()
|
||||
/obj/item/weapon/cartridge/quartermaster/initialize()
|
||||
radio = new /obj/item/radio/integrated/mule(src)
|
||||
..()
|
||||
spawn(5)
|
||||
radio = new /obj/item/radio/integrated/mule(src)
|
||||
|
||||
/obj/item/weapon/cartridge/head
|
||||
name = "\improper Easy-Record DELUXE"
|
||||
@@ -141,10 +141,8 @@
|
||||
access_janitor = 1
|
||||
access_security = 1
|
||||
|
||||
/obj/item/weapon/cartridge/hop/New()
|
||||
..()
|
||||
spawn(5)
|
||||
radio = new /obj/item/radio/integrated/mule(src)
|
||||
/obj/item/weapon/cartridge/hop/initialize()
|
||||
radio = new /obj/item/radio/integrated/mule(src)
|
||||
|
||||
/obj/item/weapon/cartridge/hos
|
||||
name = "\improper R.O.B.U.S.T. DELUXE"
|
||||
@@ -152,10 +150,9 @@
|
||||
access_status_display = 1
|
||||
access_security = 1
|
||||
|
||||
/obj/item/weapon/cartridge/hos/New()
|
||||
/obj/item/weapon/cartridge/hos/initialize()
|
||||
radio = new /obj/item/radio/integrated/beepsky(src)
|
||||
..()
|
||||
spawn(5)
|
||||
radio = new /obj/item/radio/integrated/beepsky(src)
|
||||
|
||||
/obj/item/weapon/cartridge/ce
|
||||
name = "\improper Power-On DELUXE"
|
||||
@@ -178,10 +175,9 @@
|
||||
access_reagent_scanner = 1
|
||||
access_atmos = 1
|
||||
|
||||
/obj/item/weapon/cartridge/rd/New()
|
||||
/obj/item/weapon/cartridge/rd/initialize()
|
||||
radio = new /obj/item/radio/integrated/signal(src)
|
||||
..()
|
||||
spawn(5)
|
||||
radio = new /obj/item/radio/integrated/signal(src)
|
||||
|
||||
/obj/item/weapon/cartridge/captain
|
||||
name = "\improper Value-PAK cartridge"
|
||||
@@ -331,7 +327,7 @@
|
||||
beepskyData["botstatus"] = list("loca" = null, "mode" = -1)
|
||||
var/botsCount=0
|
||||
if(SC.botlist && SC.botlist.len)
|
||||
for(var/obj/machinery/bot/B in SC.botlist)
|
||||
for(var/mob/living/bot/B in SC.botlist)
|
||||
botsCount++
|
||||
if(B.loc)
|
||||
botsData[++botsData.len] = list("Name" = sanitize(B.name), "Location" = sanitize(B.loc.loc.name), "ref" = "\ref[B]")
|
||||
@@ -465,7 +461,7 @@
|
||||
BucketData[++BucketData.len] = list("x" = 0, "y" = 0, dir=null, status = null)
|
||||
|
||||
var/CbotData[0]
|
||||
for(var/obj/machinery/bot/cleanbot/B in world)
|
||||
for(var/mob/living/bot/cleanbot/B in world)
|
||||
var/turf/bl = get_turf(B)
|
||||
if(bl)
|
||||
if(bl.z != cl.z)
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
|
||||
/obj/item/radio/integrated/beepsky
|
||||
var/list/botlist = null // list of bots
|
||||
var/obj/machinery/bot/secbot/active // the active bot; if null, show bot list
|
||||
var/mob/living/bot/secbot/active // the active bot; if null, show bot list
|
||||
var/list/botstatus // the status signal sent by the bot
|
||||
|
||||
var/control_freq = AI_FREQ
|
||||
@@ -99,6 +99,12 @@
|
||||
post_signal(control_freq, "command", "summon", "active", active, "target", get_turf(PDA) , s_filter = RADIO_SECBOT)
|
||||
post_signal(control_freq, "command", "bot_status", "active", active, s_filter = RADIO_SECBOT)
|
||||
|
||||
|
||||
/obj/item/radio/integrated/beepsky/Destroy()
|
||||
if(radio_controller)
|
||||
radio_controller.remove_object(src, control_freq)
|
||||
..()
|
||||
|
||||
/obj/item/radio/integrated/mule
|
||||
var/list/botlist = null // list of bots
|
||||
var/obj/machinery/bot/mulebot/active // the active bot; if null, show bot list
|
||||
@@ -211,12 +217,10 @@
|
||||
var/last_transmission
|
||||
var/datum/radio_frequency/radio_connection
|
||||
|
||||
New()
|
||||
..()
|
||||
if(radio_controller)
|
||||
initialize()
|
||||
|
||||
initialize()
|
||||
if(!radio_controller)
|
||||
return
|
||||
|
||||
if (src.frequency < 1441 || src.frequency > 1489)
|
||||
src.frequency = sanitize_frequency(src.frequency)
|
||||
|
||||
@@ -245,3 +249,8 @@
|
||||
radio_connection.post_signal(src, signal)
|
||||
|
||||
return
|
||||
|
||||
/obj/item/radio/integrated/signal/Destroy()
|
||||
if(radio_controller)
|
||||
radio_controller.remove_object(src, frequency)
|
||||
..()
|
||||
|
||||
@@ -41,25 +41,25 @@
|
||||
if(active_dummy)
|
||||
eject_all()
|
||||
playsound(get_turf(src), 'sound/effects/pop.ogg', 100, 1, -6)
|
||||
del(active_dummy)
|
||||
qdel(active_dummy)
|
||||
active_dummy = null
|
||||
usr << "\blue You deactivate the [src]."
|
||||
var/obj/effect/overlay/T = new/obj/effect/overlay(get_turf(src))
|
||||
var/obj/effect/overlay/T = PoolOrNew(/obj/effect/overlay, get_turf(src))
|
||||
T.icon = 'icons/effects/effects.dmi'
|
||||
flick("emppulse",T)
|
||||
spawn(8) T.delete()
|
||||
spawn(8) qdel(T)
|
||||
else
|
||||
playsound(get_turf(src), 'sound/effects/pop.ogg', 100, 1, -6)
|
||||
var/obj/O = new saved_item(src)
|
||||
if(!O) return
|
||||
var/obj/effect/dummy/chameleon/C = new/obj/effect/dummy/chameleon(usr.loc)
|
||||
var/obj/effect/dummy/chameleon/C = PoolOrNew(/obj/effect/dummy/chameleon, usr.loc)
|
||||
C.activate(O, usr, saved_icon, saved_icon_state, saved_overlays, src)
|
||||
del(O)
|
||||
qdel(O)
|
||||
usr << "\blue You activate the [src]."
|
||||
var/obj/effect/overlay/T = new/obj/effect/overlay(get_turf(src))
|
||||
T.icon = 'icons/effects/effects.dmi'
|
||||
flick("emppulse",T)
|
||||
spawn(8) T.delete()
|
||||
spawn(8) qdel(T)
|
||||
|
||||
/obj/item/device/chameleon/proc/disrupt(var/delete_dummy = 1)
|
||||
if(active_dummy)
|
||||
@@ -69,7 +69,7 @@
|
||||
spark_system.start()
|
||||
eject_all()
|
||||
if(delete_dummy)
|
||||
del(active_dummy)
|
||||
qdel(active_dummy)
|
||||
active_dummy = null
|
||||
can_use = 0
|
||||
spawn(50) can_use = 1
|
||||
@@ -140,6 +140,6 @@
|
||||
step(src, direction)
|
||||
return
|
||||
|
||||
/obj/effect/dummy/chameleon/Del()
|
||||
/obj/effect/dummy/chameleon/Destroy()
|
||||
master.disrupt(0)
|
||||
..()
|
||||
|
||||
@@ -103,7 +103,7 @@
|
||||
animation.master = user
|
||||
flick("blspell", animation)
|
||||
sleep(5)
|
||||
del(animation)
|
||||
qdel(animation)
|
||||
|
||||
if(!flashfail)
|
||||
flick("flash2", src)
|
||||
@@ -154,7 +154,7 @@
|
||||
animation.master = user
|
||||
flick("blspell", animation)
|
||||
sleep(5)
|
||||
del(animation)
|
||||
qdel(animation)
|
||||
|
||||
for(var/mob/living/carbon/M in oviewers(3, null))
|
||||
if(prob(50))
|
||||
|
||||
@@ -97,6 +97,10 @@
|
||||
mode = "white"
|
||||
mode_nice = "white"
|
||||
return
|
||||
if(design == "dark")
|
||||
mode = "dark"
|
||||
mode_nice = "dark"
|
||||
return
|
||||
if(design == "showroom" || design == "hydro" || design == "freezer")
|
||||
mode = "[design]floor"
|
||||
mode_nice = design
|
||||
@@ -135,9 +139,9 @@
|
||||
mode_nice = design
|
||||
mode = "whitebluegreencorners"
|
||||
tile_dir_mode = 2
|
||||
else if(design == "delivery" || design == "bot")
|
||||
else if(design == "delivery" || design == "bot" || design == "white-delivery" || design == "white-bot")
|
||||
mode_nice = design
|
||||
mode = design
|
||||
mode = replacetext(design, "-", "")
|
||||
tile_dir_mode = 0
|
||||
else if(design == "loadingarea")
|
||||
mode_nice = design
|
||||
|
||||
@@ -90,7 +90,7 @@
|
||||
AddUses(1)
|
||||
user << "You insert the [L.name] into the [src.name]. You have [uses] lights remaining."
|
||||
user.drop_item()
|
||||
del(L)
|
||||
qdel(L)
|
||||
return
|
||||
else
|
||||
user << "You need a working light."
|
||||
@@ -156,7 +156,7 @@
|
||||
target.brightness = L2.brightness
|
||||
target.on = target.has_power()
|
||||
target.update()
|
||||
del(L2)
|
||||
qdel(L2)
|
||||
|
||||
if(target.on && target.rigged)
|
||||
target.explode()
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
if(!parts)
|
||||
user << "<span class='warning'>This kit has no parts for this modification left.</span>"
|
||||
user.drop_from_inventory(src)
|
||||
del(src)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
var/allowed = 0
|
||||
@@ -60,7 +60,7 @@
|
||||
|
||||
if(!parts)
|
||||
user.drop_from_inventory(src)
|
||||
del(src)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/device/modkit/examine(mob/user)
|
||||
..(user)
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
..()
|
||||
overlays += "pai-off"
|
||||
|
||||
/obj/item/device/paicard/Del()
|
||||
/obj/item/device/paicard/Destroy()
|
||||
//Will stop people throwing friend pAIs into the singularity so they can respawn
|
||||
if(!isnull(pai))
|
||||
pai.death(0)
|
||||
@@ -311,7 +311,7 @@
|
||||
if(pai)
|
||||
pai.ex_act(severity)
|
||||
else
|
||||
del(src)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/device/paicard/see_emote(mob/living/M, text)
|
||||
if(pai && pai.client)
|
||||
|
||||
@@ -118,4 +118,4 @@
|
||||
if(power_drained >= max_power)
|
||||
processing_objects.Remove(src)
|
||||
explosion(src.loc, 3,6,9,12)
|
||||
del(src)
|
||||
qdel(src)
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
/obj/item/device/radio/beacon/bacon //Probably a better way of doing this, I'm lazy.
|
||||
proc/digest_delay()
|
||||
spawn(600)
|
||||
del(src)
|
||||
qdel(src)
|
||||
|
||||
|
||||
// SINGULO BEACON SPAWNER
|
||||
@@ -45,5 +45,5 @@
|
||||
user << "\blue Locked In"
|
||||
new /obj/machinery/power/singularity_beacon/syndicate( user.loc )
|
||||
playsound(src, 'sound/effects/pop.ogg', 100, 1, 1)
|
||||
del(src)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
@@ -26,6 +26,13 @@
|
||||
keyslot2 = new ks2type(src)
|
||||
recalculateChannels(1)
|
||||
|
||||
/obj/item/device/radio/headset/Destroy()
|
||||
qdel(keyslot1)
|
||||
qdel(keyslot2)
|
||||
keyslot1 = null
|
||||
keyslot2 = null
|
||||
..()
|
||||
|
||||
/obj/item/device/radio/headset/examine(mob/user)
|
||||
if(!(..(user, 1) && radio_desc))
|
||||
return
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
..()
|
||||
processing_objects += src
|
||||
|
||||
/obj/item/device/radio/intercom/Del()
|
||||
/obj/item/device/radio/intercom/Destroy()
|
||||
processing_objects -= src
|
||||
..()
|
||||
|
||||
|
||||
@@ -42,8 +42,15 @@
|
||||
/obj/item/device/radio/New()
|
||||
..()
|
||||
wires = new(src)
|
||||
|
||||
/obj/item/device/radio/Destroy()
|
||||
qdel(wires)
|
||||
wires = null
|
||||
if(radio_controller)
|
||||
initialize()
|
||||
radio_controller.remove_object(src, frequency)
|
||||
for (var/ch_name in channels)
|
||||
radio_controller.remove_object(src, radiochannels[ch_name])
|
||||
..()
|
||||
|
||||
|
||||
/obj/item/device/radio/initialize()
|
||||
@@ -172,7 +179,7 @@
|
||||
0, "*garbled automated announcement*", src,
|
||||
message, from, "Automated Announcement", from, "synthesized voice",
|
||||
4, 0, list(0), connection.frequency, "states")
|
||||
del(A)
|
||||
qdel(A)
|
||||
return
|
||||
|
||||
// Interprets the message mode when talking into a radio, possibly returning a connection datum
|
||||
@@ -202,7 +209,7 @@
|
||||
if(wires.IsIndexCut(WIRE_TRANSMIT)) // The device has to have all its wires and shit intact
|
||||
return 0
|
||||
|
||||
M.last_target_click = world.time
|
||||
M.last_target_radio = world.time // For the projectile targeting system
|
||||
|
||||
/* Quick introduction:
|
||||
This new radio system uses a very robust FTL signaling technology unoriginally
|
||||
@@ -625,7 +632,6 @@
|
||||
onclose(user, "radio")
|
||||
return
|
||||
|
||||
|
||||
/obj/item/device/radio/proc/config(op)
|
||||
if(radio_controller)
|
||||
for (var/ch_name in channels)
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
if(T)
|
||||
T.hotspot_expose(700,125)
|
||||
explosion(T, -1, -1, 0, 4)
|
||||
del(src)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
/obj/item/device/taperecorder/verb/record()
|
||||
|
||||
@@ -53,6 +53,9 @@ datum/nano_item_lists
|
||||
var/uplink_owner = null//text-only
|
||||
var/used_TC = 0
|
||||
|
||||
/obj/item/device/uplink/nano_host()
|
||||
return loc
|
||||
|
||||
/obj/item/device/uplink/New()
|
||||
..()
|
||||
welcome = ticker.mode.uplink_welcome
|
||||
@@ -61,7 +64,7 @@ datum/nano_item_lists
|
||||
|
||||
world_uplinks += src
|
||||
|
||||
/obj/item/device/uplink/Del()
|
||||
/obj/item/device/uplink/Destroy()
|
||||
world_uplinks -= src
|
||||
..()
|
||||
|
||||
@@ -177,7 +180,7 @@ datum/nano_item_lists
|
||||
/obj/item/device/uplink/hidden/New()
|
||||
spawn(2)
|
||||
if(!istype(src.loc, /obj/item))
|
||||
del(src)
|
||||
qdel(src)
|
||||
..()
|
||||
|
||||
// Toggles the uplink on and off. Normally this will bypass the item's normal functions and go to the uplink menu, if activated.
|
||||
@@ -219,7 +222,7 @@ datum/nano_item_lists
|
||||
if (!ui)
|
||||
// the ui does not exist, so we'll create a new() one
|
||||
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
|
||||
ui = new(user, src, ui_key, "uplink.tmpl", title, 450, 600)
|
||||
ui = new(user, src, ui_key, "uplink.tmpl", title, 450, 600, state = inventory_state)
|
||||
// when the ui is first opened this is the data it will use
|
||||
ui.set_initial_data(data)
|
||||
// open the new ui window
|
||||
|
||||
Reference in New Issue
Block a user