mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-24 12:37:26 +01:00
@@ -1,4 +1,3 @@
|
||||
|
||||
/obj/effect/nanomob
|
||||
name = "Nano-Mob Avatar" //will be overridden by the mob datum name value when created
|
||||
desc = "A wild Nano-Mob appeared! Hit it with your PDA with the game open to attempt to capture it!"
|
||||
@@ -12,17 +11,29 @@
|
||||
var/list/clients_encountered = list() //tracks who has already interacted with us, so they can't attempt a second capture
|
||||
var/image/avatar
|
||||
|
||||
/obj/effect/nanomob/New(loc, datum/mob_hunt/new_info)
|
||||
..()
|
||||
/obj/effect/nanomob/Initialize(mapload, datum/mob_hunt/new_info)
|
||||
. = ..()
|
||||
if(!new_info)
|
||||
qdel(src)
|
||||
return
|
||||
return INITIALIZE_HINT_QDEL
|
||||
mob_info = new_info
|
||||
RegisterSignal(mob_info, COMSIG_PARENT_QDELETING, .proc/delete_wrapper)
|
||||
update_self()
|
||||
forceMove(mob_info.spawn_point)
|
||||
if(!mob_info.is_trap)
|
||||
addtimer(CALLBACK(src, .proc/despawn), mob_info.lifetime)
|
||||
|
||||
/obj/effect/nanomob/Destroy()
|
||||
SSmob_hunt.trap_spawns -= src
|
||||
SSmob_hunt.normal_spawns -= src
|
||||
mob_info = null // Can't delete this since multiple players can get the exact same /datum/mob_hunt. (This should be refactored)
|
||||
clients_encountered.Cut()
|
||||
QDEL_NULL(avatar)
|
||||
return ..()
|
||||
|
||||
/obj/effect/nanomob/proc/delete_wrapper()
|
||||
SIGNAL_HANDLER
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/nanomob/proc/update_self()
|
||||
if(!mob_info)
|
||||
return
|
||||
@@ -132,12 +143,6 @@
|
||||
icon_state = "placeholder"
|
||||
var/obj/machinery/computer/mob_battle_terminal/my_terminal
|
||||
|
||||
/obj/effect/nanomob/battle/New(loc, datum/mob_hunt/new_info)
|
||||
. = ..()
|
||||
if(new_info)
|
||||
mob_info = new_info
|
||||
update_self()
|
||||
|
||||
/obj/effect/nanomob/battle/update_self()
|
||||
if(!mob_info)
|
||||
name = "Nano-Mob Battle Avatar"
|
||||
|
||||
@@ -212,6 +212,20 @@ GLOBAL_LIST_INIT(ai_verbs_default, list(
|
||||
GLOB.shuttle_caller_list += src
|
||||
..()
|
||||
|
||||
/mob/living/silicon/ai/Destroy()
|
||||
GLOB.ai_list -= src
|
||||
GLOB.shuttle_caller_list -= src
|
||||
SSshuttle.autoEvac()
|
||||
if(malfhacking)
|
||||
deltimer(malfhacking)
|
||||
malfhacking = null
|
||||
QDEL_NULL(eyeobj) // No AI, no Eye
|
||||
QDEL_NULL(aiPDA)
|
||||
QDEL_NULL(aiMulti)
|
||||
QDEL_NULL(aiRadio)
|
||||
QDEL_NULL(builtInCamera)
|
||||
return ..()
|
||||
|
||||
/mob/living/silicon/ai/proc/on_mob_init()
|
||||
to_chat(src, "<B>You are playing the station's AI. The AI cannot move, but can interact with many objects while viewing them (through cameras).</B>")
|
||||
to_chat(src, "<B>To look at other parts of the station, click on yourself to get a camera menu.</B>")
|
||||
@@ -314,17 +328,6 @@ GLOBAL_LIST_INIT(ai_verbs_default, list(
|
||||
|
||||
return TRUE
|
||||
|
||||
/mob/living/silicon/ai/Destroy()
|
||||
GLOB.ai_list -= src
|
||||
GLOB.shuttle_caller_list -= src
|
||||
SSshuttle.autoEvac()
|
||||
QDEL_NULL(eyeobj) // No AI, no Eye
|
||||
if(malfhacking)
|
||||
deltimer(malfhacking)
|
||||
malfhacking = null
|
||||
malfhack = null
|
||||
return ..()
|
||||
|
||||
|
||||
/*
|
||||
The AI Power supply is a dummy object used for powering the AI since only machinery should be using power.
|
||||
|
||||
@@ -33,27 +33,16 @@
|
||||
// break_stuff_probability = 2
|
||||
|
||||
faction = list("scarybat")
|
||||
var/mob/living/owner
|
||||
gold_core_spawnable = HOSTILE_SPAWN
|
||||
|
||||
/mob/living/simple_animal/hostile/scarybat/New(loc, mob/living/L as mob)
|
||||
..()
|
||||
/mob/living/simple_animal/hostile/scarybat/Initialize(mapload, mob/living/L)
|
||||
. = ..()
|
||||
if(istype(L))
|
||||
owner = L
|
||||
faction += "\ref[L]"
|
||||
|
||||
/mob/living/simple_animal/hostile/scarybat/Process_Spacemove(check_drift = 0)
|
||||
return ..() //No drifting in space for space carp! //original comments do not steal
|
||||
|
||||
/mob/living/simple_animal/hostile/scarybat/Found(atom/A)//This is here as a potential override to pick a specific target if available
|
||||
if(istype(A) && A == owner)
|
||||
return 0
|
||||
return ..()
|
||||
|
||||
/mob/living/simple_animal/hostile/scarybat/CanAttack(atom/the_target)//This is here as a potential override to pick a specific target if available
|
||||
if(istype(the_target) && the_target == owner)
|
||||
return 0
|
||||
return ..()
|
||||
|
||||
/mob/living/simple_animal/hostile/scarybat/AttackingTarget()
|
||||
. =..()
|
||||
var/mob/living/L = .
|
||||
|
||||
@@ -40,11 +40,15 @@ GLOBAL_LIST_EMPTY(fax_blacklist)
|
||||
/// Target department to send outgoing faxes to
|
||||
var/destination
|
||||
|
||||
/obj/machinery/photocopier/faxmachine/New()
|
||||
..()
|
||||
/obj/machinery/photocopier/faxmachine/Initialize(mapload)
|
||||
. = ..()
|
||||
GLOB.allfaxes += src
|
||||
update_network()
|
||||
|
||||
/obj/machinery/photocopier/faxmachine/Destroy()
|
||||
GLOB.allfaxes -= src
|
||||
return ..()
|
||||
|
||||
/obj/machinery/photocopier/faxmachine/proc/update_network()
|
||||
if(department != "Unknown")
|
||||
if(!(("[department]" in GLOB.alldepartments) || ("[department]" in GLOB.hidden_departments) || ("[department]" in GLOB.admin_departments) || ("[department]" in GLOB.hidden_admin_departments)))
|
||||
|
||||
@@ -28,6 +28,11 @@
|
||||
disconnect("Program Terminated")
|
||||
STOP_PROCESSING(SSobj, pda)
|
||||
|
||||
/datum/data/pda/app/mob_hunter_game/Destroy()
|
||||
STOP_PROCESSING(SSobj, pda)
|
||||
SSmob_hunt.connected_clients -= src
|
||||
return ..()
|
||||
|
||||
/datum/data/pda/app/mob_hunter_game/proc/scan_nearby()
|
||||
if(!SSmob_hunt || !connected)
|
||||
return
|
||||
@@ -74,13 +79,14 @@
|
||||
return
|
||||
scan_nearby()
|
||||
|
||||
/datum/data/pda/app/mob_hunter_game/proc/register_capture(datum/mob_hunt/captured, wild = 0)
|
||||
/datum/data/pda/app/mob_hunter_game/proc/register_capture(datum/mob_hunt/captured, wild = FALSE)
|
||||
if(!captured)
|
||||
return 0
|
||||
my_collection.Add(captured)
|
||||
return FALSE
|
||||
my_collection += captured
|
||||
RegisterSignal(captured, COMSIG_PARENT_QDELETING, .proc/remove_mob)
|
||||
if(wild)
|
||||
wild_captures++
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
/datum/data/pda/app/mob_hunter_game/update_ui(mob/user, list/data)
|
||||
if(!SSmob_hunt || !(src in SSmob_hunt.connected_clients))
|
||||
@@ -138,12 +144,27 @@
|
||||
card.forceMove(get_turf(pda))
|
||||
remove_mob()
|
||||
|
||||
/datum/data/pda/app/mob_hunter_game/proc/remove_mob()
|
||||
if(!my_collection.len)
|
||||
/**
|
||||
* Removes a Nanomob from the [my_collection] list.
|
||||
*
|
||||
* The Nanomob that is currently selected in the app ([current_index]) will be removed from the list unless a `mob_override` argument is given, in which case that will be removed instead.
|
||||
*
|
||||
* Arguments:
|
||||
* * mob_override - A specific Nanomob to remove from the list. (Optional)
|
||||
*/
|
||||
/datum/data/pda/app/mob_hunter_game/proc/remove_mob(datum/mob_hunt/mob_override = null)
|
||||
SIGNAL_HANDLER
|
||||
if(!length(my_collection))
|
||||
return
|
||||
my_collection.Remove(my_collection[current_index])
|
||||
if(current_index > my_collection.len)
|
||||
current_index = my_collection.len
|
||||
|
||||
if(mob_override)
|
||||
my_collection -= mob_override
|
||||
else
|
||||
my_collection -= my_collection[current_index]
|
||||
|
||||
var/collection_length = length(my_collection)
|
||||
if(current_index > collection_length)
|
||||
current_index = collection_length
|
||||
|
||||
/datum/data/pda/app/mob_hunter_game/proc/set_trap()
|
||||
if(!my_collection.len || !pda || !hacked)
|
||||
|
||||
@@ -11,19 +11,17 @@ using metal and glass, it uses glass and reagents (usually sulfuric acis).
|
||||
container_type = OPENCONTAINER
|
||||
|
||||
categories = list(
|
||||
"AI Modules",
|
||||
"Computer Boards",
|
||||
"Engineering Machinery",
|
||||
"Exosuit Modules",
|
||||
"Hydroponics Machinery",
|
||||
"Medical Machinery",
|
||||
"Misc. Machinery",
|
||||
"Research Machinery",
|
||||
"Subspace Telecomms",
|
||||
"Teleportation Machinery"
|
||||
)
|
||||
|
||||
reagents = new()
|
||||
"AI Modules",
|
||||
"Computer Boards",
|
||||
"Engineering Machinery",
|
||||
"Exosuit Modules",
|
||||
"Hydroponics Machinery",
|
||||
"Medical Machinery",
|
||||
"Misc. Machinery",
|
||||
"Research Machinery",
|
||||
"Subspace Telecomms",
|
||||
"Teleportation Machinery"
|
||||
)
|
||||
|
||||
/obj/machinery/r_n_d/circuit_imprinter/New()
|
||||
..()
|
||||
@@ -33,8 +31,8 @@ using metal and glass, it uses glass and reagents (usually sulfuric acis).
|
||||
component_parts += new /obj/item/stock_parts/manipulator(null)
|
||||
component_parts += new /obj/item/reagent_containers/glass/beaker(null)
|
||||
component_parts += new /obj/item/reagent_containers/glass/beaker(null)
|
||||
create_reagents()
|
||||
RefreshParts()
|
||||
reagents.my_atom = src
|
||||
|
||||
/obj/machinery/r_n_d/circuit_imprinter/upgraded/New()
|
||||
..()
|
||||
@@ -45,7 +43,11 @@ using metal and glass, it uses glass and reagents (usually sulfuric acis).
|
||||
component_parts += new /obj/item/reagent_containers/glass/beaker/large(null)
|
||||
component_parts += new /obj/item/reagent_containers/glass/beaker/large(null)
|
||||
RefreshParts()
|
||||
reagents.my_atom = src
|
||||
|
||||
/obj/machinery/r_n_d/circuit_imprinter/Destroy()
|
||||
if(linked_console)
|
||||
linked_console.linked_imprinter = null
|
||||
return ..()
|
||||
|
||||
/obj/machinery/r_n_d/circuit_imprinter/RefreshParts()
|
||||
reagents.maximum_volume = 0
|
||||
|
||||
@@ -29,6 +29,11 @@ Note: Must be placed within 3 tiles of the R&D Console
|
||||
component_parts += new /obj/item/stock_parts/micro_laser/ultra(null)
|
||||
RefreshParts()
|
||||
|
||||
/obj/machinery/r_n_d/destructive_analyzer/Destroy()
|
||||
if(linked_console)
|
||||
linked_console.linked_destroy = null
|
||||
return ..()
|
||||
|
||||
/obj/machinery/r_n_d/destructive_analyzer/RefreshParts()
|
||||
var/T = 0
|
||||
for(var/obj/item/stock_parts/S in component_parts)
|
||||
|
||||
@@ -60,14 +60,16 @@ GLOBAL_LIST_EMPTY(message_servers)
|
||||
var/active = TRUE
|
||||
var/decryptkey = "password"
|
||||
|
||||
/obj/machinery/message_server/New()
|
||||
/obj/machinery/message_server/Initialize(mapload)
|
||||
. = ..()
|
||||
GLOB.message_servers += src
|
||||
decryptkey = GenerateKey()
|
||||
send_pda_message("System Administrator", "system", "This is an automated message. The messaging system is functioning correctly.")
|
||||
..()
|
||||
|
||||
/obj/machinery/message_server/Destroy()
|
||||
GLOB.message_servers -= src
|
||||
QDEL_LIST(pda_msgs)
|
||||
QDEL_LIST(rc_msgs)
|
||||
return ..()
|
||||
|
||||
/obj/machinery/message_server/process()
|
||||
|
||||
@@ -14,19 +14,16 @@ Note: Must be placed west/left of and R&D console to function.
|
||||
container_type = OPENCONTAINER
|
||||
|
||||
categories = list(
|
||||
"Bluespace",
|
||||
"Equipment",
|
||||
"Janitorial",
|
||||
"Medical",
|
||||
"Mining",
|
||||
"Miscellaneous",
|
||||
"Power",
|
||||
"Stock Parts",
|
||||
"Weapons"
|
||||
)
|
||||
|
||||
reagents = new()
|
||||
|
||||
"Bluespace",
|
||||
"Equipment",
|
||||
"Janitorial",
|
||||
"Medical",
|
||||
"Mining",
|
||||
"Miscellaneous",
|
||||
"Power",
|
||||
"Stock Parts",
|
||||
"Weapons"
|
||||
)
|
||||
|
||||
/obj/machinery/r_n_d/protolathe/New()
|
||||
..()
|
||||
@@ -38,10 +35,9 @@ Note: Must be placed west/left of and R&D console to function.
|
||||
component_parts += new /obj/item/stock_parts/manipulator(null)
|
||||
component_parts += new /obj/item/reagent_containers/glass/beaker/large(null)
|
||||
component_parts += new /obj/item/reagent_containers/glass/beaker/large(null)
|
||||
create_reagents()
|
||||
RefreshParts()
|
||||
|
||||
reagents.my_atom = src
|
||||
|
||||
/obj/machinery/r_n_d/protolathe/upgraded/New()
|
||||
..()
|
||||
component_parts = list()
|
||||
@@ -54,7 +50,10 @@ Note: Must be placed west/left of and R&D console to function.
|
||||
component_parts += new /obj/item/reagent_containers/glass/beaker/large(null)
|
||||
RefreshParts()
|
||||
|
||||
reagents.my_atom = src
|
||||
/obj/machinery/r_n_d/protolathe/Destroy()
|
||||
if(linked_console)
|
||||
linked_console.linked_lathe = null
|
||||
return ..()
|
||||
|
||||
/obj/machinery/r_n_d/protolathe/RefreshParts()
|
||||
var/T = 0
|
||||
|
||||
@@ -176,6 +176,20 @@ won't update every console in existence) but it's more of a hassle to do. Also,
|
||||
SyncRDevices()
|
||||
|
||||
/obj/machinery/computer/rdconsole/Destroy()
|
||||
QDEL_NULL(files)
|
||||
QDEL_NULL(t_disk)
|
||||
QDEL_NULL(d_disk)
|
||||
QDEL_LIST(matching_designs)
|
||||
if(linked_destroy)
|
||||
linked_destroy.linked_console = null
|
||||
linked_destroy = null
|
||||
if(linked_lathe)
|
||||
linked_lathe.linked_console = null
|
||||
linked_lathe = null
|
||||
if(linked_imprinter)
|
||||
linked_imprinter.linked_console = null
|
||||
linked_imprinter = null
|
||||
|
||||
if(wait_message_timer)
|
||||
deltimer(wait_message_timer)
|
||||
wait_message_timer = 0
|
||||
|
||||
@@ -32,12 +32,17 @@
|
||||
wires["Black"] = 0
|
||||
wires["White"] = 0
|
||||
var/list/w = list("Red","Blue","Green","Yellow","Black","White")
|
||||
src.hack_wire = pick(w)
|
||||
w -= src.hack_wire
|
||||
src.shock_wire = pick(w)
|
||||
w -= src.shock_wire
|
||||
src.disable_wire = pick(w)
|
||||
w -= src.disable_wire
|
||||
hack_wire = pick_n_take(w)
|
||||
shock_wire = pick_n_take(w)
|
||||
disable_wire = pick_n_take(w)
|
||||
|
||||
/obj/machinery/r_n_d/Destroy()
|
||||
if(loaded_item)
|
||||
loaded_item.forceMove(get_turf(src))
|
||||
loaded_item = null
|
||||
linked_console = null
|
||||
materials = null
|
||||
return ..()
|
||||
|
||||
/obj/machinery/r_n_d/attack_hand(mob/user as mob)
|
||||
if(shocked)
|
||||
|
||||
@@ -12,6 +12,11 @@
|
||||
AA = new(src)
|
||||
soundloop = new(list(src), FALSE)
|
||||
|
||||
/obj/vehicle/ambulance/Destroy()
|
||||
QDEL_NULL(AA)
|
||||
QDEL_NULL(soundloop)
|
||||
return ..()
|
||||
|
||||
/datum/action/ambulance_alarm
|
||||
name = "Toggle Sirens"
|
||||
icon_icon = 'icons/obj/vehicles.dmi'
|
||||
|
||||
Reference in New Issue
Block a user