mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-13 16:13:19 +01:00
Nano-Mob Hunter GO! WIP commit 3: The committening
This commit is contained in:
@@ -504,4 +504,9 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
|
||||
/obj/item/device/pda/process()
|
||||
if(current_app)
|
||||
current_app.program_process()
|
||||
current_app.program_process()
|
||||
|
||||
/obj/item/device/pda/hit_check(speed)
|
||||
if(current_app)
|
||||
current_app.program_hit_check()
|
||||
..()
|
||||
@@ -20,6 +20,9 @@
|
||||
/datum/data/pda/proc/program_process()
|
||||
return
|
||||
|
||||
/datum/data/pda/proc/program_hit_check()
|
||||
return
|
||||
|
||||
/datum/data/pda/proc/notify(message, blink = 1)
|
||||
if(message)
|
||||
//Search for holder of the PDA.
|
||||
|
||||
@@ -314,11 +314,12 @@
|
||||
D.remote_door_id = initial_remote_door_id
|
||||
|
||||
/obj/item/weapon/cartridge/mob_hunt_game
|
||||
name = "Nano-Mob Hunter GO"
|
||||
name = "Nano-Mob Hunter GO! Cartridge"
|
||||
desc = "The hit new PDA game that lets you track down and capture your favorite Nano-Mobs living in your world!"
|
||||
icon_state = "cart-eye"
|
||||
programs = list(
|
||||
new/datum/data/pda/app/mob_hunter_game)
|
||||
var/emagged = 0
|
||||
|
||||
/obj/item/weapon/cartridge/mob_hunt_game/attackby(obj/item/O, mob/user, params)
|
||||
if(istype(O, /obj/item/weapon/nanomob_card))
|
||||
@@ -330,4 +331,13 @@
|
||||
else
|
||||
to_chat(user, "<span class='warning'>Transfer failed. Could not read mob data from card.</span>")
|
||||
else
|
||||
..()
|
||||
..()
|
||||
|
||||
/obj/item/weapon/cartridge/mob_hunt_game/emag_act(mob/user)
|
||||
if(!emagged)
|
||||
emagged = 1
|
||||
var/datum/data/pda/app/mob_hunter_game/my_game = programs[1]
|
||||
my_game.hacked = 1
|
||||
to_chat(user, "<span class='warning'>TR4P_M45T3R.mod successfully initialized. ToS violated. User Agreement nullified. Gotta pwn them all.</span>")
|
||||
to_chat(user, "<span class='warning'>You can now create trapped versions of any mob in your collection that will damage hunters who attempt to capture it.</span>")
|
||||
description_antag = "This copy of Nano-Mob Hunter GO! has been hacked to allow the creation of trap mobs which will cause any PDA that attempts to capture it to shock anyone holding it. Hacked copies of the game will not trigger the trap."
|
||||
@@ -14,6 +14,7 @@
|
||||
var/list/my_collection = list()
|
||||
var/current_index = 0
|
||||
var/connected = 0
|
||||
var/hacked = 0 //if set, this cartridge is able to spawn trap mobs from its collection (set via emag_act on the cartridge)
|
||||
|
||||
/datum/data/pda/app/mob_hunter_game/start()
|
||||
..()
|
||||
@@ -71,9 +72,9 @@
|
||||
data["connected"] = 0
|
||||
else
|
||||
data["connected"] = 1
|
||||
data["not_collection"] = 0
|
||||
data["no_collection"] = 0
|
||||
if(!my_collection.len)
|
||||
data["no_collecton"] = 1
|
||||
data["no_collection"] = 1
|
||||
return
|
||||
var/datum/mob_hunt/mob_info
|
||||
if(!current_index)
|
||||
@@ -89,11 +90,14 @@
|
||||
"level" = mob_info.level,
|
||||
"type1" = mob_info.get_type1(),
|
||||
"type2" = mob_info.get_type2(),
|
||||
"sprite" = "[mob_info.icon_state_normal].png"
|
||||
"sprite" = "[mob_info.icon_state_normal].png",
|
||||
"is_hacked" = hacked
|
||||
)
|
||||
if(mob_info.is_shiny)
|
||||
entry["sprite"] = "[mob_info.icon_state_shiny].png"
|
||||
data["entry"] = entry
|
||||
for(var/a in entry)
|
||||
log_debug("[a] = [entry[a]]")
|
||||
|
||||
/datum/data/pda/app/mob_hunter_game/proc/assign_nickname()
|
||||
if(!my_collection.len)
|
||||
@@ -127,6 +131,13 @@
|
||||
if(current_index > my_collection.len)
|
||||
current_index = my_collection.len
|
||||
|
||||
/datum/data/pda/app/mob_hunter_game/proc/set_trap()
|
||||
if(!my_collection.len || !pda || !hacked)
|
||||
return
|
||||
var/datum/mob_hunt/bait = my_collection[current_index]
|
||||
bait = bait.type
|
||||
new bait(1, get_turf(pda))
|
||||
|
||||
/datum/data/pda/app/mob_hunter_game/Topic(href, list/href_list)
|
||||
switch(href_list["choice"])
|
||||
if("Rename")
|
||||
@@ -146,4 +157,6 @@
|
||||
if("Disconnect")
|
||||
disconnect()
|
||||
if("Transfer")
|
||||
print_card()
|
||||
print_card()
|
||||
if("Set_Trap")
|
||||
set_trap()
|
||||
Reference in New Issue
Block a user