Skip to content

Commit

Permalink
blyat
Browse files Browse the repository at this point in the history
  • Loading branch information
TobyThorne committed Aug 18, 2024
1 parent 8be5b6b commit 5d63e5d
Show file tree
Hide file tree
Showing 12 changed files with 93 additions and 54 deletions.
4 changes: 2 additions & 2 deletions code/modules/clothing/clothing_accessories.dm
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
/obj/item/clothing/proc/attach_accessory(mob/user, obj/item/clothing/accessory/A)
LAZYADD(accessories, A)
A.on_attached(src, user)
add_verb(loc, /obj/item/clothing/proc/removetie_verb)
src.verbs |= /obj/item/clothing/proc/removetie_verb
update_accessory_slowdown()
update_clothing_icon()

Expand Down Expand Up @@ -107,7 +107,7 @@
A = accessories[1]
src.remove_accessory(usr,A)
if(!LAZYLEN(accessories))
remove_verb(loc, /obj/item/clothing/proc/removetie_verb)
src.verbs -= /obj/item/clothing/proc/removetie_verb

/obj/item/clothing/emp_act(severity)
if(LAZYLEN(accessories))
Expand Down
4 changes: 2 additions & 2 deletions code/modules/clothing/shoes.dm
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
holding.forceMove(src)

if(!holding)
remove_verb(loc, /obj/item/clothing/shoes/proc/draw_knife)
verbs -= /obj/item/clothing/shoes/proc/draw_knife

update_icon()
return
Expand All @@ -76,7 +76,7 @@
return
holding = I
user.visible_message("<span class='notice'>\The [user] shoves \the [I] into \the [src].</span>", range = 1)
add_verb(loc, /obj/item/clothing/shoes/proc/draw_knife)
verbs |= /obj/item/clothing/shoes/proc/draw_knife
update_icon()
else if(istype(I, /obj/item/flame/match))
var/obj/item/flame/match/M = I
Expand Down
7 changes: 7 additions & 0 deletions code/modules/clothing/spacesuits/rig/modules/computer.dm
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,13 @@
/mob
var/get_rig_stats = 0

/mob/living/Stat()
. = ..()
if(. && get_rig_stats)
var/obj/item/rig/rig = get_rig()
if(rig)
SetupStat(rig)

/obj/item/rig_module/ai_container/Process()
if(integrated_ai)
var/obj/item/rig/rig = get_rig()
Expand Down
35 changes: 15 additions & 20 deletions code/modules/clothing/spacesuits/rig/modules/modules.dm
Original file line number Diff line number Diff line change
Expand Up @@ -258,28 +258,23 @@
/obj/item/rig_module/proc/accepts_item(obj/item/input_device)
return 0

/mob/living/carbon/human/get_actions_for_statpanel()
/mob/living/carbon/human/Stat()
. = ..()

var/obj/item/rig/wearing_rig = back
if(istype(wearing_rig) && !wearing_rig.canremove)
. += list(list(
"Powersuit Modules"
"Suit charge:"
wearing_rig.cell ? "[wearing_rig.cell.charge]/[wearing_rig.cell.maxcharge]" : "ERROR"
))

for(var/obj/item/rig_module/module as anything in wearing_rig.installed_modules)
for(var/stat_rig_module/stat_module in module.stat_modules)
if(!stat_module.CanUse())
continue

. += list(list(
"Powersuit Modules",
stat_module.module.interface_name,
stat_module.name,
ref(stat_module),
))
if(. && istype(back, /obj/item/rig))
var/obj/item/rig/R = back
SetupStat(R)

/mob/proc/SetupStat(obj/item/rig/R)
if(R && !R.canremove && R.installed_modules.len && statpanel("Powersuit Modules"))
var/cell_status = R.cell ? "[R.cell.charge]/[R.cell.maxcharge]" : "ERROR"
stat("Suit charge", cell_status)
for(var/obj/item/rig_module/module in R.installed_modules)
{
for(var/stat_rig_module/SRM in module.stat_modules)
if(SRM.CanUse())
stat(SRM.module.interface_name,SRM)
}

