mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 18:53:06 +00:00
Updated ismonkey(), refactored kitchen spike, refactored plastic flaps.
This commit is contained in:
@@ -235,7 +235,7 @@ datum/hud/New(mob/owner)
|
||||
|
||||
if(ishuman(mymob))
|
||||
human_hud(ui_style, ui_color, ui_alpha, mymob) // Pass the player the UI style chosen in preferences
|
||||
else if(ismonkey(mymob))
|
||||
else if(issmall(mymob))
|
||||
monkey_hud(ui_style)
|
||||
else if(isbrain(mymob))
|
||||
brain_hud(ui_style)
|
||||
|
||||
@@ -102,7 +102,7 @@
|
||||
|
||||
if (usr.stat != 0)
|
||||
return
|
||||
if (!ishuman(usr) && !ismonkey(usr)) //Make sure they're a mob that has dna
|
||||
if (!ishuman(usr) && !issmall(usr)) //Make sure they're a mob that has dna
|
||||
usr << "\blue Try as you might, you can not climb up into the scanner."
|
||||
return
|
||||
if (src.occupant)
|
||||
|
||||
@@ -822,7 +822,7 @@ var/list/datum/dna/hivemind_bank = list()
|
||||
|
||||
var/mob/living/carbon/T = changeling_sting(40,/mob/proc/changeling_transformation_sting)
|
||||
if(!T) return 0
|
||||
if((HUSK in T.mutations) || (!ishuman(T) && !ismonkey(T)))
|
||||
if((HUSK in T.mutations) || (!ishuman(T) && !issmall(T)))
|
||||
src << "<span class='warning'>Our sting appears ineffective against its DNA.</span>"
|
||||
return 0
|
||||
T.visible_message("<span class='warning'>[T] transforms!</span>")
|
||||
|
||||
@@ -408,7 +408,7 @@
|
||||
set category = "Object"
|
||||
set src in oview(1)
|
||||
|
||||
if(usr.stat != 0 || !(ishuman(usr) || ismonkey(usr)))
|
||||
if(usr.stat != 0 || !(ishuman(usr) || issmall(usr)))
|
||||
return
|
||||
|
||||
if(src.occupant)
|
||||
|
||||
@@ -194,9 +194,9 @@
|
||||
if(critter.meat_type)
|
||||
slab_type = critter.meat_type
|
||||
else if(istype(src.occupant,/mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = occupant
|
||||
slab_name = src.occupant.real_name
|
||||
// /obj/item/weapon/reagent_containers/food/snacks/meat/monkey Move to species datum.
|
||||
slab_type = /obj/item/weapon/reagent_containers/food/snacks/meat/human
|
||||
slab_type = H.species.meat_type
|
||||
|
||||
// Small mobs don't give as much nutrition.
|
||||
if(src.occupant.small)
|
||||
|
||||
@@ -488,7 +488,7 @@
|
||||
if(iscuffed(L)) // If the target is handcuffed, leave it alone
|
||||
return TURRET_NOT_TARGET
|
||||
|
||||
if(isanimal(L) || ismonkey(L)) // Animals are not so dangerous
|
||||
if(isanimal(L) || issmall(L)) // Animals are not so dangerous
|
||||
return check_anomalies ? TURRET_SECONDARY_TARGET : TURRET_NOT_TARGET
|
||||
if(isxenomorph(L) || isalien(L)) // Xenos are dangerous
|
||||
return check_anomalies ? TURRET_PRIORITY_TARGET : TURRET_NOT_TARGET
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
race = "[H.species.name]"
|
||||
|
||||
|
||||
else if(ismonkey(M))
|
||||
else if(issmall(M))
|
||||
race = "Monkey"
|
||||
language = race
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
//returns 1 if the master item's parent's MouseDrop() should be called, 0 otherwise. It's strange, but no other way of
|
||||
//doing it without the ability to call another proc's parent, really.
|
||||
/obj/item/weapon/storage/internal/proc/handle_mousedrop(mob/user as mob, obj/over_object as obj)
|
||||
if (ishuman(user) || ismonkey(user)) //so monkeys can take off their backpacks -- Urist
|
||||
if (ishuman(user) || issmall(user)) //so monkeys can take off their backpacks -- Urist
|
||||
|
||||
if (istype(user.loc,/obj/mecha)) // stops inventory actions in a mech
|
||||
return 0
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
if(!canremove)
|
||||
return
|
||||
|
||||
if (ishuman(usr) || ismonkey(usr)) //so monkeys can take off their backpacks -- Urist
|
||||
if (ishuman(usr) || issmall(usr)) //so monkeys can take off their backpacks -- Urist
|
||||
|
||||
if (istype(usr.loc,/obj/mecha)) // stops inventory actions in a mech
|
||||
return
|
||||
|
||||
@@ -66,6 +66,14 @@
|
||||
|
||||
..()
|
||||
|
||||
if(istype(user, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(H.species.is_small)
|
||||
user << "<span class='warning'>It's too heavy for you to wield fully.</span>"
|
||||
return
|
||||
else
|
||||
return
|
||||
|
||||
if(wielded) //Trying to unwield it
|
||||
unwield()
|
||||
user << "<span class='notice'>You are now carrying the [name] with one hand.</span>"
|
||||
|
||||
@@ -4,76 +4,57 @@
|
||||
name = "a meat spike"
|
||||
icon = 'icons/obj/kitchen.dmi'
|
||||
icon_state = "spike"
|
||||
desc = "A spike for collecting meat from animals"
|
||||
desc = "A spike for collecting meat from animals."
|
||||
density = 1
|
||||
anchored = 1
|
||||
var/meat = 0
|
||||
var/occupied = 0
|
||||
var/meattype = 0 // 0 - Nothing, 1 - Monkey, 2 - Xeno
|
||||
var/occupied
|
||||
var/meat_type
|
||||
var/victim_name = "corpse"
|
||||
|
||||
/obj/structure/kitchenspike
|
||||
|
||||
attackby(obj/item/weapon/grab/G as obj, mob/user as mob)
|
||||
if(!istype(G, /obj/item/weapon/grab))
|
||||
/obj/structure/kitchenspike/attackby(obj/item/weapon/grab/G as obj, mob/user as mob)
|
||||
if(!istype(G, /obj/item/weapon/grab) || !G.affecting)
|
||||
return
|
||||
if(istype(G.affecting, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = G.affecting
|
||||
if(H.species.is_small)
|
||||
if(src.occupied == 0)
|
||||
src.icon_state = "spikebloody"
|
||||
src.occupied = 1
|
||||
src.meat = 5
|
||||
src.meattype = 1
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message(text("\red [user] has forced [G.affecting] onto the spike, killing them instantly!"))
|
||||
if(occupied)
|
||||
user << "<span class = 'danger'>The spike already has something on it, finish collecting its meat first!</span>"
|
||||
else
|
||||
if(spike(G.affecting))
|
||||
visible_message("<span class = 'danger'>[user] has forced [G.affecting] onto the spike, killing them instantly!</span>")
|
||||
del(G.affecting)
|
||||
del(G)
|
||||
else
|
||||
user << "\red The spike already has something on it, finish collecting its meat first!"
|
||||
else if(istype(G.affecting, /mob/living/carbon/alien))
|
||||
if(src.occupied == 0)
|
||||
src.icon_state = "spikebloodygreen"
|
||||
src.occupied = 1
|
||||
src.meat = 5
|
||||
src.meattype = 2
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message(text("\red [user] has forced [G.affecting] onto the spike, killing them instantly!"))
|
||||
del(G.affecting)
|
||||
del(G)
|
||||
else
|
||||
user << "\red The spike already has something on it, finish collecting its meat first!"
|
||||
else
|
||||
user << "\red They are too big for the spike, try something smaller!"
|
||||
user << "<span class='danger'>They are too big for the spike, try something smaller!</span>"
|
||||
|
||||
/obj/structure/kitchenspike/proc/spike(var/mob/living/victim)
|
||||
|
||||
if(!istype(victim))
|
||||
return
|
||||
|
||||
// MouseDrop_T(var/atom/movable/C, mob/user)
|
||||
// if(istype(C, /obj/mob/carbon/monkey)
|
||||
// else if(istype(C, /obj/mob/carbon/alien) && !istype(C, /mob/living/carbon/alien/larva/slime))
|
||||
// else if(istype(C, /obj/livestock/spesscarp
|
||||
if(istype(victim, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = victim
|
||||
if(!H.species.is_small)
|
||||
return 0
|
||||
meat_type = H.species.meat_type
|
||||
icon_state = "spikebloody"
|
||||
else if(istype(victim, /mob/living/carbon/alien))
|
||||
meat_type = /obj/item/weapon/reagent_containers/food/snacks/xenomeat
|
||||
icon_state = "spikebloodygreen"
|
||||
else
|
||||
return 0
|
||||
|
||||
attack_hand(mob/user as mob)
|
||||
if(..())
|
||||
victim_name = victim.name
|
||||
occupied = 1
|
||||
meat = 5
|
||||
return 1
|
||||
|
||||
/obj/structure/kitchenspike/attack_hand(mob/user as mob)
|
||||
if(..() || !occupied)
|
||||
return
|
||||
if(src.occupied)
|
||||
if(src.meattype == 1)
|
||||
meat--
|
||||
new meattype(get_turf(src))
|
||||
if(src.meat > 1)
|
||||
src.meat--
|
||||
new /obj/item/weapon/reagent_containers/food/snacks/meat/monkey( src.loc )
|
||||
usr << "You remove some meat from the monkey."
|
||||
user << "You remove some meat from \the [victim_name]."
|
||||
else if(src.meat == 1)
|
||||
src.meat--
|
||||
new /obj/item/weapon/reagent_containers/food/snacks/meat/monkey(src.loc)
|
||||
usr << "You remove the last piece of meat from the monkey!"
|
||||
src.icon_state = "spike"
|
||||
src.occupied = 0
|
||||
else if(src.meattype == 2)
|
||||
if(src.meat > 1)
|
||||
src.meat--
|
||||
new /obj/item/weapon/reagent_containers/food/snacks/xenomeat( src.loc )
|
||||
usr << "You remove some meat from the alien."
|
||||
else if(src.meat == 1)
|
||||
src.meat--
|
||||
new /obj/item/weapon/reagent_containers/food/snacks/xenomeat(src.loc)
|
||||
usr << "You remove the last piece of meat from the alien!"
|
||||
src.icon_state = "spike"
|
||||
src.occupied = 0
|
||||
user << "You remove the last piece of meat from \the [victim_name]!"
|
||||
icon_state = "spike"
|
||||
occupied = 0
|
||||
|
||||
@@ -49,6 +49,11 @@ var/list/mechtoys = list(
|
||||
anchored = 1
|
||||
layer = 4
|
||||
explosion_resistance = 5
|
||||
var/list/mobs_can_pass = list(
|
||||
/mob/living/carbon/slime,
|
||||
/mob/living/simple_animal/mouse,
|
||||
/mob/living/silicon/robot/drone
|
||||
)
|
||||
|
||||
/obj/structure/plasticflaps/CanPass(atom/A, turf/T)
|
||||
if(istype(A) && A.checkpass(PASSGLASS))
|
||||
@@ -61,10 +66,19 @@ var/list/mechtoys = list(
|
||||
if(istype(A, /obj/vehicle)) //no vehicles
|
||||
return 0
|
||||
|
||||
if(istype(A, /mob/living)) // You Shall Not Pass!
|
||||
var/mob/living/M = A
|
||||
if(!M.lying && !istype(M, /mob/living/carbon/slime) && !istype(M, /mob/living/simple_animal/mouse) && !istype(M, /mob/living/silicon/robot/drone)) //If your not laying down, or a small creature, no pass.
|
||||
if(istype(M))
|
||||
if(M.lying)
|
||||
return ..()
|
||||
for(var/mob_type in mobs_can_pass)
|
||||
if(istype(A, mob_type))
|
||||
return ..()
|
||||
if(istype(A, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(H.is_small)
|
||||
return ..()
|
||||
return 0
|
||||
|
||||
return ..()
|
||||
|
||||
/obj/structure/plasticflaps/ex_act(severity)
|
||||
|
||||
@@ -92,7 +92,7 @@ var/global/floorIsLava = 0
|
||||
body += "<br>"
|
||||
|
||||
//Monkey
|
||||
if(ismonkey(M))
|
||||
if(issmall(M))
|
||||
body += "<B>Monkeyized</B> | "
|
||||
else
|
||||
body += "<A href='?src=\ref[src];monkeyone=\ref[M]'>Monkeyize</A> | "
|
||||
|
||||
@@ -231,7 +231,7 @@
|
||||
M_job = M.job
|
||||
else if(isslime(M))
|
||||
M_job = "slime"
|
||||
else if(ismonkey(M))
|
||||
else if(issmall(M))
|
||||
M_job = "Monkey"
|
||||
else if(isalien(M))
|
||||
M_job = "Alien"
|
||||
@@ -342,7 +342,7 @@
|
||||
dat += "<td>New Player</td>"
|
||||
else if(isobserver(M))
|
||||
dat += "<td>Ghost</td>"
|
||||
else if(ismonkey(M))
|
||||
else if(issmall(M))
|
||||
dat += "<td>Monkey</td>"
|
||||
else if(isalien(M))
|
||||
dat += "<td>Alien</td>"
|
||||
|
||||
@@ -1609,7 +1609,7 @@
|
||||
where = "onfloor"
|
||||
|
||||
if ( where == "inhand" ) //Can only give when human or monkey
|
||||
if ( !( ishuman(usr) || ismonkey(usr) ) )
|
||||
if ( !( ishuman(usr) || issmall(usr) ) )
|
||||
usr << "Can only spawn in hand when you're a human or a monkey."
|
||||
where = "onfloor"
|
||||
else if ( usr.get_active_hand() )
|
||||
|
||||
@@ -453,13 +453,13 @@ BLIND // can't see anything
|
||||
A.attack_hand(user)
|
||||
return
|
||||
|
||||
if ((ishuman(usr) || ismonkey(usr)) && src.loc == user) //make it harder to accidentally undress yourself
|
||||
if ((ishuman(usr) || issmall(usr)) && src.loc == user) //make it harder to accidentally undress yourself
|
||||
return
|
||||
|
||||
..()
|
||||
|
||||
/obj/item/clothing/under/MouseDrop(obj/over_object as obj)
|
||||
if (ishuman(usr) || ismonkey(usr))
|
||||
if (ishuman(usr) || issmall(usr))
|
||||
//makes sure that the clothing is equipped so that we can't drag it into our hand from miles away.
|
||||
if (!(src.loc == usr))
|
||||
return
|
||||
|
||||
@@ -41,6 +41,7 @@
|
||||
var/vision_flags = 0 // Same flags as glasses.
|
||||
|
||||
// Death vars.
|
||||
var/meat_type = /obj/item/weapon/reagent_containers/food/snacks/meat/human
|
||||
var/gibber_type = /obj/effect/gibspawner/human
|
||||
var/remains_type = /obj/effect/decal/remains/xeno
|
||||
var/gibbed_anim = "gibbed-h"
|
||||
|
||||
@@ -248,7 +248,7 @@
|
||||
Target = C
|
||||
break
|
||||
|
||||
if(isalien(C) || ismonkey(C) || isanimal(C))
|
||||
if(isalien(C) || issmall(C) || isanimal(C))
|
||||
Target = C
|
||||
break
|
||||
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
|
||||
//Removing from inventory
|
||||
if(href_list["remove_inv"])
|
||||
if(!Adjacent(usr) || !(ishuman(usr) || ismonkey(usr) || isrobot(usr) || isalienadult(usr)))
|
||||
if(!Adjacent(usr) || !(ishuman(usr) || issmall(usr) || isrobot(usr) || isalienadult(usr)))
|
||||
return
|
||||
var/remove_from = href_list["remove_inv"]
|
||||
switch(remove_from)
|
||||
@@ -100,7 +100,7 @@
|
||||
|
||||
//Adding things to inventory
|
||||
else if(href_list["add_inv"])
|
||||
if(!Adjacent(usr) || !(ishuman(usr) || ismonkey(usr) || isrobot(usr) || isalienadult(usr)))
|
||||
if(!Adjacent(usr) || !(ishuman(usr) || issmall(usr) || isrobot(usr) || isalienadult(usr)))
|
||||
return
|
||||
var/add_to = href_list["add_inv"]
|
||||
if(!usr.get_active_hand())
|
||||
|
||||
@@ -82,7 +82,7 @@
|
||||
|
||||
//Removing from inventory
|
||||
if(href_list["remove_inv"])
|
||||
if(get_dist(src,usr) > 1 || !(ishuman(usr) || ismonkey(usr) || isrobot(usr) || isalienadult(usr)))
|
||||
if(get_dist(src,usr) > 1 || !(ishuman(usr) || issmall(usr) || isrobot(usr) || isalienadult(usr)))
|
||||
return
|
||||
var/remove_from = href_list["remove_inv"]
|
||||
switch(remove_from)
|
||||
@@ -112,7 +112,7 @@
|
||||
|
||||
//Adding things to inventory
|
||||
else if(href_list["add_inv"])
|
||||
if(get_dist(src,usr) > 1 || !(ishuman(usr) || ismonkey(usr) || isrobot(usr) || isalienadult(usr)))
|
||||
if(get_dist(src,usr) > 1 || !(ishuman(usr) || issmall(usr) || isrobot(usr) || isalienadult(usr)))
|
||||
return
|
||||
var/add_to = href_list["add_inv"]
|
||||
if(!usr.get_active_hand())
|
||||
|
||||
@@ -136,7 +136,7 @@
|
||||
return
|
||||
|
||||
//Is the usr's mob type able to do this?
|
||||
if(ishuman(usr) || ismonkey(usr) || isrobot(usr))
|
||||
if(ishuman(usr) || issmall(usr) || isrobot(usr))
|
||||
|
||||
//Removing from inventory
|
||||
if(href_list["remove_inv"])
|
||||
|
||||
@@ -196,14 +196,14 @@
|
||||
if(M == assailant && state >= GRAB_AGGRESSIVE)
|
||||
|
||||
var/can_eat
|
||||
if((FAT in user.mutations) && ismonkey(affecting))
|
||||
if((FAT in user.mutations) && issmall(affecting))
|
||||
can_eat = 1
|
||||
else
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(istype(H) && H.species.gluttonous)
|
||||
if(H.species.gluttonous == 2)
|
||||
can_eat = 2
|
||||
else if(!ishuman(affecting) && !ismonkey(affecting) && (affecting.small || iscarbon(affecting)))
|
||||
else if(!ishuman(affecting) && !issmall(affecting) && (affecting.small || iscarbon(affecting)))
|
||||
can_eat = 1
|
||||
|
||||
if(can_eat)
|
||||
|
||||
@@ -15,10 +15,10 @@
|
||||
return istype(H.species, /datum/species/xenos)
|
||||
return 0
|
||||
|
||||
/proc/ismonkey(A)
|
||||
/proc/issmall(A)
|
||||
if(A && istype(A, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = A
|
||||
if(H.species && H.species.is_small) //todo
|
||||
if(H.species && H.species.is_small)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
|
||||
@@ -1587,7 +1587,7 @@
|
||||
else //someone is having a bad day
|
||||
E.createwound(CUT, 30)
|
||||
E.embed(surprise)
|
||||
else if (ismonkey(M))
|
||||
else if (issmall(M))
|
||||
M.visible_message("<span class='danger'>[M] suddenly tears in half!</span>")
|
||||
var/mob/living/carbon/monkey/ook = new monkey_type(M.loc)
|
||||
ook.name = "malformed [ook.name]"
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
if("gib")
|
||||
target.gib()
|
||||
if("gib_brain")
|
||||
if(ishuman(target) || ismonkey(target))
|
||||
if(ishuman(target) || issmall(target))
|
||||
var/mob/living/carbon/C = target
|
||||
if(!C.has_brain()) // Their brain is already taken out
|
||||
var/obj/item/organ/brain/B = new(C.loc)
|
||||
|
||||
@@ -80,7 +80,7 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin
|
||||
usr << "Not when you're incapacitated."
|
||||
return 0
|
||||
|
||||
if(ishuman(usr) || ismonkey(usr))
|
||||
if(ishuman(usr) || issmall(usr))
|
||||
if(istype(usr.wear_mask, /obj/item/clothing/mask/muzzle))
|
||||
usr << "Mmmf mrrfff!"
|
||||
return 0
|
||||
|
||||
Reference in New Issue
Block a user