Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

АИ-2 first aid kit for survs #171

Merged
merged 4 commits into from
Aug 29, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions code/datums/jobs/job/survivor.dm
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
C.equip_to_slot_or_del(new A(C), SLOT_IN_BACKPACK)
C.equip_to_slot_or_del(new A(C), SLOT_IN_BACKPACK)
C.equip_to_slot_or_del(new A(C), SLOT_IN_BACKPACK)
C.equip_to_slot_or_del(new /obj/item/storage/ai2(C), SLOT_IN_BACKPACK)

C.equip_to_slot_or_del(new /obj/item/clothing/glasses/welding(C), SLOT_GLASSES)
C.equip_to_slot_or_del(new /obj/item/storage/pouch/tools/full(C), SLOT_R_STORE)
Expand Down
10 changes: 10 additions & 0 deletions code/game/objects/items/reagent_containers/pill.dm
Original file line number Diff line number Diff line change
Expand Up @@ -277,3 +277,13 @@
pill_desc = "An Ifosfamide pill. A cytostatic antitumor drug. Quickly heals wounds and burns, but releases histamine. Do not mix with BKT and paracetamol"
list_reagents = list(/datum/reagent/medicine/ifosfamide = 15)
pill_id = 11

/obj/item/reagent_containers/pill/hyronalin
pill_desc = "A hyronalin pill"
list_reagents = list(/datum/reagent/medicine/hyronalin = 15)
pill_id = 17

/obj/item/reagent_containers/pill/oxycodone
pill_desc = "A oxycodone pill. Best painkiller."
homexp13 marked this conversation as resolved.
Show resolved Hide resolved
list_reagents = list(/datum/reagent/medicine/oxycodone = 15)
pill_id = 7
137 changes: 137 additions & 0 deletions code/game/objects/items/storage/firstaid.dm
Original file line number Diff line number Diff line change
Expand Up @@ -596,3 +596,140 @@
set_greyscale_colors(list(bottle_color,label_color))
paint.uses--
update_icon()

//АИ-2

/obj/item/storage/ai2
name = "\"АИ-2\" first aid kit"
desc = "It's an individual medical kit with rare and useful reagents."
icon = 'icons/obj/items/storage/firstaidkit.dmi'
icon_state = "firstaidkit"
storage_slots = 8
w_class = WEIGHT_CLASS_NORMAL
use_sound = 'sound/effects/toolbox.ogg'
can_hold = list(
/obj/item/storage/pill_bottle/penal,
/obj/item/reagent_containers/hypospray/autoinjector/pen,
)
var/is_open = FALSE

/obj/item/storage/ai2/Initialize(mapload, ...)
. = ..()

new /obj/item/storage/pill_bottle/penal/meralyne(src)
new /obj/item/storage/pill_bottle/penal/dermaline(src)
new /obj/item/storage/pill_bottle/penal/hyronalin(src)
new /obj/item/storage/pill_bottle/penal/dexalin(src)
new /obj/item/reagent_containers/hypospray/autoinjector/pen/tramadol(src)
new /obj/item/reagent_containers/hypospray/autoinjector/pen/neuraline(src)
new /obj/item/reagent_containers/hypospray/autoinjector/pen/inaprovaline(src)
new /obj/item/reagent_containers/hypospray/autoinjector/pen/hypervene(src)

update_icon()

/obj/item/storage/ai2/update_icon_state()
cut_overlays()

var/list/types_and_overlays = list(
/obj/item/storage/pill_bottle/penal/meralyne = "firstaidkit_meralyne_open",
/obj/item/storage/pill_bottle/penal/dermaline = "firstaidkit_dermaline_open",
/obj/item/storage/pill_bottle/penal/hyronalin = "firstaidkit_hyronalin_open",
/obj/item/storage/pill_bottle/penal/dexalin = "firstaidkit_dexalin_open",
/obj/item/reagent_containers/hypospray/autoinjector/pen/tramadol = "firstaidkit_tramadol_open",
/obj/item/reagent_containers/hypospray/autoinjector/pen/neuraline = "firstaidkit_neuraline_open",
/obj/item/reagent_containers/hypospray/autoinjector/pen/inaprovaline = "firstaidkit_inaprovaline_open",
/obj/item/reagent_containers/hypospray/autoinjector/pen/hypervene = "firstaidkit_hypervene_open",
)

