mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-08-23 05:07:51 +01:00
Adds anti-photon grenades.
This commit is contained in:
@@ -15,6 +15,9 @@
|
||||
/datum/uplink_category/ammunition
|
||||
name = "Ammunition"
|
||||
|
||||
/datum/uplink_category/grenades
|
||||
name = "Grenades and Thrown Objects"
|
||||
|
||||
/datum/uplink_category/visible_weapons
|
||||
name = "Highly Visible and Dangerous Weapons"
|
||||
|
||||
@@ -36,8 +39,8 @@
|
||||
/datum/uplink_category/hardsuit_modules
|
||||
name = "Hardsuit Modules"
|
||||
|
||||
/datum/uplink_category/announcements
|
||||
name = "Announcements"
|
||||
/datum/uplink_category/services
|
||||
name = "Services"
|
||||
|
||||
/datum/uplink_category/badassery
|
||||
name = "Badassery"
|
||||
|
||||
@@ -9,6 +9,7 @@ var/datum/uplink/uplink = new()
|
||||
items_assoc = list()
|
||||
items = init_subtypes(/datum/uplink_item)
|
||||
categories = init_subtypes(/datum/uplink_category)
|
||||
categories = dd_sortedObjectList(categories)
|
||||
|
||||
for(var/datum/uplink_item/item in items)
|
||||
if(!item.name)
|
||||
@@ -167,11 +168,6 @@ datum/uplink_item/dd_SortValue()
|
||||
/datum/uplink_item/item/visible_weapons
|
||||
category = /datum/uplink_category/visible_weapons
|
||||
|
||||
/datum/uplink_item/item/visible_weapons/emp
|
||||
name = "5xEMP Grenades"
|
||||
item_cost = 3
|
||||
path = /obj/item/weapon/storage/box/emps
|
||||
|
||||
/datum/uplink_item/item/visible_weapons/energy_sword
|
||||
name = "Energy Sword"
|
||||
item_cost = 4
|
||||
@@ -452,6 +448,27 @@ datum/uplink_item/dd_SortValue()
|
||||
item_cost = 8
|
||||
path = /obj/item/rig_module/mounted
|
||||
|
||||
/***********
|
||||
* Grenades *
|
||||
************/
|
||||
/datum/uplink_item/item/grenades
|
||||
category = /datum/uplink_category/grenades
|
||||
|
||||
/datum/uplink_item/item/grenades/anti_photon
|
||||
name = "5xAnti-Photon Grenades"
|
||||
item_cost = 2
|
||||
path = /obj/item/weapon/storage/box/anti_photons
|
||||
|
||||
/datum/uplink_item/item/grenades/emp
|
||||
name = "5xEMP Grenades"
|
||||
item_cost = 3
|
||||
path = /obj/item/weapon/storage/box/emps
|
||||
|
||||
/datum/uplink_item/item/grenades/smoke
|
||||
name = "5xSmoke Grenades"
|
||||
item_cost = 2
|
||||
path = /obj/item/weapon/storage/box/smokes
|
||||
|
||||
/************
|
||||
* Badassery *
|
||||
************/
|
||||
@@ -547,19 +564,19 @@ var/image/default_abstract_uplink_icon
|
||||
* Announcements *
|
||||
*****************/
|
||||
/datum/uplink_item/abstract/announcements
|
||||
category = /datum/uplink_category/announcements
|
||||
category = /datum/uplink_category/services
|
||||
|
||||
/datum/uplink_item/abstract/announcements/buy(var/obj/item/device/uplink/U, var/mob/user)
|
||||
. = ..()
|
||||
if(.)
|
||||
log_and_message_admins("has triggered a falsified [src] announcement", user)
|
||||
log_and_message_admins("has triggered a falsified [src]", user)
|
||||
|
||||
/datum/uplink_item/abstract/announcements/fake_centcom
|
||||
item_cost = DEFAULT_TELECRYSTAL_AMOUNT / 2
|
||||
|
||||
/datum/uplink_item/abstract/announcements/fake_centcom/New()
|
||||
..()
|
||||
name = "[command_name()] Update"
|
||||
name = "[command_name()] Update Announcement"
|
||||
desc = "Causes a falsified [command_name()] Update. Triggers immediately after supplying additional data."
|
||||
antag_roles = list(MODE_MERCENARY)
|
||||
|
||||
@@ -581,34 +598,6 @@ var/image/default_abstract_uplink_icon
|
||||
command_announcement.Announce(args.["message"], args.["title"])
|
||||
return 1
|
||||
|
||||
/datum/uplink_item/abstract/announcements/fake_cryo
|
||||
name = "Cryogenic Oversight Announcement"
|
||||
desc = "Causes a falsified cryogenic message. Triggers immediately after supplying additional data."
|
||||
item_cost = 1
|
||||
|
||||
/datum/uplink_item/abstract/announcements/fake_cryo/extra_args(var/mob/user)
|
||||
if(!user)
|
||||
return 0
|
||||
|
||||
var/real_name = input(user, "Enter the name of the occupant.", "Occupant Name.", user.name) as text|null
|
||||
if(!real_name)
|
||||
return 0
|
||||
|
||||
var/title = input(user, "Enter the title of the occupant.", "Occupant Title.", "Assistant") as text|null
|
||||
if(!title)
|
||||
return 0
|
||||
|
||||
return list("name" = real_name, "title" = title)
|
||||
|
||||
/datum/uplink_item/abstract/announcements/fake_cryo/get_goods(var/obj/item/device/uplink/U, var/loc, var/mob/user, var/list/args)
|
||||
if(!args)
|
||||
return 0
|
||||
|
||||
var/obj/item/device/radio/intercom/announce = new /obj/item/device/radio/intercom(user)
|
||||
announce.autosay("[args["name"]], [args["title"]], has entered long-term storage.", "Cryogenic Oversight")
|
||||
qdel(announce)
|
||||
return 1
|
||||
|
||||
/datum/uplink_item/abstract/announcements/fake_ion_storm
|
||||
name = "Ion Storm Announcement"
|
||||
desc = "Interferes with the station's ion sensors. Triggers immediately upon investment."
|
||||
|
||||
@@ -44,7 +44,7 @@ var/datum/uplink_random_selection/default_uplink_selection = new/datum/uplink_ra
|
||||
items += new/datum/uplink_random_item(/datum/uplink_item/item/ammo/a357)
|
||||
items += new/datum/uplink_random_item(/datum/uplink_item/item/visible_weapons/heavysniper, 15, 0)
|
||||
items += new/datum/uplink_random_item(/datum/uplink_item/item/ammo/sniperammo, 15, 0)
|
||||
items += new/datum/uplink_random_item(/datum/uplink_item/item/visible_weapons/emp, 50)
|
||||
items += new/datum/uplink_random_item(/datum/uplink_item/item/grenades/emp, 50)
|
||||
items += new/datum/uplink_random_item(/datum/uplink_item/item/visible_weapons/crossbow, 33)
|
||||
items += new/datum/uplink_random_item(/datum/uplink_item/item/visible_weapons/energy_sword, 75)
|
||||
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
/obj/item/weapon/grenade/anti_photon
|
||||
desc = "An experimental device for temporarily removing light in a limited area."
|
||||
name = "pgoton disruption grenade"
|
||||
icon = 'icons/obj/grenade.dmi'
|
||||
icon_state = "emp"
|
||||
item_state = "emp"
|
||||
det_time = 20
|
||||
origin_tech = list(TECH_BLUESPACE = 4, TECH_MATERIAL = 4)
|
||||
|
||||
/obj/item/weapon/grenade/anti_photon/prime()
|
||||
playsound(src.loc, 'sound/effects/phasein.ogg', 50, 1, 5)
|
||||
set_light(10, -10, "#FFFFFF")
|
||||
|
||||
var/extra_delay = rand(0,90)
|
||||
|
||||
spawn(extra_delay)
|
||||
spawn(200)
|
||||
if(prob(10+extra_delay))
|
||||
set_light(10, 10, "#[num2hex(rand(64,255))][num2hex(rand(64,255))][num2hex(rand(64,255))]")
|
||||
spawn(210)
|
||||
..()
|
||||
playsound(src.loc, 'sound/effects/bang.ogg', 50, 1, 5)
|
||||
qdel(src)
|
||||
@@ -298,6 +298,31 @@
|
||||
new /obj/item/weapon/grenade/empgrenade(src)
|
||||
new /obj/item/weapon/grenade/empgrenade(src)
|
||||
|
||||
/obj/item/weapon/storage/box/smokes
|
||||
name = "box of smoke bombs"
|
||||
desc = "A box containing 5 smoke bombs."
|
||||
icon_state = "flashbang"
|
||||
|
||||
/obj/item/weapon/storage/box/smokes/New()
|
||||
..()
|
||||
new /obj/item/weapon/grenade/smokebomb(src)
|
||||
new /obj/item/weapon/grenade/smokebomb(src)
|
||||
new /obj/item/weapon/grenade/smokebomb(src)
|
||||
new /obj/item/weapon/grenade/smokebomb(src)
|
||||
new /obj/item/weapon/grenade/smokebomb(src)
|
||||
|
||||
/obj/item/weapon/storage/box/anti_photons
|
||||
name = "box of anti-photon grenades"
|
||||
desc = "A box containing 5 experimental anti-photon grenades."
|
||||
icon_state = "flashbang"
|
||||
|
||||
/obj/item/weapon/storage/box/anti_photon/New()
|
||||
..()
|
||||
new /obj/item/weapon/grenade/anti_photon(src)
|
||||
new /obj/item/weapon/grenade/anti_photon(src)
|
||||
new /obj/item/weapon/grenade/anti_photon(src)
|
||||
new /obj/item/weapon/grenade/anti_photon(src)
|
||||
new /obj/item/weapon/grenade/anti_photon(src)
|
||||
|
||||
/obj/item/weapon/storage/box/trackimp
|
||||
name = "boxed tracking implant kit"
|
||||
@@ -638,4 +663,4 @@
|
||||
max_w_class = 3
|
||||
can_hold = list(/obj/item/organ, /obj/item/weapon/reagent_containers/food, /obj/item/weapon/reagent_containers/glass)
|
||||
max_storage_space = 21
|
||||
use_to_pickup = 1 // for picking up broken bulbs, not that most people will try
|
||||
use_to_pickup = 1 // for picking up broken bulbs, not that most people will try
|
||||
|
||||
Reference in New Issue
Block a user