mirror of
https://github.com/yogstation13/Yogstation.git
synced 2025-02-26 09:04:50 +00:00
* why no work angy * weird errors shit sucks * fixved it I can spell good * fix? POSSIBLY * nope wasnt this * no more immutable thhanks koffee * ok ok * removes all the pref stuff ""removes"" * remove this idiot * this goes bye bye * these go too genius * bye bye * better night vision * tries to fix camera maybe * ok fuck it we ball we ball * ok lets go back go back go back go back * WORK DAMNIT * ha fuc kyou * this maybe * this doesnt work :( * maybe fix maybe * fucks everything why do i do this * test update test * Revert "tries to fix camera" This reverts commit2d14fbae66. * reverts everything I just did peko pain * bye bitch * oh yeah add this I guess * Fucks up the camera net + chunk why * test maybe revert * Revert "test maybe revert" This reverts commit98c5ef1b93. * Revert "Fucks up the camera net + chunk" This reverts commit0e421ebf5f. * this isnt going well uh oh * Attempts to rework out security camera and probably more * Revert "this isnt going well" This reverts commit1d8ceac867. * Revert "Revert "this isnt going well"" This reverts commite26fb61415. * ok ok * Revert "ok" This reverts commit7e7a7f8372. * Revert "Merge remote-tracking branch 'upstream/master' into NahI'dPortit" This reverts commit01094731c1, reversing changes made toc0cf69ebf1. * this doesn't need to be redefined I guess * no we need this totally * a familiar pain * 515 is L * yeah yeah * ok god fine * bye bye basemap :( doesnt work on runtime station * Fixes AI statis not working god im good * remove this oh god * Revert "Revert "Merge remote-tracking branch 'upstream/master' into NahI'dPortit"" This reverts commitb3fb3ba0db. * proves to god I exist and im pissed * yog exclusive feature (tm) plane master * bring this back from previous push * updates vendor emissives as well as firealarms * Updates barsign and fucks everything up * Fixes barsigns breaks all lights and updates barsigns to be machines and not structures We will address this in a later patch * not sure who changed that oh well * yeah this got moved * this needs updating yeah * turns off the carbon monoxide alarm duh * FIXES IT YES thank you biome * turns this off too yeah * Can't compile yet but ports a ton of shit * L * the game opens ig * extra shit * fixes * signals and smooth queue * look ma im going horribly out of scope * fixes chasms * this fixed nothing * ??? * more barsigns for later * forgive me cowboy. also fuck diagonals * oops we need this apparently * fuck it we ball * Update _lists.dm * Update icon_smoothing.dm * it now works kinda * Update atom_initializing_EXPENSIVE.dm * lighting don't work * we have light * sort turfs better * big fucking reorganize * like everything except templates * boy i sure hope nothing bad happens to these bar templates * we're back * no runtimes baby * no errors * shuttles are almost fixed i think * Revert "shuttles are almost fixed i think" This reverts commit046058827c. * Revert "Merge remote-tracking branch 'upstream/master' into icon_smoothing" This reverts commit863e1b776d, reversing changes made to884623e600. * Revert "no errors" This reverts commit884623e600. * too far back i think * midround smoothing runtimes fixed i think * comment cleanup * should fix the component runtimes * Revert "Revert "Merge remote-tracking branch 'upstream/master' into icon_smoothing"" This reverts commita8ff8d63aa. * NO RUNTIMES AND ICEMETA WORKS LET'S GOOOOOO * please stay fixed icemeta * organizing render dms * woops this too in the reorganizing * cryo fixed * nah, i'd win * parallax isn't my problem * pls don't break icemeta * runtime station gets a cam console * well it compiles * maybe fix the map * woops * man i hate maps * was that it? * PLEASE * missing focus tests * maybe that was it * maybe * let's take the batteries out of the carbon monoxide detector * fuck osha * i hate vending machines * that's not a computer * slot machine fix * PLEASE * that wasn't supposed to be there * fuck it i can't fix everything at once * BLUESPACE LOCKER? * literally why * hhh * does this fix chasms? * that should fix bad index * please? * turf_flags for reservations * haha oops * yolo (kill me) * fix wood walls and other walls * fix stairs * that might have fixed shittles * baseturfs are good now i think * should fix plasma windows * decals fixed * please fix changelog * shuttle lighting still fucky * lighting is stinky slow and doesn't finish updating by the time the server starts guh * lighting seemingly works * slipping works * shuttle sounds, slips, and windoors fixed * why am i here * fuck the changelog * of course someone touched smoothing as i'm almost done * we good? * updating ai_eye and rename * z updates and more ai cam updates * ice fixed * weather and ice fix * clockies can see and other clean up catches * windows fixed * cowbot forgive me i'm trying to update flashlights to tg because there's no light on lower multi-z z's like ice meta bottom floor * movable lighting works on multi-z * gps fix * item stacking from drag works * falsewall fix * job panel fixed * AI HANDLED * woops that comment should be gone * i hate ai i hate ai * brass glass visible again * vents on top of tiles now * sigdrobe sprite back * centcomm portals work * portals and see openspace mapping icons fixed * icemeta my behated * kill * is that it * lighting cutoff is old hat * angery overlay * not super necessary * also extra but whatever * ticker but thicker * job fix i hope * this isn't needed anymore * latejoin fix? * laserpointer, pipecrawl, and some consoles fixed * i hate fixing bugs as they're made * we're not ready for that * redef cleanup * gps arrows, gun flashlights, shuttle console placement, multi-z pulling fixed * goofy ah gun code * this was a good idea and necessary * should fix caltrop component * does this please the linter * linter please accept this async function * THERE * take the batteries out * make it stop * cowbot stopped me from letting ghosts dab * recycler loc fix * fix border firedoors not blocking movement * should fix screen fade out and fade in on round start and end * darker command tile trim and fixed bronze wall sprites * fuck you linter * railings actually stop you from leaving * probably fixes gibtonite overlay when struck * armaments dispenser and clockwork catwalk * turbine fix probably * pointing at inhand items should be fixed * fix overwatch app * should hopefully fix cable rotation on shuttle move * flashlights have better directionality logic * hopefully fixes shuttle atmos on move * grilles fixed * hopefully this fixes shuttle buttons, airolocks, and other machinery not working after moving * ice meta mining area finally not freezing * fix lightbulb icons not updating * lava mask and lighting dots * we actually have this * fuck glowshrooms GC * fix light fixture interactions and icon updates * hopefully catches all the updates * lava lighting good to go * seclite was missing inhands * smoothing in replays * light updates accurate in replays * biome's multi-z requests --------- Co-authored-by: cowbot92 <75333826+cowbot92@users.noreply.github.com> Co-authored-by: Molti <gamingjoelouis@gmail.com> Co-authored-by: Ringalong <53777086+JohnFulpWillard@users.noreply.github.com>
259 lines
6.3 KiB
Plaintext
259 lines
6.3 KiB
Plaintext
/*
|
|
Humans:
|
|
Adds an exception for gloves, to allow special glove types like the ninja ones.
|
|
|
|
Otherwise pretty standard.
|
|
*/
|
|
/mob/living/carbon/human/UnarmedAttack(atom/A, proximity)
|
|
if(HAS_TRAIT(src, TRAIT_HANDS_BLOCKED))
|
|
if(src == A)
|
|
check_self_for_injuries()
|
|
return
|
|
if(HAS_TRAIT(A, TRAIT_NOINTERACT))
|
|
to_chat(A, span_notice("You can't touch things!"))
|
|
return
|
|
|
|
if(!has_active_hand()) //can't attack without a hand.
|
|
var/obj/item/bodypart/check_arm = get_active_hand()
|
|
if(check_arm?.bodypart_disabled)
|
|
to_chat(src, span_warning("Your [check_arm.name] is in no condition to be used."))
|
|
return
|
|
to_chat(src, span_notice("You look at your arm and sigh."))
|
|
return
|
|
|
|
// Special glove functions:
|
|
// If the gloves do anything, have them return 1 to stop
|
|
// normal attack_hand() here.
|
|
var/obj/item/clothing/gloves/G = gloves // not typecast specifically enough in defines
|
|
if(proximity && istype(G) && G.Touch(A,1))
|
|
return
|
|
|
|
var/override = 0
|
|
override = SEND_SIGNAL(src, COMSIG_HUMAN_EARLY_UNARMED_ATTACK, A) & COMPONENT_NO_ATTACK_HAND
|
|
for(var/datum/mutation/human/HM in dna.mutations)
|
|
override += HM.on_attack_hand(A, proximity)
|
|
if(override)
|
|
return
|
|
|
|
SEND_SIGNAL(src, COMSIG_HUMAN_MELEE_UNARMED_ATTACK, A)
|
|
A.attack_hand(src)
|
|
|
|
//Return TRUE to cancel other attack hand effects that respect it.
|
|
/atom/proc/attack_hand(mob/user)
|
|
. = FALSE
|
|
if(!(interaction_flags_atom & INTERACT_ATOM_NO_FINGERPRINT_ATTACK_HAND))
|
|
add_fingerprint(user)
|
|
if(SEND_SIGNAL(src, COMSIG_ATOM_ATTACK_HAND, user) & COMPONENT_NO_ATTACK_HAND)
|
|
. = TRUE
|
|
if(interaction_flags_atom & INTERACT_ATOM_ATTACK_HAND)
|
|
. = _try_interact(user)
|
|
|
|
//Return a non FALSE value to cancel whatever called this from propagating, if it respects it.
|
|
/atom/proc/_try_interact(mob/user)
|
|
if(IsAdminGhost(user)) //admin abuse
|
|
return interact(user)
|
|
if(can_interact(user))
|
|
return interact(user)
|
|
return FALSE
|
|
|
|
/atom/proc/can_interact(mob/user)
|
|
if(!user.can_interact_with(src))
|
|
return FALSE
|
|
if((interaction_flags_atom & INTERACT_ATOM_REQUIRES_DEXTERITY) && !user.IsAdvancedToolUser())
|
|
to_chat(user, span_warning("You don't have the dexterity to do this!"))
|
|
return FALSE
|
|
if(!(interaction_flags_atom & INTERACT_ATOM_IGNORE_INCAPACITATED) && user.incapacitated((interaction_flags_atom & INTERACT_ATOM_IGNORE_RESTRAINED), !(interaction_flags_atom & INTERACT_ATOM_CHECK_GRAB)))
|
|
return FALSE
|
|
if(HAS_TRAIT(user, TRAIT_NOINTERACT))
|
|
to_chat(user, span_notice("You can't touch things!"))
|
|
return FALSE
|
|
return TRUE
|
|
|
|
/atom/ui_status(mob/user)
|
|
. = ..()
|
|
if(!can_interact(user))
|
|
. = min(., UI_UPDATE)
|
|
|
|
/atom/movable/can_interact(mob/user)
|
|
. = ..()
|
|
if(!.)
|
|
return
|
|
if(!anchored && (interaction_flags_atom & INTERACT_ATOM_REQUIRES_ANCHORED))
|
|
return FALSE
|
|
|
|
/atom/proc/interact(mob/user)
|
|
if(interaction_flags_atom & INTERACT_ATOM_NO_FINGERPRINT_INTERACT)
|
|
add_hiddenprint(user)
|
|
add_scent(user)
|
|
else
|
|
add_fingerprint(user)
|
|
if(interaction_flags_atom & INTERACT_ATOM_UI_INTERACT)
|
|
return ui_interact(user)
|
|
return FALSE
|
|
|
|
/mob/living/carbon/human/RangedAttack(atom/A, mouseparams)
|
|
. = ..()
|
|
if(gloves)
|
|
var/obj/item/clothing/gloves/G = gloves
|
|
if(istype(G) && G.Touch(A,0)) // for magic gloves
|
|
return
|
|
|
|
for(var/datum/mutation/human/HM in dna.mutations)
|
|
HM.on_ranged_attack(A, mouseparams)
|
|
|
|
if(isturf(A) && get_dist(src,A) <= 1)
|
|
Move_Pulled(A)
|
|
return
|
|
|
|
/*
|
|
Animals & All Unspecified
|
|
*/
|
|
/mob/living/UnarmedAttack(atom/A)
|
|
A.attack_animal(src)
|
|
|
|
/atom/proc/attack_animal(mob/user)
|
|
return
|
|
|
|
/mob/living/RestrainedClickOn(atom/A)
|
|
return
|
|
|
|
/*
|
|
Monkeys
|
|
*/
|
|
/mob/living/carbon/monkey/UnarmedAttack(atom/A)
|
|
A.attack_paw(src)
|
|
|
|
/atom/proc/attack_paw(mob/user)
|
|
if(SEND_SIGNAL(src, COMSIG_ATOM_ATTACK_PAW, user) & COMPONENT_NO_ATTACK_HAND)
|
|
return TRUE
|
|
return FALSE
|
|
|
|
/*
|
|
Monkey RestrainedClickOn() was apparently the
|
|
one and only use of all of the restrained click code
|
|
(except to stop you from doing things while handcuffed);
|
|
moving it here instead of various hand_p's has simplified
|
|
things considerably
|
|
*/
|
|
/mob/living/carbon/monkey/RestrainedClickOn(atom/A)
|
|
if(..())
|
|
return
|
|
if(a_intent != INTENT_HARM || !ismob(A))
|
|
return
|
|
if(is_muzzled())
|
|
return
|
|
var/mob/living/carbon/ML = A
|
|
if(istype(ML))
|
|
var/dam_zone = pick(BODY_ZONE_CHEST, BODY_ZONE_PRECISE_L_HAND, BODY_ZONE_PRECISE_R_HAND, BODY_ZONE_L_LEG, BODY_ZONE_R_LEG)
|
|
var/obj/item/bodypart/affecting = null
|
|
if(ishuman(ML))
|
|
var/mob/living/carbon/human/H = ML
|
|
affecting = H.get_bodypart(ran_zone(dam_zone))
|
|
var/armor = ML.run_armor_check(affecting, MELEE)
|
|
if(prob(75))
|
|
ML.apply_damage(rand(1,3), BRUTE, affecting, armor)
|
|
ML.visible_message(span_danger("[name] bites [ML]!"), \
|
|
span_userdanger("[name] bites [ML]!"))
|
|
if(armor >= 2)
|
|
return
|
|
for(var/thing in diseases)
|
|
var/datum/disease/D = thing
|
|
ML.ForceContractDisease(D)
|
|
else
|
|
ML.visible_message(span_danger("[src] has attempted to bite [ML]!"))
|
|
|
|
/*
|
|
Aliens
|
|
Defaults to same as monkey in most places
|
|
*/
|
|
/mob/living/carbon/alien/UnarmedAttack(atom/A)
|
|
A.attack_alien(src)
|
|
|
|
/atom/proc/attack_alien(mob/living/carbon/alien/user)
|
|
attack_paw(user)
|
|
return
|
|
|
|
// Babby aliens
|
|
/mob/living/carbon/alien/larva/UnarmedAttack(atom/A)
|
|
A.attack_larva(src)
|
|
/atom/proc/attack_larva(mob/user)
|
|
return
|
|
|
|
|
|
/*
|
|
Slimes
|
|
Nothing happening here
|
|
*/
|
|
/mob/living/simple_animal/slime/UnarmedAttack(atom/A)
|
|
if(isturf(A))
|
|
return ..()
|
|
A.attack_slime(src)
|
|
|
|
/atom/proc/attack_slime(mob/user)
|
|
return
|
|
|
|
|
|
/*
|
|
Drones
|
|
*/
|
|
/mob/living/simple_animal/drone/UnarmedAttack(atom/A)
|
|
A.attack_drone(src)
|
|
|
|
/atom/proc/attack_drone(mob/living/simple_animal/drone/user)
|
|
attack_hand(user) //defaults to attack_hand. Override it when you don't want drones to do same stuff as humans.
|
|
|
|
/*
|
|
True Devil
|
|
*/
|
|
|
|
/mob/living/carbon/true_devil/UnarmedAttack(atom/A, proximity)
|
|
A.attack_hand(src)
|
|
|
|
/*
|
|
Brain
|
|
*/
|
|
|
|
/mob/living/brain/UnarmedAttack(atom/A)//Stops runtimes due to attack_animal being the default
|
|
return
|
|
|
|
|
|
/*
|
|
pAI
|
|
*/
|
|
|
|
/mob/living/silicon/pai/UnarmedAttack(atom/A)//Stops runtimes due to attack_animal being the default
|
|
return
|
|
|
|
|
|
/*
|
|
Simple animals
|
|
*/
|
|
|
|
/mob/living/simple_animal/UnarmedAttack(atom/A, proximity)
|
|
if(!dextrous)
|
|
return ..()
|
|
if(!ismob(A))
|
|
A.attack_hand(src)
|
|
update_inv_hands()
|
|
|
|
|
|
/*
|
|
Hostile animals
|
|
*/
|
|
|
|
/mob/living/simple_animal/hostile/UnarmedAttack(atom/A)
|
|
target = A
|
|
if(dextrous && !ismob(A))
|
|
..()
|
|
else
|
|
AttackingTarget()
|
|
|
|
|
|
|
|
/*
|
|
New Players:
|
|
Have no reason to click on anything at all.
|
|
*/
|
|
/mob/dead/new_player/ClickOn()
|
|
return
|