mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-10 14:44:05 +01:00
Merge pull request #6078 from FlattestGuitar/log-update
Admin Log update
This commit is contained in:
@@ -249,8 +249,8 @@ Proc for attack log creation, because really why not
|
||||
6 is whether the attack should be logged to the log file and shown to admins
|
||||
*/
|
||||
|
||||
proc/add_logs(mob/user, mob/target, what_done, var/object=null, var/addition=null, var/admin=1)
|
||||
var/list/ignore=list("shaked","CPRed","grabbed","punched")
|
||||
proc/add_logs(mob/user, mob/target, what_done, var/object=null, var/addition=null, var/admin=1, var/print_attack_log = 1)//print_attack_log notifies admins with attack logs on
|
||||
var/list/ignore=list("shaked", "CPRed", "grabbed", "punched", "disarmed")
|
||||
if(!user)
|
||||
return
|
||||
if(ismob(user))
|
||||
@@ -259,10 +259,13 @@ proc/add_logs(mob/user, mob/target, what_done, var/object=null, var/addition=nul
|
||||
target.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been [what_done] by [key_name(user)][object ? " with [object]" : " "][addition]</font>")
|
||||
if(admin)
|
||||
log_attack("<font color='red'>[key_name(user)] [what_done] [key_name(target)][object ? " with [object]" : " "][addition]</font>")
|
||||
if(istype(target) && (target.client || target.player_logged))
|
||||
if(what_done in ignore) return
|
||||
if(target == user)return
|
||||
if(!admin) return
|
||||
if(istype(target) && (target.key))
|
||||
if(what_done in ignore)
|
||||
return
|
||||
if(target == user)
|
||||
return
|
||||
if(!print_attack_log)
|
||||
return
|
||||
msg_admin_attack("[key_name_admin(user)] [what_done] [key_name_admin(target)][object ? " with [object]" : " "][addition]")
|
||||
|
||||
/proc/do_mob(var/mob/user, var/mob/target, var/time = 30, var/uninterruptible = 0, progress = 1)
|
||||
|
||||
@@ -65,8 +65,7 @@
|
||||
/////////////////////////
|
||||
user.lastattacked = M
|
||||
M.lastattacker = user
|
||||
|
||||
add_logs(user, M, "attacked", name, "(INTENT: [uppertext(user.a_intent)]) (DAMTYE: [uppertext(damtype)])")
|
||||
add_logs(user, M, "attacked", name, "(INTENT: [uppertext(user.a_intent)]) (DAMTYE: [uppertext(damtype)])", print_attack_log = (force > 0))//print it if stuff deals damage
|
||||
|
||||
if(!iscarbon(user))
|
||||
M.LAssailant = null
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
return .
|
||||
|
||||
/proc/key_name_admin(var/whom, var/include_name = 1)
|
||||
var/message = "[key_name(whom, 1, include_name)](<A HREF='?_src_=holder;adminmoreinfo=\ref[whom]'>?</A>)[isAntag(whom) ? "(A)" : ""][isLivingSSD(whom) ? "<span class='danger'>(SSD!)</span>" : ""] ([admin_jump_link(whom)])"
|
||||
var/message = "[key_name(whom, 1, include_name)](<A HREF='?_src_=holder;adminmoreinfo=\ref[whom]'>?</A>)[isAntag(whom) ? "<font color='red'>(A)</font>" : ""][isLivingSSD(whom) ? "<span class='danger'>(SSD!)</span>" : ""] ([admin_jump_link(whom)])"
|
||||
return message
|
||||
|
||||
/proc/log_and_message_admins(var/message as text)
|
||||
|
||||
@@ -103,13 +103,12 @@
|
||||
if(drownee.losebreath > 20) //You've probably got bigger problems than drowning at this point, so we won't add to it until you get that under control.
|
||||
return
|
||||
|
||||
add_logs(src, drownee, "drowned", null, null, 0) //log it to their VV, but don't spam the admins' chats with the logs
|
||||
if(drownee.stat) //Mob is in critical.
|
||||
drownee.AdjustLoseBreath(3, bound_lower = 0, bound_upper = 20)
|
||||
add_logs(src, drownee, "drowned", null, null, 0) //log it to their VV, but don't spam the admins' chats with the logs
|
||||
drownee.visible_message("<span class='danger'>\The [drownee] appears to be drowning!</span>","<span class='userdanger'>You're quickly drowning!</span>") //inform them that they are fucked.
|
||||
else
|
||||
drownee.AdjustLoseBreath(2, bound_lower = 0, bound_upper = 20) //For every time you drown, you miss 2 breath attempts. Hope you catch on quick!
|
||||
add_logs(src, drownee, "drowned", null, null, 0) //log it to their VV, but don't spam the admins' chats with the logs
|
||||
if(prob(35)) //35% chance to tell them what is going on. They should probably figure it out before then.
|
||||
drownee.visible_message("<span class='danger'>\The [drownee] flails, almost like they are drowning!</span>","<span class='userdanger'>You're lacking air!</span>") //*gasp* *gasp* *gasp* *gasp* *gasp*
|
||||
|
||||
|
||||
@@ -329,7 +329,7 @@
|
||||
if(M.melee_damage_upper == 0) return
|
||||
if(!(stat & BROKEN))
|
||||
visible_message("<span class='userdanger'>[M] [M.attacktext] [src]!</span>")
|
||||
add_logs(src, M, "attacked", admin=0)
|
||||
add_logs(src, M, "attacked", admin=0, print_attack_log = 0)
|
||||
//src.attack_log += text("\[[time_stamp()]\] <font color='orange'>was attacked by [M.name] ([M.ckey])</font>")
|
||||
src.health -= M.melee_damage_upper
|
||||
if(src.health <= 0)
|
||||
|
||||
@@ -35,7 +35,7 @@ In all, this is a lot like the monkey code. /N
|
||||
visible_message("<span class='danger'>[M.name] bites [src]!</span>", \
|
||||
"<span class='userdanger'>[M.name] bites [src]!</span>")
|
||||
adjustBruteLoss(damage)
|
||||
add_logs(M, src, "attacked", admin=0)
|
||||
add_logs(M, src, "attacked", admin=0, print_attack_log = 0)
|
||||
updatehealth()
|
||||
else
|
||||
to_chat(M, "<span class='warning'>[name] is too injured for that.</span>")
|
||||
|
||||
@@ -116,7 +116,7 @@
|
||||
"<span class='userdanger'>[M] [M.attacktext] [src]!</span>")
|
||||
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
|
||||
adjustBruteLoss(damage)
|
||||
add_logs(M, src, "attacked", admin=0)
|
||||
add_logs(M, src, "attacked", admin=0, print_attack_log = 0)
|
||||
updatehealth()
|
||||
|
||||
|
||||
|
||||
@@ -805,10 +805,12 @@
|
||||
unEquip(pocket_item)
|
||||
if(thief_mode)
|
||||
usr.put_in_hands(pocket_item)
|
||||
add_logs(usr, src, "stripped", addition="of [pocket_item]", print_attack_log = isLivingSSD(src))
|
||||
else
|
||||
if(place_item)
|
||||
usr.unEquip(place_item)
|
||||
equip_to_slot_if_possible(place_item, pocket_id, 0, 1)
|
||||
add_logs(usr, src, "equipped", addition="with [pocket_item]", print_attack_log = isLivingSSD(src))
|
||||
|
||||
// Update strip window
|
||||
if(usr.machine == src && in_range(src, usr))
|
||||
@@ -817,6 +819,7 @@
|
||||
// Display a warning if the user mocks up if they don't have pickpocket gloves.
|
||||
if(!thief_mode)
|
||||
to_chat(src, "<span class='warning'>You feel your [pocket_side] pocket being fumbled with!</span>")
|
||||
add_logs(usr, src, "attempted to strip", addition="of [pocket_item]", print_attack_log = isLivingSSD(src))
|
||||
|
||||
if(href_list["set_sensor"])
|
||||
if(istype(w_uniform, /obj/item/clothing/under))
|
||||
|
||||
@@ -340,8 +340,7 @@ emp_act
|
||||
if(M)
|
||||
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been hit with a [I], thrown by [key_name(M)]</font>")
|
||||
M.attack_log += text("\[[time_stamp()]\] <font color='red'>Hit [key_name(src)] with a thrown [I]</font>")
|
||||
if(!istype(src,/mob/living/simple_animal/mouse))
|
||||
msg_admin_attack("[key_name_admin(src)] was hit by a [I], thrown by [key_name_admin(M)]")
|
||||
msg_admin_attack("[key_name_admin(src)] was hit by a [I], thrown by [key_name_admin(M)]", print_attack_log = I.throwforce)
|
||||
|
||||
//thrown weapon embedded object code.
|
||||
if(dtype == BRUTE && istype(I))
|
||||
|
||||
@@ -642,7 +642,7 @@
|
||||
who.unEquip(what)
|
||||
if(silent)
|
||||
put_in_hands(what)
|
||||
add_logs(src, who, "stripped", addition="of [what]")
|
||||
add_logs(src, who, "stripped", addition="of [what]", print_attack_log = isLivingSSD(who))
|
||||
|
||||
// The src mob is trying to place an item on someone
|
||||
// Override if a certain mob should be behave differently when placing items (can't, for example)
|
||||
@@ -661,7 +661,7 @@
|
||||
if(what && Adjacent(who))
|
||||
unEquip(what)
|
||||
who.equip_to_slot_if_possible(what, where, 0, 1)
|
||||
add_logs(src, who, "equipped", what)
|
||||
add_logs(src, who, "equipped", what, print_attack_log = isLivingSSD(who))
|
||||
|
||||
|
||||
/mob/living/singularity_act()
|
||||
|
||||
@@ -142,7 +142,7 @@
|
||||
else
|
||||
|
||||
step_away(src,M)
|
||||
add_logs(M.occupant, src, "pushed", object=M, admin=0)
|
||||
add_logs(M.occupant, src, "pushed", object=M, admin=0, print_attack_log = 0)
|
||||
M.occupant_message("<span class='warning'>You push [src] out of the way.</span>")
|
||||
visible_message("<span class='warning'>[M] pushes [src] out of the way.</span>")
|
||||
return
|
||||
|
||||
@@ -603,7 +603,7 @@ var/list/ai_verbs_default = list(
|
||||
if(M.attack_sound)
|
||||
playsound(loc, M.attack_sound, 50, 1, 1)
|
||||
visible_message("<span class='danger'><B>[M]</B> [M.attacktext] [src]!")
|
||||
add_logs(M, src, "attacked", admin=0)
|
||||
add_logs(M, src, "attacked", admin=0, print_attack_log = 0)
|
||||
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
|
||||
adjustBruteLoss(damage)
|
||||
updatehealth()
|
||||
|
||||
@@ -920,7 +920,7 @@ var/list/robot_verbs_default = list(
|
||||
if(M.attack_sound)
|
||||
playsound(loc, M.attack_sound, 50, 1, 1)
|
||||
visible_message("<span class='danger'><B>[M]</B> [M.attacktext] [src]!</span>")
|
||||
add_logs(M, src, "attacked", admin=0)
|
||||
add_logs(M, src, "attacked", admin=0, print_attack_log = 0)
|
||||
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
|
||||
switch(M.melee_damage_type)
|
||||
if(BRUTE)
|
||||
@@ -1467,4 +1467,4 @@ var/list/robot_verbs_default = list(
|
||||
borked_part.installed = 1
|
||||
borked_part.wrapped = new borked_part.external_type
|
||||
borked_part.heal_damage(brute,burn)
|
||||
borked_part.install()
|
||||
borked_part.install()
|
||||
|
||||
@@ -254,7 +254,7 @@
|
||||
return
|
||||
apply_damage(M.melee_damage_upper, BRUTE)
|
||||
visible_message("<span class='userdanger'>[M] has [M.attacktext] [src]!</span>")
|
||||
add_logs(M, src, "attacked", admin=0)
|
||||
add_logs(M, src, "attacked", admin=0, print_attack_log = 0)
|
||||
if(prob(10))
|
||||
new /obj/effect/decal/cleanable/blood/oil(loc)
|
||||
|
||||
@@ -1010,4 +1010,4 @@ Pass a positive integer as an argument to override a bot's default speed.
|
||||
throw_alert("temp", /obj/screen/alert/cold/robot, 2)
|
||||
|
||||
/mob/living/simple_animal/bot/is_mechanical()
|
||||
return 1
|
||||
return 1
|
||||
|
||||
@@ -297,7 +297,7 @@
|
||||
playsound(loc, M.attack_sound, 50, 1, 1)
|
||||
visible_message("<span class='danger'>\The [M] [M.attacktext] [src]!</span>", \
|
||||
"<span class='userdanger'>\The [M] [M.attacktext] [src]!</span>")
|
||||
add_logs(M, src, "attacked", admin=0)
|
||||
add_logs(M, src, "attacked", admin=0, print_attack_log = 0)
|
||||
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
|
||||
attack_threshold_check(damage,M.melee_damage_type)
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
return 0
|
||||
else if(stat == UNCONSCIOUS)
|
||||
return 0
|
||||
add_logs(src, null, "fallen unconscious at [atom_loc_line(get_turf(src))]", admin=0)
|
||||
add_logs(src, null, "fallen unconscious at [atom_loc_line(get_turf(src))]", admin=0, print_attack_log = 0)
|
||||
stat = UNCONSCIOUS
|
||||
if(updating)
|
||||
// update_blind_effects()
|
||||
@@ -19,7 +19,7 @@
|
||||
return 0
|
||||
else if(stat == CONSCIOUS)
|
||||
return 0
|
||||
add_logs(src, null, "woken up at [atom_loc_line(get_turf(src))]", admin=0)
|
||||
add_logs(src, null, "woken up at [atom_loc_line(get_turf(src))]", admin=0, print_attack_log = 0)
|
||||
stat = CONSCIOUS
|
||||
if(updating)
|
||||
// update_blind_effects()
|
||||
@@ -40,7 +40,7 @@
|
||||
return
|
||||
if(!can_be_revived())
|
||||
return
|
||||
add_logs(src, null, "came back to life at [atom_loc_line(get_turf(src))]", admin=0)
|
||||
add_logs(src, null, "came back to life at [atom_loc_line(get_turf(src))]", admin=0, print_attack_log = 0)
|
||||
stat = CONSCIOUS
|
||||
dead_mob_list -= src
|
||||
living_mob_list += src
|
||||
|
||||
@@ -51,6 +51,8 @@
|
||||
var/embed = 0 // whether or not the projectile can embed itself in the mob
|
||||
var/forcedodge = 0 //to pass through everything
|
||||
|
||||
var/log = 1 //whether print to admin attack logs or just keep it in the diary
|
||||
|
||||
/obj/item/projectile/New()
|
||||
permutated = list()
|
||||
return ..()
|
||||
@@ -87,7 +89,7 @@
|
||||
for(var/datum/reagent/R in reagents.reagent_list)
|
||||
reagent_note += R.id + " ("
|
||||
reagent_note += num2text(R.volume) + ") "
|
||||
add_logs(firer, L, "shot", src, reagent_note)
|
||||
add_logs(firer, L, "shot", src, reagent_note, print_attack_log = log)
|
||||
return L.apply_effects(stun, weaken, paralyze, irradiate, slur, stutter, eyeblur, drowsy, blocked, stamina, jitter)
|
||||
|
||||
/obj/item/projectile/proc/vol_by_damage()
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
name = "practice laser"
|
||||
damage = 0
|
||||
nodamage = 1
|
||||
log = 0
|
||||
|
||||
/obj/item/projectile/beam/scatter
|
||||
name = "laser pellet"
|
||||
@@ -74,6 +75,7 @@
|
||||
damage_type = STAMINA
|
||||
flag = "laser"
|
||||
var/suit_types = list(/obj/item/clothing/suit/redtag, /obj/item/clothing/suit/bluetag)
|
||||
log = 0
|
||||
|
||||
/obj/item/projectile/beam/lasertag/on_hit(atom/target, blocked = 0)
|
||||
. = ..()
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
var/obj/item/weapon/pen/pen = null
|
||||
edge = 0
|
||||
embed = 0
|
||||
log = 0//it won't log even when there's a pen inside, but since the damage will be so low, I don't think there's any point in making it any more complex
|
||||
|
||||
/obj/item/projectile/bullet/reusable/foam_dart/handle_drop()
|
||||
if(dropped)
|
||||
@@ -64,3 +65,4 @@
|
||||
icon_state = "foamdart_riot"
|
||||
ammo_type = /obj/item/ammo_casing/caseless/foam_dart/riot
|
||||
stamina = 25
|
||||
log = 1
|
||||
|
||||
Reference in New Issue
Block a user