mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-24 04:27:35 +01:00
Merge pull request #9476 from variableundefined/SSNanoMob
Port Nano Mob to StonedMC
This commit is contained in:
@@ -29,7 +29,7 @@
|
||||
processing_objects.Remove(pda)
|
||||
|
||||
/datum/data/pda/app/mob_hunter_game/proc/scan_nearby()
|
||||
if(!mob_hunt_server || !connected)
|
||||
if(!SSmob_hunt || !connected)
|
||||
return
|
||||
for(var/turf/T in range(scan_range, get_turf(pda)))
|
||||
for(var/obj/effect/nanomob/N in T.contents)
|
||||
@@ -41,10 +41,10 @@
|
||||
N.reveal()
|
||||
|
||||
/datum/data/pda/app/mob_hunter_game/proc/reconnect()
|
||||
if(!mob_hunt_server || !mob_hunt_server.server_status || connected)
|
||||
if(!SSmob_hunt || !SSmob_hunt.server_status || connected)
|
||||
//show a message about the server being unavailable (because it doesn't exist / didn't get set to the global var / is offline)
|
||||
return 0
|
||||
mob_hunt_server.connected_clients += src
|
||||
SSmob_hunt.connected_clients += src
|
||||
connected = 1
|
||||
if(pda)
|
||||
pda.audible_message("[bicon(pda)] Connection established. Capture all of the mobs, [pda.owner ? pda.owner : "hunter"]!", null, 2)
|
||||
@@ -59,10 +59,10 @@
|
||||
return null
|
||||
|
||||
/datum/data/pda/app/mob_hunter_game/proc/disconnect(reason = null)
|
||||
if(!mob_hunt_server || !connected)
|
||||
if(!SSmob_hunt || !connected)
|
||||
return
|
||||
mob_hunt_server.connected_clients -= src
|
||||
for(var/obj/effect/nanomob/N in (mob_hunt_server.normal_spawns + mob_hunt_server.trap_spawns))
|
||||
SSmob_hunt.connected_clients -= src
|
||||
for(var/obj/effect/nanomob/N in (SSmob_hunt.normal_spawns + SSmob_hunt.trap_spawns))
|
||||
N.conceal(list(get_player()))
|
||||
connected = 0
|
||||
//show a disconnect message if we were disconnected involuntarily (reason argument provided)
|
||||
@@ -70,7 +70,7 @@
|
||||
pda.audible_message("[bicon(pda)] Disconnected from server. Reason: [reason].", null, 2)
|
||||
|
||||
/datum/data/pda/app/mob_hunter_game/program_process()
|
||||
if(!mob_hunt_server || !connected)
|
||||
if(!SSmob_hunt || !connected)
|
||||
return
|
||||
scan_nearby()
|
||||
|
||||
@@ -83,7 +83,7 @@
|
||||
return 1
|
||||
|
||||
/datum/data/pda/app/mob_hunter_game/update_ui(mob/user, list/data)
|
||||
if(!mob_hunt_server || !(src in mob_hunt_server.connected_clients))
|
||||
if(!SSmob_hunt || !(src in SSmob_hunt.connected_clients))
|
||||
data["connected"] = 0
|
||||
else
|
||||
data["connected"] = 1
|
||||
|
||||
Reference in New Issue
Block a user