Skip to content

Commit

Permalink
Merge pull request Civ13#2753 from HaultyAnonie/gramramr
Browse files Browse the repository at this point in the history
QOL changes; [{descs, punctuality, mapping}~]
  • Loading branch information
savethetreez authored Apr 19, 2024
2 parents 4dd5076 + d02c341 commit 7cf4c8c
Show file tree
Hide file tree
Showing 53 changed files with 413 additions and 287 deletions.
1 change: 0 additions & 1 deletion code/_helpers/mobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1017,7 +1017,6 @@ Proc for attack log creation, because really why not

return newmobs


//Orders mobs by type then by name
/proc/sortmobs()
var/list/moblist = list()
Expand Down
13 changes: 5 additions & 8 deletions code/_onclick/click.dm
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
usr.DblClickOn(src, params)

/* Standard mob ClickOn()
Handles exceptions: Buildmode, middle click, modified clicks, mech actions
Handles exceptions: Buildmode (unused), middle click, modified clicks, mech actions
After that, mostly just check your state, check whether you're holding an item,
check whether you're adjacent to the target, then pass off the click to whoever
is recieving it.
Expand Down Expand Up @@ -238,16 +238,13 @@
// A is a turf or is on a turf, or in something on a turf (pen in a box); but not something in something on a turf (pen in a box in a backpack)
sdepth = A.storage_depth_turf()
if (isturf(A) || isturf(A.loc) || (sdepth != -1 && sdepth <= 1))
if (A.Adjacent(src) || (W && W == get_active_hand() && (istype(W, /obj/item/weapon/barrier))) && A.rangedAdjacent(src)) // see adjacent.dm
if (A.Adjacent(src)) // see adjacent.dm
dir = get_dir(src, A)
if (W && istype(W, /obj/item/weapon/barrier) && A.rangedAdjacent(src) && (isturf(A) || istype(A, /obj/structure/window/barrier/incomplete)))
if (W && A.rangedAdjacent(src))
if (get_active_hand() != W)
return
if (!istype(A, /obj/structure/window/barrier/incomplete))
A = get_turf(A)
else
if (!A.Adjacent(src)) // if we're adding to a sandbag wall, let us stand anywhere in range(1)
return
if (!A.Adjacent(src)) // if we're not adjacent.
return
var/needs_to_be_in_front = istype(A, /turf)
if (needs_to_be_in_front) // but if we're making a new sandbag wall, we have to click right in front of us.
if (A != get_step(src, dir))
Expand Down
2 changes: 1 addition & 1 deletion code/game/mob/death.dm
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
/mob/proc/maim()
crush()

/mob/proc/death(gibbed,deathmessage="seizes up and falls limp...")
/mob/proc/death(gibbed, deathmessage="seizes up and falls limp...")

if (stat == DEAD)
return FALSE
Expand Down
2 changes: 1 addition & 1 deletion code/game/mob/inventory.dm
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ var/list/slot_equipment_priority = list( \

return FALSE

//These procs handle putting s tuff in your hand. It's probably best to use these rather than setting l_hand = ...etc
//These procs handle putting stuff in your hand. It's probably best to use these rather than setting l_hand = ...etc
//as they handle all relevant stuff like adding it to the player's screen and updating their overlays.

//Returns the thing in our active hand
Expand Down
7 changes: 3 additions & 4 deletions code/game/mob/living/carbon/human/death.dm
Original file line number Diff line number Diff line change
Expand Up @@ -360,8 +360,6 @@
if (i[1]=="UPA")
i[2]-= 10*/

handle_piss()
handle_shit()
if (squad > 0 && original_job && original_job.uses_squads)
if (map && faction_text == map.faction1)
map.faction1_squads[squad] -= src
Expand Down Expand Up @@ -411,7 +409,6 @@
//Handle species-specific deaths.
species.handle_death(src)


callHook("death", list(src, gibbed))

if (l_hand) unEquip(l_hand)
Expand Down Expand Up @@ -443,7 +440,9 @@

