Skip to content

Commit

Permalink
super display and roundstart text display stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
silencer-pl committed Sep 5, 2024
1 parent a572c18 commit 5f70c13
Show file tree
Hide file tree
Showing 8 changed files with 87 additions and 11 deletions.
4 changes: 2 additions & 2 deletions code/game/gamemodes/colonialmarines/colonialmarines.dm
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,8 @@
if(SSmapping.configs[GROUND_MAP].environment_traits[ZTRAIT_BASIC_RT])
flags_round_type |= MODE_BASIC_RT

addtimer(CALLBACK(src, PROC_REF(ares_online)), 5 SECONDS)
addtimer(CALLBACK(src, PROC_REF(map_announcement)), 20 SECONDS)
// addtimer(CALLBACK(src, PROC_REF(ares_online)), 5 SECONDS)
// addtimer(CALLBACK(src, PROC_REF(map_announcement)), 20 SECONDS)

return ..()

Expand Down
4 changes: 2 additions & 2 deletions code/game/gamemodes/extended/infection.dm
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
for(var/mob/new_player/np in GLOB.new_player_list)
np.new_player_panel_proc()

addtimer(CALLBACK(src, PROC_REF(ares_online)), 5 SECONDS)
addtimer(CALLBACK(src, PROC_REF(map_announcement)), 20 SECONDS)
// addtimer(CALLBACK(src, PROC_REF(ares_online)), 5 SECONDS)
// addtimer(CALLBACK(src, PROC_REF(map_announcement)), 20 SECONDS)
return ..()

/datum/game_mode/infection/proc/map_announcement()
Expand Down
9 changes: 2 additions & 7 deletions code/game/jobs/job/job.dm
Original file line number Diff line number Diff line change
Expand Up @@ -213,16 +213,11 @@
set waitfor = 0
sleep(10)
if(H && H.loc && H.client)
var/title_given
title_given = lowertext(disp_title)

//Document syntax cannot have tabs for proper formatting.
var/entrydisplay = " \
[SPAN_ROLE_BODY("|______________________|")] \n\
[SPAN_ROLE_HEADER("You are \a [title_given]")] \n\
[flags_startup_parameters & ROLE_ADMIN_NOTIFY ? SPAN_ROLE_HEADER("You are playing a job that is important for game progression. If you have to disconnect, please notify the admins via adminhelp.") : ""] \n\
[SPAN_ROLE_BODY("[generate_entry_message(H)]<br>[M ? "Your account number is: <b>[M.account_number]</b>. Your account pin is: <b>[M.remote_access_pin]</b>." : "You do not have a bank account."]")] \n\
[SPAN_ROLE_BODY("|______________________|")] \
[flags_startup_parameters & ROLE_ADMIN_NOTIFY ? narrate_head("You are playing a job that is important for game progression. If you have to disconnect, please notify the admins via adminhelp.") : ""] \n\
[narrate_body("[generate_entry_message(H)]<br>[M ? "Your account number is: <b>[M.account_number]</b>. Your account pin is: <b>[M.remote_access_pin]</b>." : "You do not have a bank account."]")] \n\
"
to_chat_spaced(H, html = entrydisplay)

Expand Down
44 changes: 44 additions & 0 deletions code/game/objects/items/misc.dm
Original file line number Diff line number Diff line change
Expand Up @@ -426,3 +426,47 @@
. = ..()

map.tgui_interact(user)

/obj/item/stim_injector
desc = "An autoinjector with five compartments."
icon = 'icons/obj/items/syringe.dmi'
item_state = "stim_5"
var/owner_mob
var/volume = 25
var/cooldown_time = 0
var/cooldown_val = 50


/obj/item/stim_injector/update_icon()
if(volume > 0)
var/text_to_append = num2text(floor(volume / 5))
icon_state = "stim_[text_to_append]"
else
icon_state = "stim_empty"
. = ..()


/obj/item/stim_injector/Initialize(mapload, ...)
. = ..()
create_reagents(volume)
reagents.add_reagent("SuperStim", volume)

/obj/item/stim_injector/attack_self(mob/user)
. = ..()
attack(user, user)

