mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-21 03:55:05 +01:00
Small object manipulation stuff
This commit is contained in:
@@ -10,6 +10,13 @@
|
||||
sprite_sheets = list(
|
||||
"Vox" = 'icons/mob/species/vox/mask.dmi'
|
||||
)
|
||||
|
||||
// Clumsy folks can't take the mask off themselves.
|
||||
/obj/item/clothing/mask/muzzle/attack_hand(mob/user as mob)
|
||||
if(user.wear_mask == src && !user.IsAdvancedToolUser())
|
||||
return 0
|
||||
..()
|
||||
|
||||
/obj/item/clothing/mask/muzzle/gag
|
||||
name = "gag"
|
||||
desc = "Stick this in their mouth to stop the noise."
|
||||
|
||||
@@ -1091,9 +1091,6 @@
|
||||
tinted += MT.tint
|
||||
return tinted
|
||||
|
||||
/mob/living/carbon/human/IsAdvancedToolUser()
|
||||
return 1//Humans can use guns and such
|
||||
|
||||
|
||||
/mob/living/carbon/human/abiotic(var/full_body = 0)
|
||||
if(full_body && ((src.l_hand && !(src.l_hand.flags & ABSTRACT)) || (src.r_hand && !(src.r_hand.flags & ABSTRACT)) || (src.back || src.wear_mask || src.head || src.shoes || src.w_uniform || src.wear_suit || src.glasses || src.l_ear || src.r_ear || src.gloves)))
|
||||
@@ -1690,4 +1687,12 @@
|
||||
return 1
|
||||
|
||||
/mob/living/carbon/human/InCritical()
|
||||
return (health <= config.health_threshold_crit && stat == UNCONSCIOUS)
|
||||
return (health <= config.health_threshold_crit && stat == UNCONSCIOUS)
|
||||
|
||||
|
||||
/mob/living/carbon/human/IsAdvancedToolUser(var/silent)
|
||||
if(species.has_fine_manipulation)
|
||||
return 1
|
||||
if(!silent)
|
||||
src << "<span class='warning'>You don't have the dexterity to use that!<span>"
|
||||
return 0
|
||||
@@ -11,7 +11,8 @@
|
||||
default_language = "Chimpanzee"
|
||||
greater_form = "Human"
|
||||
is_small = 1
|
||||
//has_fine_manipulation = 0
|
||||
has_fine_manipulation = 0
|
||||
ventcrawler = 1
|
||||
show_ssd = 0
|
||||
eyes = "blank_eyes"
|
||||
|
||||
|
||||
@@ -56,6 +56,7 @@
|
||||
var/list/default_genes = list()
|
||||
|
||||
var/ventcrawler = 0 //Determines if the mob can go through the vents.
|
||||
var/has_fine_manipulation = 1 // Can use small items.
|
||||
|
||||
var/flags = 0 // Various specific features.
|
||||
var/bloodflags=0
|
||||
|
||||
@@ -321,3 +321,6 @@
|
||||
if ("Disable")
|
||||
sensor_mode = 0
|
||||
src << "Sensor augmentations disabled."
|
||||
|
||||
/mob/living/silicon/IsAdvancedToolUser()
|
||||
return 1
|
||||
@@ -1492,4 +1492,4 @@ mob/proc/yank_out_object()
|
||||
return
|
||||
|
||||
/mob/proc/handle_ventcrawl()
|
||||
return // Only living mobs can ventcrawl
|
||||
return // Only living mobs can ventcrawl
|
||||
|
||||
@@ -811,6 +811,8 @@
|
||||
return 0
|
||||
if(!user.client)
|
||||
return 0
|
||||
if(!user.IsAdvancedToolUser())
|
||||
return 0
|
||||
if ( ! (istype(user, /mob/living/carbon/human) || \
|
||||
istype(user, /mob/living/silicon)))
|
||||
user << "\red You don't have the dexterity to use this [src]!"
|
||||
|
||||
@@ -56,6 +56,8 @@
|
||||
|
||||
|
||||
proc/special_check(var/mob/M) //Placeholder for any special checks, like detective's revolver.
|
||||
if(!usr.IsAdvancedToolUser())
|
||||
return 0
|
||||
return 1
|
||||
|
||||
|
||||
|
||||
@@ -212,22 +212,19 @@
|
||||
|
||||
// human interact with machine
|
||||
attack_hand(mob/user as mob)
|
||||
if(stat & BROKEN)
|
||||
return
|
||||
|
||||
if(user && user.loc == src)
|
||||
usr << "\red You cannot reach the controls from inside."
|
||||
return
|
||||
/*
|
||||
if(mode==-1)
|
||||
usr << "\red The disposal units power is disabled."
|
||||
return
|
||||
*/
|
||||
interact(user, 0)
|
||||
|
||||
// hostile mob escape from disposals
|
||||
attack_animal(var/mob/living/simple_animal/M)
|
||||
if(M.environment_smash)
|
||||
M.do_attack_animation(src)
|
||||
visible_message("<span class='danger'>[M.name] smashes \the [src] apart!</span>")
|
||||
qdel(src)
|
||||
// Clumsy folks can only flush it.
|
||||
if(user.IsAdvancedToolUser(1))
|
||||
interact(user, 0)
|
||||
else
|
||||
flush = !flush
|
||||
update()
|
||||
return
|
||||
|
||||
// user interaction
|
||||
|
||||
@@ -52,6 +52,8 @@
|
||||
stat |= NOPOWER
|
||||
|
||||
/obj/machinery/keycard_auth/attack_hand(mob/user as mob)
|
||||
if(!user.IsAdvancedToolUser())
|
||||
return 0
|
||||
ui_interact(user)
|
||||
|
||||
/obj/machinery/keycard_auth/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
|
||||
|
||||
Reference in New Issue
Block a user