/stat_rig_module
parent_type = /atom/movable
Expand Down
4 changes: 2 additions & 2 deletions code/modules/clothing/spacesuits/rig/suits/light.dm
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@
input = "\improper [input]"
SetName(input)
to_chat(M, "Suit naming succesful!")
remove_verb(loc, /obj/item/rig/light/ninja/verb/rename_suit)
verbs -= /obj/item/rig/light/ninja/verb/rename_suit
return 1


Expand All @@ -138,7 +138,7 @@
if(src && input && !M.incapacitated() && in_range(M,src))
desc = input
to_chat(M, "Suit description succesful!")
remove_verb(loc, /obj/item/rig/light/ninja/verb/rename_suit)
verbs -= /obj/item/rig/light/ninja/verb/rename_suit
return 1

/obj/item/clothing/gloves/rig/light/ninja
Expand Down
16 changes: 8 additions & 8 deletions code/modules/clothing/under/accessories/clothing.dm
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,11 @@

/obj/item/clothing/accessory/toggleable/on_attached(obj/item/clothing/under/S, mob/user as mob)
..()
has_suit.add_verb(has_suit.loc, /obj/item/clothing/accessory/toggleable/verb/toggle)
has_suit.verbs += /obj/item/clothing/accessory/toggleable/verb/toggle

/obj/item/clothing/accessory/toggleable/on_removed(mob/user as mob)
if(has_suit)
has_suit.remove_verb(has_suit.loc, /obj/item/clothing/accessory/toggleable/verb/toggle)
has_suit.verbs -= /obj/item/clothing/accessory/toggleable/verb/toggle
..()

/obj/item/clothing/accessory/toggleable/verb/toggle()
Expand Down Expand Up @@ -194,13 +194,13 @@

/obj/item/clothing/accessory/toggleable/flannel/on_attached(obj/item/clothing/under/S, mob/user as mob)
..()
has_suit.add_verb(has_suit.loc, /obj/item/clothing/accessory/toggleable/flannel/verb/tuck)
has_suit.add_verb(has_suit.loc, /obj/item/clothing/accessory/toggleable/flannel/verb/roll_up_sleeves)
has_suit.verbs += /obj/item/clothing/accessory/toggleable/flannel/verb/tuck
has_suit.verbs += /obj/item/clothing/accessory/toggleable/flannel/verb/roll_up_sleeves

/obj/item/clothing/accessory/toggleable/flannel/on_removed(mob/user as mob)
if(has_suit)
has_suit.remove_verb(has_suit.loc, /obj/item/clothing/accessory/toggleable/flannel/verb/tuck)
has_suit.remove_verb(has_suit.loc, /obj/item/clothing/accessory/toggleable/flannel/verb/roll_up_sleeves)
has_suit.verbs -= /obj/item/clothing/accessory/toggleable/flannel/verb/tuck
has_suit.verbs -= /obj/item/clothing/accessory/toggleable/flannel/verb/roll_up_sleeves
..()

/obj/item/clothing/accessory/toggleable/flannel/do_toggle(user)
Expand Down Expand Up @@ -285,11 +285,11 @@

/obj/item/clothing/accessory/security_shirt/on_attached(obj/item/clothing/under/S, mob/user)
..()
has_suit.add_verb(has_suit.loc, /obj/item/clothing/accessory/security_shirt/verb/roll_up_sleeves)
has_suit.verbs += /obj/item/clothing/accessory/security_shirt/verb/roll_up_sleeves

/obj/item/clothing/accessory/security_shirt/on_removed(mob/user)
if(has_suit)
has_suit.remove_verb(has_suit.loc, /obj/item/clothing/accessory/security_shirt/verb/roll_up_sleeves)
has_suit.verbs -= /obj/item/clothing/accessory/security_shirt/verb/roll_up_sleeves
..()