/obj/item/stim_injector/attack(mob/living/M, mob/living/user)
if(volume <= 0)
to_chat(SPAN_WARNING("Your stim is empty!"))
if(cooldown_time > world.time)
return
if(!do_after(user, 20, INTERRUPT_ALL, BUSY_ICON_FRIENDLY, M, INTERRUPT_MOVED, BUSY_ICON_MEDICAL))
return
cooldown_time = world.time + cooldown_val
playsound(loc, 'sound/items/hypospray.ogg', 60, 1)
reagents.reaction(M, INGEST)
reagents.trans_to(M, 5)
user.visible_message("[user] injects [M] with the Super Stimulant!", "You inject [M] with the Super Stimulant!")
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been injected with a SuperStim by [key_name(user)].")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Has injected [key_name(M)] with a SuperStim.")
update_icon()
6 changes: 6 additions & 0 deletions code/modules/gear_presets/xenosurge.dm
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@
back_item = /obj/item/storage/backpack/marine

new_human.equip_to_slot_or_del(new back_item(new_human), WEAR_BACK)
var/obj/item/stim_injector/injector = new_human.put_in_any_hand_if_possible(new /obj/item/stim_injector(new_human))
new_human.bind_stimpack(injector)


/datum/job/marine/pve/point
Expand Down Expand Up @@ -74,6 +76,8 @@
back_item = /obj/item/storage/backpack/marine

new_human.equip_to_slot_or_del(new back_item(new_human), WEAR_BACK)
var/obj/item/stim_injector/injector = new_human.put_in_any_hand_if_possible(new /obj/item/stim_injector(new_human))
new_human.bind_stimpack(injector)

/datum/job/marine/pve/lead
title = JOB_UER_MARINE_LEAD
Expand Down Expand Up @@ -102,3 +106,5 @@
back_item = /obj/item/storage/backpack/marine

new_human.equip_to_slot_or_del(new back_item(new_human), WEAR_BACK)
var/obj/item/stim_injector/injector = new_human.put_in_any_hand_if_possible(new /obj/item/stim_injector(new_human))
new_human.bind_stimpack(injector)
16 changes: 16 additions & 0 deletions code/modules/mob/living/carbon/human/human.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1714,3 +1714,19 @@
item.showoff(src)
return TRUE
return ..()

/mob/living/carbon/human/proc/bind_stimpack(obj/item/stim_injector/pack_to_bind)
bound_injector = pack_to_bind

/mob/living/carbon/human/verb/find_injector()
set name = "Recall Injector"
set desc = "Recalls a bound injector."
set category = "IC"

if(bound_injector != null)
usr.put_in_any_hand_if_possible(bound_injector)
to_chat(usr, SPAN_INFO("Injector returned to hand or turf underneath."))
return
else
to_chat(usr, SPAN_WARNING("No bound Injector found!"))
return
3 changes: 3 additions & 0 deletions code/modules/mob/living/carbon/human/human_defines.dm
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,9 @@
/// static associated list of limb key -> image to avoid unnecessary overlay generation
var/static/list/icon_render_image_cache = list()

//hypo shenanigans
var/obj/item/stim_injector/bound_injector

/client/var/cached_human_playtime

/client/proc/get_total_human_playtime(skip_cache = FALSE)
Expand Down
12 changes: 12 additions & 0 deletions code/modules/reagents/chemistry_reagents/medical.dm
Original file line number Diff line number Diff line change
Expand Up @@ -424,3 +424,15 @@
custom_metabolism = AMOUNT_PER_TIME(1, 200 SECONDS)
data = 0
properties = list(PROPERTY_CURING = 2)

/datum/reagent/medical/stimfluid
name = "Stimulant liquid"
id = "SuperStim"
description = "A light green tinted watery liquid. Smells like fresh apples. Tastest awful, which is why it should be injected."
reagent_state = LIQUID
volume = 1
color = "#8ae786"
custom_metabolism = AMOUNT_PER_TIME(1, 10)
data = 0
overdose = 200
properties = list(PROPERTY_OMNIPOTENT = 1,PROPERTY_DEFIBRILLATING = 5,PROPERTY_CARDIOSTABILIZING = 5, PROPERTY_PAINKILLING = 5)

0 comments on commit 5f70c13

Please sign in to comment.