. = ..(gibbed)//,species.death_message)
if (!gibbed)
handle_organs()
handle_organs() // Handle the following only after we call the parent to get all the proper stat values and etcetra.
handle_piss()
handle_shit()
if (species.death_sound)
playsound(loc, species.death_sound, 80, TRUE, TRUE)
handle_hud_list()
4 changes: 2 additions & 2 deletions code/game/mob/living/carbon/human/emotes/emote.dm
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,7 @@ var/list/vocal_emotes = list(
else
message = "moans!"
m_type = 2

/*
if ("johnny")
var/M
if (param)
Expand All @@ -547,7 +547,7 @@ var/list/vocal_emotes = list(
else
message = "says, \"[M], please. He had a family.\" [name] takes a drag from a cigarette and blows his name out in smoke."
m_type = 2

*/
if ("point")
if (!restrained())
var/mob/M = null
Expand Down
1 change: 0 additions & 1 deletion code/game/mob/living/carbon/human/emotes/verbs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,6 @@
set category = "Emote"
emote("yawn")


/mob/living/human/verb/charge()
set category = "Emote"
emote("charge")
Expand Down
1 change: 0 additions & 1 deletion code/game/mob/living/carbon/human/human.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1068,7 +1068,6 @@ var/list/coefflist = list()
else
return H.pulse


/mob/living/human/proc/make_adrenaline(amount)
if(stat == CONSCIOUS)
reagents.add_reagent("adrenaline", amount)
Expand Down
1 change: 1 addition & 0 deletions code/game/mob/living/carbon/human/human_defense.dm
Original file line number Diff line number Diff line change
Expand Up @@ -553,6 +553,7 @@ bullet_act
AC.health -= dmg
AC.check_health()
return TRUE

/mob/living/human/proc/check_head_coverage()
var/list/body_parts = list(head, wear_mask, wear_suit, w_uniform)
for (var/bp in body_parts)
Expand Down
2 changes: 1 addition & 1 deletion code/game/mob/living/carbon/human/human_helpers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@
/mob/living/human/proc/process_vehicle_roofs()
if (!client)
return
var/view_dist = client.view + 4 // + запас чтобы при передвижении не было видно прогрузку
var/view_dist = client.view + 4 // + reserve so that when moving the load is not visible [translated]

var/view_x_offset = 0
var/view_y_offset = 0
Expand Down
1 change: 0 additions & 1 deletion code/game/mob/living/carbon/human/human_organs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,6 @@
var/emote_scream = pick("screams in pain and ", "lets out a sharp cry and ", "cries out and ")
emote("me", TRUE, "[(species.flags & NO_PAIN) ? "" : emote_scream ]drops what they were holding in their [E.name]!")


//Handles chem traces
/mob/living/human/proc/handle_trace_chems()
//New are added for reagents to random organs.
Expand Down
75 changes: 37 additions & 38 deletions code/game/mob/living/carbon/human/shit_piss.dm
Original file line number Diff line number Diff line change
Expand Up @@ -280,51 +280,50 @@
//Shitting
/mob/living/human/proc/handle_shit()
var/message = null
if (src.bowels >= 30)
//Poo in the loo.
var/obj/structure/toilet/T = locate() in src.loc
var/mob/living/M = locate() in src.loc
if ((T && T.open) || (M.crap_inside))
if (M.crap_inside)
message = "<B>[src]</B> defecates into the hole."
else
message = "<B>[src]</B> defecates into \the [T]."
var/obj/item/weapon/reagent_containers/food/snacks/poo/V = new/obj/item/weapon/reagent_containers/food/snacks/poo(src.loc)
if(reagents)
reagents.trans_to(V, rand(1,5))
V.forceMove(T)
else if(w_uniform)
message = "<B>[src]</B> shits \his pants."
reagents.add_reagent("poo", 10)
adjust_hygiene(-25)
mood -= 25
w_uniform.shit_overlay = image(icon = 'icons/mob/human_races/masks/sickness.dmi', icon_state="shit")
w_uniform.overlays += w_uniform.shit_overlay
w_uniform.update_icon()
update_icons()
//Poo on the face.
else if(M != src && M.lying) //Can only shit on them if they're lying down.
message = "<span class='danger'><b>[src]</b> shits right on <b>[M]</b>'s face!</span>"
if (M && M.reagents)
M.reagents.add_reagent("poo", 10)
//Poo on the floor.
if (src.bowels < 30 && stat != DEAD)
to_chat(src, "You don't have to shit.")
return
//Poo in the loo.
var/obj/structure/toilet/T = locate() in src.loc
var/mob/living/M = locate() in src.loc
if ((T && T.open) || (M.crap_inside))
if (M.crap_inside)
message = "<B>[src]</B> defecates into the hole."
else
message = "<B>[src]</B> [pick("shits", "craps", "poops")]."
var/obj/item/weapon/reagent_containers/food/snacks/poo/V = new/obj/item/weapon/reagent_containers/food/snacks/poo(src.loc)
if(reagents)
reagents.trans_to(V, rand(1,5))
playsound(src.loc, 'sound/effects/poo2.ogg', 60, 1)
bowels -= rand(120,150)
message = "<B>[src]</B> defecates into \the [T]."
var/obj/item/weapon/reagent_containers/food/snacks/poo/V = new/obj/item/weapon/reagent_containers/food/snacks/poo(src.loc)
if(reagents)
reagents.trans_to(V, rand(1,5))
V.forceMove(T)
else if(w_uniform)
message = "<B>[src]</B> shits \his pants."
reagents.add_reagent("poo", 10)
adjust_hygiene(-25)
mood -= 25
w_uniform.shit_overlay = image(icon = 'icons/mob/human_races/masks/sickness.dmi', icon_state="shit")
w_uniform.overlays += w_uniform.shit_overlay
w_uniform.update_icon()
update_icons()
//Poo on the face.
else if(M != src && M.lying) //Can only shit on them if they're lying down.
message = "<span class='danger'><b>[src]</b> shits right on <b>[M]</b>'s face!</span>"
if (M && M.reagents)
M.reagents.add_reagent("poo", 10)
//Poo on the floor.
else
to_chat(src, "You don't have to.")
return
message = "<B>[src]</B> [pick("shits", "craps", "poops")]."
var/obj/item/weapon/reagent_containers/food/snacks/poo/V = new/obj/item/weapon/reagent_containers/food/snacks/poo(src.loc)
if(reagents)
reagents.trans_to(V, rand(1,5))
playsound(src.loc, 'sound/effects/poo2.ogg', 60, 1)
bowels -= rand(120,150)
visible_message("[message]")

//Peeing
/mob/living/human/proc/handle_piss()
var/message = null
if (bladder < 30)
to_chat(src, "You don't have to.")
if (bladder < 30 && stat != DEAD)
to_chat(src, "You don't have to piss.")
return
var/mob/living/M = locate() in src.loc
var/obj/structure/toilet/T = locate() in src.loc
Expand Down
2 changes: 1 addition & 1 deletion code/game/mob/living/damage_procs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@



/mob/living/proc/apply_effect(var/effect = FALSE,var/effecttype = STUN, var/blocked = FALSE, var/check_protection = TRUE)
/mob/living/proc/apply_effect(var/effect = FALSE, var/effecttype = STUN, var/blocked = FALSE, var/check_protection = TRUE)
if (!effect || (blocked >= 2)) return FALSE
switch(effecttype)
if (STUN)
Expand Down
26 changes: 13 additions & 13 deletions code/game/mob/mob_movement.dm
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@
if (ref && map && map.check_caribbean_block(mob, ref))
mob.dir = direct
if (world.time >= mob.next_gracewall_message)
mob << "<span class = 'warning'>You cannot pass the invisible wall until the <b>Grace Period</b> has ended.</span>"
to_chat(mob, SPAN_WARNING("You cannot pass the invisible wall until the <b>Grace Period</b> has ended."))
mob.next_gracewall_message = world.time + 10
return FALSE

Expand Down Expand Up @@ -407,14 +407,14 @@

if (mob_is_living)
for (var/obj/structure/window_frame/W in mob.loc)
mob.visible_message("<span class = 'warning'>[mob] starts climbing through the window frame.</span>")
mob.visible_message(SPAN_WARNING("[mob] starts climbing through the window frame."), SPAN_WARNING("You start climbing through the window frame."))
mob.canmove = FALSE
var/oloc = mob.loc
sleep(rand(8,12))
mob.canmove = TRUE
if (mob.lying || mob.stat == DEAD || mob.stat == UNCONSCIOUS || mob.loc != oloc)
return
mob.visible_message("<span class = 'warning'>[mob] climbs through the window frame.</span>")
mob.visible_message(SPAN_WARNING("[mob] climbs through the window frame."), SPAN_WARNING("You climb through the window frame."))
break

// we can probably move now, so update our eye for ladders
Expand All @@ -432,15 +432,15 @@
if (M.pulling == mob)
if (!M.restrained() && M.stat == 0 && M.canmove && mob.Adjacent(M))
if (world.time >= mob.next_cannotmove_message)
src << "<span class = 'notice'>You're restrained! You can't move!</span>"
to_chat(src, SPAN_NOTICE("You're restrained! You can't move!"))
mob.next_cannotmove_message = world.time + 10
return FALSE
else
M.stop_pulling()

if (mob.pinned.len)
if (world.time >= mob.next_cannotmove_message)
src << "<span class = 'notice'>You're pinned to a wall by [mob.pinned[1]]!</span>"
to_chat(src, SPAN_NOTICE("You're pinned to a wall by [mob.pinned[1]]!"))
mob.next_cannotmove_message = world.time + 10
return FALSE

Expand Down Expand Up @@ -479,7 +479,7 @@
for (var/obj/covers/CV in get_turf(F))
F.muddy = FALSE
var/snow_message = ""
var/snow_span = "notice"
var/snow_span = "warning"

if (F.icon == 'icons/turf/snow.dmi' && snow && !H.lizard)
standing_on_snow = 1
Expand Down Expand Up @@ -546,7 +546,7 @@
else
standing_on_snow = rand(2,3)
if (world.time >= mob.next_mud_message)
mob << "<span class = 'warning'>The mud slows you down.</span>"
to_chat(mob, SPAN_WARNING("The mud slows you down."))
mob.next_mud_message = world.time+100
if (ishuman(mob))
var/mob/living/human/perp = mob
Expand Down Expand Up @@ -641,16 +641,16 @@

if (mob_is_human)
if (H.getStat("stamina") == (H.getMaxStat("stamina")/2) && H.m_intent == "run" && world.time >= H.next_stamina_message)
H << "<span class = 'danger'>You're starting to tire from running so much.</span>"
to_chat(H, SPAN_DANGER("You're starting to tire from running so much."))
H.next_stamina_message = world.time + 20

if (H.getStat("stamina") <= 0 && H.m_intent == "run")
H << "<span class = 'danger'>You're too tired to keep running.</span>"
to_chat(H, SPAN_DANGER("You're too tired to keep running."))
if (H.m_intent != "walk")
H.m_intent = "walk" // in case we don't have a m_intent HUD, somehow
if (mob.HUDneed.Find("mov_intent"))
var/obj/screen/intent/I = mob.HUDneed["mov_intent"]
I.update_icon()
H.m_intent = "walk" // Incase we don't set the intent to walk somehow, force-set it here...
if (mob.HUDneed.Find("m_intent")) // Find the movement intent in the HUDneed list() on mob_defines.
var/obj/screen/intent/I = mob.HUDneed["m_intent"] // Set a variable to access that movement intent.
I.update_icon() // Updates the HUD icon to 'walk'.

var/tickcomp = FALSE //moved this out here so we can use it for vehicles
if (config.Tickcomp)
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/items/weapons/nomadstuff.dm
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
icon = 'icons/obj/items.dmi'
icon_state = "bedroll_o"
anchored = TRUE
layer = MOB_LAYER - 0.01
layer = MOB_LAYER - 0.06 // Why 0.06? To prevent beds from clipping above east-facing barriers (3.95).
var/used = FALSE
var/running = FALSE //to prevent exploits of unbuckling/bucking etc
can_buckle = TRUE
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/map_metadata/operation_falcon.dm
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@ var/global/list/fob_names_russian = list("Anna", "Boris", "Dmitri", "Yelena", "I

/obj/structure/supply_crate/bullet_act(var/obj/item/projectile/proj)
health -= proj.damage * 0.01
visible_message(SPAN_NOTICE("\The [src] is hit by the [proj.name]!"))
visible_message(SPAN_DANGER("\The [src] is hit by \the [proj.name]!"))
try_destroy()


Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/map_metadata/pepelsibirsk.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1043,7 +1043,7 @@ var/global/datum/external_relations/external_relations = new()

/obj/structure/anti_air_crate/bullet_act(var/obj/item/projectile/proj)
health -= proj.damage * 0.01
visible_message(SPAN_NOTICE("\The [src] is hit by the [proj.name]!"))
visible_message(SPAN_DANGER("\The [src] is hit by \the [proj.name]!"))
try_destroy()

/obj/structure/anti_air_crate/attack_hand(mob/living/human/H as mob)
Expand Down
Loading

0 comments on commit 7cf4c8c

Please sign in to comment.