/obj/item/clothing/accessory/security_shirt/verb/roll_up_sleeves()
Expand Down
6 changes: 3 additions & 3 deletions code/modules/clothing/under/accessories/holster.dm
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

/obj/item/clothing/accessory/holster/Destroy()
if(has_suit)
has_suit.remove_verb(has_suit.loc, /obj/item/clothing/accessory/holster/verb/holster_verb)
has_suit.verbs -= /obj/item/clothing/accessory/holster/verb/holster_verb
QDEL_NULL(holstered)
QDEL_NULL(holster_action)
return ..()
Expand Down Expand Up @@ -129,11 +129,11 @@

/obj/item/clothing/accessory/holster/on_attached(obj/item/clothing/under/S, mob/user)
..()
has_suit.add_verb(has_suit.loc, /obj/item/clothing/accessory/holster/verb/holster_verb)
has_suit.verbs += /obj/item/clothing/accessory/holster/verb/holster_verb

/obj/item/clothing/accessory/holster/on_removed(mob/user)
if(has_suit)
has_suit.remove_verb(has_suit.loc, /obj/item/clothing/accessory/holster/verb/holster_verb)
has_suit.verbs -= /obj/item/clothing/accessory/holster/verb/holster_verb
..()

//For the holster hotkey
Expand Down
4 changes: 2 additions & 2 deletions code/modules/clothing/under/accessories/ties.dm
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,11 @@

/obj/item/clothing/accessory/bowtie/on_attached(obj/item/clothing/under/S, mob/user as mob)
..()
has_suit.add_verb(has_suit.loc, /obj/item/clothing/accessory/bowtie/verb/toggle)
has_suit.verbs += /obj/item/clothing/accessory/bowtie/verb/toggle

/obj/item/clothing/accessory/bowtie/on_removed(mob/user as mob)
if(has_suit)
has_suit.remove_verb(has_suit.loc, /obj/item/clothing/accessory/bowtie/verb/toggle)
has_suit.verbs -= /obj/item/clothing/accessory/bowtie/verb/toggle
..()

/obj/item/clothing/accessory/bowtie/verb/toggle()
Expand Down
6 changes: 3 additions & 3 deletions code/modules/emotes/emote_mob.dm
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
var/datum/emote/E = GLOB.all_emotes[path]
set_emote(E.key, E)
if(!isnull(E.statpanel_proc))
grant_verb(src, E.statpanel_proc)
verbs |= E.statpanel_proc

default_emotes = null

Expand All @@ -32,7 +32,7 @@
for(var/datum/emote/E in GLOB.all_emotes)
clear_emote(E.key)
if(!isnull(E.statpanel_proc))
revoke_verb(src, E.statpanel_proc)
verbs -= E.statpanel_proc

/mob/proc/get_emote(key)
return LAZYACCESS(current_emotes, key)
Expand Down Expand Up @@ -66,7 +66,7 @@
var/datum/emote/E = GLOB.all_emotes[path]
set_emote(E.key, E)
if(!isnull(E.statpanel_proc))
grant_verb(src, E.statpanel_proc)
verbs |= E.statpanel_proc

/// A simple emote - just the message, and it's type. For anything more complex use datumized emotes.
/mob/proc/custom_emote(message_type = VISIBLE_MESSAGE, message, intentional = FALSE)
Expand Down
40 changes: 39 additions & 1 deletion code/modules/mob/living/bot/secbot.dm
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@

handcuffs = new(src)

grant_verb(src, secbot_verbs_default)
src.verbs |= secbot_verbs_default