if(is_open)
for (var/obj/item/W in contents)
if (types_and_overlays[W.type])
homexp13 marked this conversation as resolved.
Show resolved Hide resolved
add_overlay(types_and_overlays[W.type])
types_and_overlays -= W.type

/obj/item/storage/ai2/open(mob/user)
. = ..()
icon_state = "firstaidkit_empty"
is_open = TRUE
update_icon()

/obj/item/storage/ai2/close(mob/user)
. = ..()
icon_state = "firstaidkit"
is_open = FALSE
update_icon()

/obj/item/storage/ai2/attackby(obj/item/I, mob/user, params)
..()
homexp13 marked this conversation as resolved.
Show resolved Hide resolved
update_icon()

/obj/item/storage/pill_bottle/penal
icon = 'icons/obj/items/storage/firstaidkit.dmi'
max_storage_space = 6
w_class = WEIGHT_CLASS_TINY
greyscale_config = null
greyscale_colors = null

/obj/item/storage/pill_bottle/penal/meralyne
name = "Meralyne \"Пенал\" case"
desc = "Contains a few meralyne pills, old and fancy."
icon_state = "meralyne_agent"
pill_type_to_fill = /obj/item/reagent_containers/pill/meralyne

/obj/item/storage/pill_bottle/penal/dermaline
name = "Dermaline \"Пенал\" case"
desc = "Contains a few dermaline pills, old and fancy."
icon_state = "dermaline_agent"
pill_type_to_fill = /obj/item/reagent_containers/pill/dermaline

/obj/item/storage/pill_bottle/penal/hyronalin
name = "Hyronalin \"Пенал\" case"
desc = "Contains a few hyronalin pills, old and fancy."
icon_state = "hyronalin_agent"
pill_type_to_fill = /obj/item/reagent_containers/pill/hyronalin

/obj/item/storage/pill_bottle/penal/dexalin
name = "Dexalin \"Пенал\" case"
desc = "Contains a few dexalin pills, old and fancy."
icon_state = "dexalin_agent"
pill_type_to_fill = /obj/item/reagent_containers/pill/dexalin

/obj/item/reagent_containers/hypospray/autoinjector/pen
icon = 'icons/obj/items/storage/firstaidkit.dmi'
volume = 30
init_reagent_flags = null

/obj/item/reagent_containers/hypospray/autoinjector/pen/tramadol
name = "Tramadol pen"
desc = "A pen loaded with 2 heavy doses of tramadol, use two times for better effect."
icon_state = "tramadol_pen"
amount_per_transfer_from_this = 15
list_reagents = list(/datum/reagent/medicine/tramadol = 30)

/obj/item/reagent_containers/hypospray/autoinjector/pen/neuraline
name = "Neuraline pen"
desc = "A pen loaded with strong stimulant reagent. Causes serious intoxication!"
icon_state = "neuraline_pen"
amount_per_transfer_from_this = 4
list_reagents = list(/datum/reagent/medicine/neuraline = 4)

/obj/item/reagent_containers/hypospray/autoinjector/pen/inaprovaline
name = "Inaprovaline pen"
desc = "A pen loaded with stimulant reagent. Use it for people in critical condition!"
icon_state = "inaprovaline_pen"
amount_per_transfer_from_this = 15
list_reagents = list(/datum/reagent/medicine/inaprovaline = 30)

/obj/item/reagent_containers/hypospray/autoinjector/pen/hypervene
name = "Hypervene pen"
desc = "A pen loaded with purge reagent. Be careful, it causes severe pain and purges EVERYTHING."
icon_state = "hypervene_pen"
amount_per_transfer_from_this = 15
list_reagents = list(/datum/reagent/hypervene = 30)

/obj/item/storage/pill_bottle/oxycodone
name = "oxycodone pill bottle"
desc = "Contains pills that numb severe pain."
pill_type_to_fill = /obj/item/reagent_containers/pill/oxycodone
greyscale_colors = "#360570#ffffff"
description_overlay = "Ox"
Binary file added icons/obj/items/storage/firstaidkit.dmi
Binary file not shown.
Loading