mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2025-12-27 18:42:19 +00:00
Conflicts: code/ATMOSPHERICS/pipes.dm code/datums/organs/organ_external.dm code/game/gamemodes/changeling/modularchangling.dm code/game/gamemodes/events.dm code/game/gamemodes/events/ninja_equipment.dm code/game/hud.dm code/game/jobs/job/captain.dm code/game/machinery/atmoalter/area_atmos_computer.dm code/game/machinery/recharger.dm code/game/objects/hud.dm code/game/turfs/turf.dm code/modules/client/client defines.dm code/modules/clothing/head/misc.dm code/modules/clothing/spacesuits/rig.dm code/modules/clothing/under/miscellaneous.dm code/modules/mob/living/carbon/alien/humanoid/hud.dm code/modules/mob/living/carbon/human/hud.dm code/modules/mob/living/carbon/human/update_icons.dm code/modules/mob/living/carbon/monkey/hud.dm code/modules/mob/mob_cleanup.dm code/modules/mob/mob_defines.dm code/modules/mob/mob_helpers.dm code/modules/mob/mob_movement.dm code/modules/mob/screen.dm code/modules/paperwork/filingcabinet.dm code/modules/power/cable_heavyduty.dm code/modules/projectiles/guns/energy/temperature.dm code/setup.dm config/game_options.txt icons/mob/screen1_Midnight.dmi icons/mob/screen1_Orange.dmi icons/mob/screen1_alien.dmi icons/mob/screen1_old.dmi icons/obj/atmospherics/passive_gate.dmi icons/obj/pipe-item.dmi interface/interface.dm
184 lines
5.3 KiB
Plaintext
184 lines
5.3 KiB
Plaintext
////////////////////////////////////////////////////////////////////////////////
|
|
/// Pills.
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
/obj/item/weapon/reagent_containers/pill
|
|
name = "pill"
|
|
desc = "a pill."
|
|
icon = 'icons/obj/chemical.dmi'
|
|
icon_state = null
|
|
item_state = "pill"
|
|
possible_transfer_amounts = null
|
|
volume = 50
|
|
|
|
New()
|
|
..()
|
|
if(!icon_state)
|
|
icon_state = "pill[rand(1,20)]"
|
|
|
|
attackby(obj/item/weapon/W as obj, mob/user as mob)
|
|
if (istype(W, /obj/item/weapon/storage/pill_bottle))
|
|
var/obj/item/weapon/storage/pill_bottle/P = W
|
|
if (P.mode == 1)
|
|
for (var/obj/item/weapon/reagent_containers/pill/O in locate(src.x,src.y,src.z))
|
|
if(P.contents.len < P.storage_slots)
|
|
O.loc = P
|
|
P.orient2hud(user)
|
|
else
|
|
user << "\blue The pill bottle is full."
|
|
return
|
|
user << "\blue You pick up all the pills."
|
|
else
|
|
if (P.contents.len < P.storage_slots)
|
|
loc = P
|
|
P.orient2hud(user)
|
|
else
|
|
user << "\blue The pill bottle is full."
|
|
return
|
|
attack_self(mob/user as mob)
|
|
return
|
|
attack(mob/M as mob, mob/user as mob, def_zone)
|
|
if(M == user)
|
|
M << "\blue You swallow [src]."
|
|
M.drop_from_inventory(src) //icon update
|
|
if(reagents.total_volume)
|
|
reagents.reaction(M, INGEST)
|
|
spawn(5)
|
|
reagents.trans_to(M, reagents.total_volume)
|
|
del(src)
|
|
else
|
|
del(src)
|
|
return 1
|
|
|
|
else if(istype(M, /mob/living/carbon/human) )
|
|
|
|
for(var/mob/O in viewers(world.view, user))
|
|
O.show_message("\red [user] attempts to force [M] to swallow [src].", 1)
|
|
|
|
if(!do_mob(user, M)) return
|
|
|
|
user.drop_from_inventory(src) //icon update
|
|
for(var/mob/O in viewers(world.view, user))
|
|
O.show_message("\red [user] forces [M] to swallow [src].", 1)
|
|
|
|
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been fed [src.name] by [user.name] ([user.ckey]) Reagents: [reagentlist(src)]</font>")
|
|
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Fed [M.name] by [M.name] ([M.ckey]) Reagents: [reagentlist(src)]</font>")
|
|
|
|
|
|
log_attack("<font color='red'>[user.name] ([user.ckey]) fed [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])</font>")
|
|
|
|
log_admin("ATTACK: [user.name] ([user.ckey]) fed [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])")
|
|
msg_admin_attack("ATTACK: [user.name] ([user.ckey]) fed [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])") //BS12 EDIT ALG
|
|
|
|
|
|
if(reagents.total_volume)
|
|
reagents.reaction(M, INGEST)
|
|
spawn(5)
|
|
reagents.trans_to(M, reagents.total_volume)
|
|
del(src)
|
|
else
|
|
del(src)
|
|
|
|
return 1
|
|
|
|
return 0
|
|
|
|
afterattack(obj/target, mob/user , flag)
|
|
|
|
if(target.is_open_container() != 0 && target.reagents)
|
|
if(!target.reagents.total_volume)
|
|
user << "\red [target] is empty. Cant dissolve pill."
|
|
return
|
|
user << "\blue You dissolve the pill in [target]"
|
|
reagents.trans_to(target, reagents.total_volume)
|
|
for(var/mob/O in viewers(2, user))
|
|
O.show_message("\red [user] puts something in [target].", 1)
|
|
spawn(5)
|
|
del(src)
|
|
|
|
return
|
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
/// Pills. END
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
//Pills
|
|
/obj/item/weapon/reagent_containers/pill/antitox
|
|
name = "Anti-toxins pill"
|
|
desc = "Neutralizes many common toxins."
|
|
icon_state = "pill17"
|
|
New()
|
|
..()
|
|
reagents.add_reagent("anti_toxin", 50)
|
|
|
|
/obj/item/weapon/reagent_containers/pill/tox
|
|
name = "Toxins pill"
|
|
desc = "Highly toxic."
|
|
icon_state = "pill5"
|
|
New()
|
|
..()
|
|
reagents.add_reagent("toxin", 50)
|
|
|
|
/obj/item/weapon/reagent_containers/pill/cyanide
|
|
name = "Cyanide pill"
|
|
desc = "Don't swallow this."
|
|
icon_state = "pill5"
|
|
New()
|
|
..()
|
|
reagents.add_reagent("cyanide", 50)
|
|
|
|
/obj/item/weapon/reagent_containers/pill/adminordrazine
|
|
name = "Adminordrazine pill"
|
|
desc = "It's magic. We don't have to explain it."
|
|
icon_state = "pill16"
|
|
New()
|
|
..()
|
|
reagents.add_reagent("adminordrazine", 50)
|
|
|
|
/obj/item/weapon/reagent_containers/pill/stox
|
|
name = "Sleeping pill"
|
|
desc = "Commonly used to treat insomnia."
|
|
icon_state = "pill8"
|
|
New()
|
|
..()
|
|
reagents.add_reagent("stoxin", 30)
|
|
|
|
/obj/item/weapon/reagent_containers/pill/kelotane
|
|
name = "Kelotane pill"
|
|
desc = "Used to treat burns."
|
|
icon_state = "pill11"
|
|
New()
|
|
..()
|
|
reagents.add_reagent("kelotane", 30)
|
|
|
|
/obj/item/weapon/reagent_containers/pill/tramadol
|
|
name = "Tramadol pill"
|
|
desc = "A simple painkiller."
|
|
icon_state = "pill8"
|
|
New()
|
|
..()
|
|
reagents.add_reagent("tramadol", 15)
|
|
|
|
/obj/item/weapon/reagent_containers/pill/inaprovaline
|
|
name = "Inaprovaline pill"
|
|
desc = "Used to stabilize patients."
|
|
icon_state = "pill20"
|
|
New()
|
|
..()
|
|
reagents.add_reagent("inaprovaline", 30)
|
|
|
|
/obj/item/weapon/reagent_containers/pill/dexalin
|
|
name = "Dexalin pill"
|
|
desc = "Used to treat oxygen deprivation."
|
|
icon_state = "pill16"
|
|
New()
|
|
..()
|
|
reagents.add_reagent("dexalin", 30)
|
|
|
|
/obj/item/weapon/reagent_containers/pill/bicaridine
|
|
name = "Bicaridine pill"
|
|
desc = "Used to treat physical injuries."
|
|
icon_state = "pill18"
|
|
New()
|
|
..()
|
|
reagents.add_reagent("bicaridine", 30)
|