Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
BeagleGaming1 committed Oct 8, 2023
1 parent 3697156 commit f096d44
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 5 deletions.
2 changes: 1 addition & 1 deletion code/game/objects/items/devices/radio/headset.dm
Original file line number Diff line number Diff line change
Expand Up @@ -850,7 +850,7 @@
)

/obj/item/device/radio/headset/distress/cbrn
name = "CBRN headset"
name = "\improper CBRN headset"
desc = "A headset given to CBRN marines. Channels are as follows: :g - public, :v - marine command, :a - alpha squad, :b - bravo squad, :c - charlie squad, :d - delta squad, :n - engineering, :m - medbay, :u - requisitions, :j - JTAC, :t - intel"
frequency = CBRN_FREQ
initial_keys = list(/obj/item/device/encryptionkey/public, /obj/item/device/encryptionkey/mcom)
Expand Down
28 changes: 27 additions & 1 deletion code/game/objects/prop.dm
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

/obj/item/prop/geiger_counter
name = "geiger counter"
desc = "Useful for measuring ionizing radiation."
desc = "A geiger counter measures the radiation it receives. This type automatically records and transfers any information it reads, provided it has a battery, with no user input required beyond being enabled."
icon = 'icons/obj/items/devices.dmi'
icon_state = "geiger"
item_state = ""
Expand All @@ -24,20 +24,46 @@
var/enabled_state = "geiger_on"
///Iconstate of geiger counter when off
var/disabled_state = "geiger"
///New battery it will spawn with
var/starting_battery = /obj/item/cell/crap
///Battery inside geiger counter
var/obj/item/cell/battery //It doesn't drain the battery, but it has a battery for emergency use

/obj/item/prop/geiger_counter/Initialize(mapload, ...)
. = ..()
if(!battery)
return
battery = new(starting_battery)
if(toggled_on)
icon_state = enabled_state

/obj/item/prop/geiger_counter/Destroy()
. = ..()
if(battery)
qdel(battery)

/obj/item/prop/geiger_counter/attack_self(mob/user)
. = ..()
toggled_on = !toggled_on
if(!battery)
to_chat(user, SPAN_NOTICE("[src] is missing a battery."))
return
to_chat(user, SPAN_NOTICE("You [toggled_on ? "enable" : "disable"] [src]."))
if(toggled_on)
icon_state = enabled_state
return
icon_state = disabled_state

/obj/item/prop/geiger_counter/attackby(obj/item/attacking_item, mob/user)
. = ..()
if(HAS_TRAIT(attacking_item, TRAIT_TOOL_SCREWDRIVER) || HAS_TRAIT(attacking_item, TRAIT_TOOL_CROWBAR))
if(!battery)
to_chat(user, SPAN_NOTICE("There is no battery for you to remove."))
return
to_chat(user, SPAN_NOTICE("You jam [battery] out of [src] with [attacking_item], prying it out irreversibly."))
user.put_in_hands(battery)
battery = null

/obj/item/prop/tableflag
name = "United Americas table flag"
icon = 'icons/obj/items/items.dmi'
Expand Down
5 changes: 5 additions & 0 deletions code/modules/clothing/under/marine_uniform.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1004,6 +1004,11 @@
linked_hood = new hood_type(src)
. = ..()

/obj/item/clothing/under/marine/cbrn/Destroy()
. = ..()
if(linked_hood)
qdel(linked_hood)

/obj/item/clothing/under/marine/cbrn/verb/hood_toggle()
set name = "Toggle Hood"
set desc = "Pull your hood and gasmask up over your face and head."
Expand Down
5 changes: 2 additions & 3 deletions code/modules/gear_presets/cbrn.dm
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
auto_squad_name = SQUAD_CBRN
ert_squad = TRUE
skills = /datum/skills/pmc //More trained than the average rifleman
var/headset_type = /obj/item/device/radio/headset/distress/cbrn

/datum/equipment_preset/uscm/cbrn/New()
. = ..()
Expand All @@ -18,7 +17,7 @@
new_human.nutrition = NUTRITION_NORMAL

/datum/equipment_preset/uscm/cbrn/load_gear(mob/living/carbon/human/new_human)
new_human.equip_to_slot_or_del(new headset_type(new_human), WEAR_L_EAR)
new_human.equip_to_slot_or_del(new /obj/item/device/radio/headset/distress/cbrn(new_human), WEAR_L_EAR)
new_human.equip_to_slot_or_del(new /obj/item/clothing/under/marine/cbrn(new_human), WEAR_BODY)
new_human.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/marine/cbrn(new_human), WEAR_JACKET)
new_human.equip_to_slot_or_del(new /obj/item/clothing/gloves/marine/veteran/cbrn(new_human), WEAR_HANDS)
Expand Down Expand Up @@ -203,7 +202,7 @@
access = get_access(ACCESS_LIST_GLOBAL)

/datum/equipment_preset/uscm/cbrn/specialist/load_gear(mob/living/carbon/human/new_human)
new_human.equip_to_slot_or_del(new headset_type(new_human), WEAR_L_EAR)
new_human.equip_to_slot_or_del(new /obj/item/device/radio/headset/distress/cbrn(new_human), WEAR_L_EAR)
new_human.equip_to_slot_or_del(new /obj/item/clothing/under/marine/cbrn/advanced(new_human), WEAR_BODY)
new_human.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/marine/cbrn/advanced(new_human), WEAR_JACKET)
new_human.equip_to_slot_or_del(new /obj/item/clothing/gloves/marine/veteran/cbrn(new_human), WEAR_HANDS)
Expand Down

0 comments on commit f096d44

Please sign in to comment.