mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-29 16:18:01 +01:00
Adds a thrownby var that's used by admin logging.
This commit is contained in:
@@ -128,7 +128,7 @@ var/const/tk_maxrange = 15
|
||||
|
||||
else
|
||||
apply_focus_overlay()
|
||||
focus.throw_at(target, 10, 1)
|
||||
focus.throw_at(target, 10, 1,user)
|
||||
last_throw = world.time
|
||||
return
|
||||
|
||||
|
||||
@@ -225,7 +225,7 @@
|
||||
"<span class='userdanger'>[A] has hit [D] with Plasma Punch!</span>")
|
||||
playsound(D.loc, 'sound/weapons/punch1.ogg', 50, 1, -1)
|
||||
var/atom/throw_target = get_edge_target_turf(D, get_dir(D, get_step_away(D, A)))
|
||||
D.throw_at(throw_target, 200, 4)
|
||||
D.throw_at(throw_target, 200, 4,A)
|
||||
A.say("HYAH!")
|
||||
return
|
||||
|
||||
|
||||
@@ -343,4 +343,4 @@
|
||||
var/mob/living/M = AM
|
||||
M.Weaken(2)
|
||||
M << "<span class='userdanger'>You're thrown back by a mystical force!</span>"
|
||||
spawn(0) AM.throw_at(throwtarget, ((Clamp((maxthrow - (Clamp(distfromcaster - 2, 0, distfromcaster))), 3, maxthrow))), 1)//So stuff gets tossed around at the same time.
|
||||
spawn(0) AM.throw_at(throwtarget, ((Clamp((maxthrow - (Clamp(distfromcaster - 2, 0, distfromcaster))), 3, maxthrow))), 1,user)//So stuff gets tossed around at the same time.
|
||||
@@ -6,6 +6,7 @@
|
||||
var/throw_speed = 2
|
||||
var/throw_range = 7
|
||||
var/mob/pulledby = null
|
||||
var/mob/thrownby = null
|
||||
var/languages = 0 //For say() and Hear()
|
||||
var/verb_say = "says"
|
||||
var/verb_ask = "asks"
|
||||
@@ -168,10 +169,15 @@
|
||||
src.throw_impact(A)
|
||||
src.throwing = 0
|
||||
|
||||
/atom/movable/proc/throw_at(atom/target, range, speed)
|
||||
/atom/movable/proc/throw_at(atom/target, range, speed, mob/user)
|
||||
if(!target || !src || (flags & NODROP)) return 0
|
||||
//use a modified version of Bresenham's algorithm to get from the atom's current position to that of the target
|
||||
|
||||
if(user)
|
||||
thrownby = user
|
||||
else
|
||||
thrownby = null
|
||||
|
||||
src.throwing = 1
|
||||
if(target.allow_spin) // turns out 1000+ spinning objects being thrown at the singularity creates lag - Iamgoofball
|
||||
SpinAnimation(5, 1)
|
||||
|
||||
@@ -92,7 +92,7 @@
|
||||
loadedWeightClass -= ITD.w_class
|
||||
ITD.throw_speed = pressureSetting * 2
|
||||
ITD.loc = get_turf(src)
|
||||
ITD.throw_at(target, pressureSetting * 5, pressureSetting * 2)
|
||||
ITD.throw_at(target, pressureSetting * 5, pressureSetting * 2,user)
|
||||
if(pressureSetting >= 3)
|
||||
user << "<span class='boldannounce'>\The [src]'s recoil knocks you down!</span>"
|
||||
user.Weaken(2)
|
||||
|
||||
@@ -189,10 +189,10 @@
|
||||
|
||||
var/type = input(usr,"Select Generator Type","Type") as null|anything in gen_paths
|
||||
if(!type) return
|
||||
|
||||
|
||||
master.generator_path = type
|
||||
master.cornerA = null
|
||||
master.cornerB = null
|
||||
master.cornerB = null
|
||||
|
||||
return 1
|
||||
|
||||
@@ -292,7 +292,7 @@
|
||||
holder.throw_atom = object
|
||||
if(pa.Find("right"))
|
||||
if(holder.throw_atom)
|
||||
holder.throw_atom.throw_at(object, 10, 1)
|
||||
holder.throw_atom.throw_at(object, 10, 1,user)
|
||||
log_admin("Build Mode: [key_name(usr)] threw [holder.throw_atom] at [object] ([object.x],[object.y],[object.z])")
|
||||
if(AREA_BUILDMODE)
|
||||
if(!holder.cornerA)
|
||||
@@ -300,7 +300,7 @@
|
||||
return
|
||||
if(holder.cornerA && !holder.cornerB)
|
||||
holder.cornerB = get_turf(object)
|
||||
|
||||
|
||||
if(pa.Find("left")) //rectangular
|
||||
if(holder.cornerA && holder.cornerB)
|
||||
if(!holder.generator_path)
|
||||
|
||||
@@ -104,7 +104,7 @@
|
||||
H.update_icon()
|
||||
|
||||
source.visible_message("\The [source] deals a card to \the [target].")
|
||||
H.throw_at(get_step(target, target.dir), 10, 1, H)
|
||||
H.throw_at(get_step(target, target.dir), 10, 1, source)
|
||||
|
||||
/* Hand */
|
||||
|
||||
|
||||
@@ -278,7 +278,7 @@
|
||||
|
||||
newtonian_move(get_dir(target, src))
|
||||
|
||||
item.throw_at(target, item.throw_range, item.throw_speed)
|
||||
item.throw_at(target, item.throw_range, item.throw_speed, src)
|
||||
|
||||
/mob/living/carbon/can_use_hands()
|
||||
if(handcuffed)
|
||||
@@ -531,7 +531,7 @@ var/const/GALOSHES_DONT_HELP = 8
|
||||
target = new_turf
|
||||
if(new_turf.density)
|
||||
break
|
||||
I.throw_at(target,I.throw_range,I.throw_speed)
|
||||
I.throw_at(target,I.throw_range,I.throw_speed,src)
|
||||
if(61 to 90) //throw it down to the floor
|
||||
var/turf/target = get_turf(loc)
|
||||
I.throw_at(target,I.throw_range,I.throw_speed)
|
||||
I.throw_at(target,I.throw_range,I.throw_speed,src)
|
||||
@@ -71,12 +71,9 @@
|
||||
"<span class='userdanger'>[src] has been hit by [I].</span>")
|
||||
var/armor = run_armor_check(zone, "melee", "Your armor has protected your [parse_zone(zone)].", "Your armor has softened hit to your [parse_zone(zone)].",I.armour_penetration)
|
||||
apply_damage(I.throwforce, dtype, zone, armor, I)
|
||||
if(!I.fingerprintslast)
|
||||
return
|
||||
var/client/assailant = directory[ckey(I.fingerprintslast)]
|
||||
if(assailant && assailant.mob && istype(assailant.mob,/mob))
|
||||
var/mob/M = assailant.mob
|
||||
add_logs(M, src, "hit", object="[I]")
|
||||
|
||||
if(I.thrownby)
|
||||
add_logs(I.thrownby, src, "hit", object="[I]")
|
||||
|
||||
/mob/living/mech_melee_attack(obj/mecha/M)
|
||||
if(M.occupant.a_intent == "harm")
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
energyKatana.spark_system.start()
|
||||
playsound(H, "sparks", 50, 1)
|
||||
H.visible_message("<span class='danger'>\the [energyKatana] flies towards [H]!</span>","<span class='warning'>You hold out your hand and \the [energyKatana] flies towards you!</span>")
|
||||
energyKatana.throw_at(H, distance+1, energyKatana.throw_speed)
|
||||
energyKatana.throw_at(H, distance+1, energyKatana.throw_speed,H)
|
||||
|
||||
else //Else just TP it to us.
|
||||
energyKatana.returnToOwner(H,1)
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
var/obj/item/weapon/grenade/chem_grenade/F = grenades[1] //Now with less copypasta!
|
||||
grenades -= F
|
||||
F.loc = user.loc
|
||||
F.throw_at(target, 30, 2)
|
||||
F.throw_at(target, 30, 2,user)
|
||||
message_admins("[key_name_admin(user)] fired a grenade ([F.name]) from a grenade launcher ([src.name]).")
|
||||
log_game("[key_name(user)] fired a grenade ([F.name]) from a grenade launcher ([src.name]).")
|
||||
F.active = 1
|
||||
|
||||
@@ -84,8 +84,6 @@
|
||||
if(!reagents.total_volume || !is_open_container())
|
||||
return
|
||||
|
||||
var/client/thrower = directory[ckey(src.fingerprintslast)]
|
||||
|
||||
if(ismob(target) && target.reagents)
|
||||
reagents.total_volume *= rand(5,10) * 0.1 //Not all of it makes contact with the target
|
||||
var/mob/M = target
|
||||
@@ -97,12 +95,12 @@
|
||||
R += A.id + " ("
|
||||
R += num2text(A.volume) + "),"
|
||||
|
||||
if(thrower && thrower.mob)
|
||||
add_logs(thrower.mob, M, "splashed", object="[R]")
|
||||
if(thrownby)
|
||||
add_logs(thrownby, M, "splashed", object="[R]")
|
||||
reagents.reaction(target, TOUCH)
|
||||
|
||||
else if(!target.density || target.throwpass)
|
||||
if(thrower && thrower.mob && thrower.mob.mind && thrower.mob.mind.assigned_role == "Bartender")
|
||||
if(thrownby && thrownby.mind && thrownby.mind.assigned_role == "Bartender")
|
||||
visible_message("<span class='notice'>[src] lands onto the [target.name] without spilling a single drop.</span>")
|
||||
return
|
||||
|
||||
|
||||
Reference in New Issue
Block a user