hud_list[ID_HUD] = new /image/hud_overlay('icons/mob/huds/hud.dmi', src, "hudblank")
hud_list[WANTED_HUD] = new /image/hud_overlay('icons/mob/huds/hud.dmi', src, "hudblank")
Expand Down Expand Up @@ -470,6 +470,44 @@
if(!client && prob(10))
to_chat(src, SPAN_NOTICE("...[pick(secbot_dreams)]..."))

/mob/living/bot/secbot/Stat()
..()
if(statpanel("Status"))
stat(null,"-------------")
switch(emagged)
if(0)
stat(null,"Threat identifier status: Normal")
if(1)
stat(null,"Threat identifier status: Scrambled (DANGER)")
if(2)
stat(null,"Threat identifier status: ERROROROROROR-----")
if(idcheck)
stat(null,"Check for weapon authorization: Yes")
else
stat(null,"Check for weapon authorization: No")

if(check_records)
stat(null,"Check security records:: Yes")
else
stat(null,"Check security records:: No")

if(check_arrest)
stat(null,"Check arrest status: Yes")
else
stat(null,"Check arrest status: No")

if(declare_arrests)
stat(null,"Report arrests: Yes")
else
stat(null,"Report arrests: No")

if(will_patrol)
stat(null,"Auto patrol: On")
else
stat(null,"Auto patrol: Off")

stat(null,"-------------")

//**///////////////////////////////////////////////////////////**//
//**///////////////////////////BOOPSKY/////////////////////////**//
//**///////////////////////////////////////////////////////////**//
Expand Down
9 changes: 5 additions & 4 deletions code/modules/mob/living/carbon/alien/alien.dm
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,8 @@

time_of_birth = world.time

grant_verb(src, list(
/mob/living/proc/ventcrawl,
/mob/living/proc/hide,
))
verbs += /mob/living/proc/ventcrawl
verbs += /mob/living/proc/hide

instance_num = rand(1, 1000)
name = "[initial(name)] ([instance_num])"
Expand All @@ -45,6 +43,9 @@
/mob/living/carbon/alien/__unequip(obj/W)
return

/mob/living/carbon/alien/Stat()
. = ..()

/mob/living/carbon/alien/restrained()
return 0

Expand Down
12 changes: 5 additions & 7 deletions code/modules/mob/living/carbon/alien/diona/diona.dm
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
if(W == hat)
hat = null
update_icons()
revoke_verb(src, /mob/living/carbon/alien/diona/proc/drop_hat)
verbs -= /mob/living/carbon/alien/diona/proc/drop_hat
else if(W == holding_item)
holding_item = null

Expand All @@ -53,10 +53,8 @@
add_language(LANGUAGE_ROOTGLOBAL)
add_language(LANGUAGE_GALCOM)

grant_verb(src, list(
/mob/living/carbon/alien/diona/proc/merge,
/mob/living/carbon/alien/diona/proc/drop_holding_item,
))
verbs += /mob/living/carbon/alien/diona/proc/merge
verbs += /mob/living/carbon/alien/diona/proc/drop_holding_item

/mob/living/carbon/alien/diona/put_in_hands(obj/item/W) // No hands. Use mouth.
if(can_collect(W))
Expand All @@ -71,7 +69,7 @@
hat = new_hat
new_hat.forceMove(src)
update_icons()
grant_verb(src, /mob/living/carbon/alien/diona/proc/drop_hat)
verbs += /mob/living/carbon/alien/diona/proc/drop_hat
return TRUE

/mob/living/carbon/alien/diona/proc/handle_npc(mob/living/carbon/alien/diona/D)
Expand Down Expand Up @@ -146,7 +144,7 @@
src.hat.forceMove(get_turf(src))
src.hat = null
update_icons()
revoke_verb(src, /mob/living/carbon/alien/diona/proc/drop_hat)
verbs -= /mob/living/carbon/alien/diona/proc/drop_hat

/mob/living/carbon/alien/diona/drop_active_hand()
if(holding_item)
Expand Down

0 comments on commit 5d63e5d

Please sign in to comment.