Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.

Commit 393ff45

Browse files
committed
skill solution
1 parent 892d598 commit 393ff45

File tree

4 files changed

+71
-4
lines changed

4 files changed

+71
-4
lines changed
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
/obj/item/skill_injector
2+
name = "skilltrainer"
3+
desc = "A sophisticated-looking injector. Utilizes nanites to enhance skills of the user."
4+
icon = 'icons/obj/syringe.dmi'
5+
icon_state = "mechserum0"
6+
item_state = "medipen"
7+
lefthand_file = 'icons/mob/inhands/equipment/medical_lefthand.dmi'
8+
righthand_file = 'icons/mob/inhands/equipment/medical_righthand.dmi'
9+
var/used = FALSE
10+
var/amount_to_give = EXP_MASTER
11+
12+
/obj/item/skill_injector/examine(mob/user)
13+
. = ..()
14+
if(used)
15+
. += span_notice("It is spent.")
16+
else
17+
. += span_notice("It is currently loaded.")
18+
19+
/obj/item/skill_injector/interact(mob/user)
20+
. = ..()
21+
start_injecting(user, user)
22+
23+
/obj/item/skill_injector/pre_attack(atom/target, mob/living/user, params)
24+
. = ..()
25+
if(.)
26+
return
27+
if(!ishuman(target))
28+
return
29+
start_injecting(target, user)
30+
return TRUE
31+
32+
/obj/item/skill_injector/proc/start_injecting(mob/living/target, mob/living/user)
33+
if(used)
34+
to_chat(user, span_warning("[src] is empty!"))
35+
return
36+
if(target == user)
37+
to_chat(target, span_warning("You begin to use [src]."))
38+
else
39+
to_chat(target, span_warning("You feel a tiny prick!"))
40+
to_chat(user, span_notice("You begin to inject [target] with [src]."))
41+
if(!do_after(user, 3 SECONDS, target))
42+
return
43+
if(target == user)
44+
target.visible_message(span_danger("[user] injects themselves with [src]!"), span_warning("You inject yourself with [src]."), vision_distance = COMBAT_MESSAGE_RANGE)
45+
else
46+
target.visible_message(span_danger("[user] injects [target] with [src]!"), span_userdanger("[user] injects you with [src]!"), vision_distance = COMBAT_MESSAGE_RANGE)
47+
playsound(src, 'sound/items/autoinjector.ogg', 25)
48+
target.add_skill_points(amount_to_give)
49+
used = TRUE
50+
51+
/obj/item/skill_injector/advanced
52+
amount_to_give = EXP_GENIUS + EXP_LOW

code/modules/reagents/reagent_containers/hypospray.dm

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,7 @@
462462
if(!target.is_injectable(user))
463463
to_chat(user, span_warning("You cannot directly fill [target]!"))
464464
return
465-
465+
466466
//The actual reagent transfer
467467
var/fraction = min(transfer_amount/container.reagents.total_volume, 1)
468468
container.reagents.reaction(C, INJECT, fraction)
@@ -524,7 +524,7 @@
524524
var/transfered_amount = 0
525525
//Drawing from a mob
526526
var/mob/living/L = target
527-
if(istype(L))
527+
if(istype(L))
528528
transfered_amount = container.reagents.maximum_volume - container.reagents.total_volume
529529
if(target != user)
530530
target.visible_message(span_danger("[user] is trying to take a blood sample from [target]!"), \
@@ -539,7 +539,7 @@
539539
to_chat(user, span_warning("You are unable to draw any blood from [L]!"))
540540

541541
//If not mob
542-
else
542+
else
543543
if(!target?.reagents?.total_volume)
544544
to_chat(user, span_warning("[target] is empty!"))
545545
return
@@ -572,7 +572,7 @@
572572
container = /obj/item/reagent_containers/glass/bottle/adminordrazine
573573
upgrade_flags = PIERCING
574574
possible_transfer_amounts = list(0.1, 1, 5, 10, 15, 20, 30, 50, 100)
575-
575+
576576
/obj/item/hypospray/combat
577577
name = "combat hypospray"
578578
desc = "A combat-ready deluxe hypospray that acts almost instantly."

code/modules/uplink/uplink_items.dm

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2144,6 +2144,20 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item))
21442144
// Nukies have no use for this and their autosurgeons are already multi-use
21452145
exclude_antags = list(ROLE_OPERATIVE, ROLE_CLOWNOP)
21462146

2147+
/datum/uplink_item/implants/skill_injector
2148+
name = "Skilltrainer"
2149+
desc = "A single-use neural enhancement injector. Once activated, the nanites will enable the host to perform as if they had been professionally trained."
2150+
item = /obj/item/skill_injector
2151+
manufacturer = /datum/corporation/traitor/cybersun
2152+
cost = 2
2153+
exclude_antags = list(ROLE_OPERATIVE, ROLE_CLOWNOP)
2154+
2155+
/datum/uplink_item/implants/skill_injector/nukies
2156+
item = /obj/item/skill_injector/advanced
2157+
manufacturer = /datum/corporation/traitor/cybersun
2158+
cost = 5
2159+
include_antags = list(ROLE_OPERATIVE, ROLE_CLOWNOP)
2160+
21472161
/datum/uplink_item/implants/adrenal
21482162
name = "Adrenal Implant"
21492163
desc = "An implant injected into the body, and later activated at the user's will. It will inject a chemical \

yogstation.dme

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1329,6 +1329,7 @@
13291329
#include "code\game\objects\items\shuttle_upgrades.dm"
13301330
#include "code\game\objects\items\signs.dm"
13311331
#include "code\game\objects\items\singularityhammer.dm"
1332+
#include "code\game\objects\items\skill_injector.dm"
13321333
#include "code\game\objects\items\stunbaton.dm"
13331334
#include "code\game\objects\items\supermatter_delaminator.dm"
13341335
#include "code\game\objects\items\syndicateReverseCard.dm"

0 commit comments

Comments
 (0)