Tg 2 11 sync (#215)
* first series of updates * datums * games folder * admin and atmosia stuffs * moar * mob updates borg riding * sprites and stuff * fixes for various things * oops. some missed fixes
This commit is contained in:
@@ -91,20 +91,29 @@
|
||||
return 1
|
||||
return ..()
|
||||
|
||||
/mob/living/carbon/throw_impact(atom/hit_atom)
|
||||
/mob/living/carbon/throw_impact(atom/hit_atom, throwingdatum)
|
||||
. = ..()
|
||||
var/hurt = TRUE
|
||||
if(istype(throwingdatum, /datum/thrownthing))
|
||||
var/datum/thrownthing/D = throwingdatum
|
||||
if(iscyborg(D.thrower))
|
||||
var/mob/living/silicon/robot/R = D.thrower
|
||||
if(!R.emagged)
|
||||
hurt = FALSE
|
||||
if(hit_atom.density && isturf(hit_atom))
|
||||
Weaken(1)
|
||||
take_bodypart_damage(10)
|
||||
if(hurt)
|
||||
Weaken(1)
|
||||
take_bodypart_damage(10)
|
||||
if(iscarbon(hit_atom) && hit_atom != src)
|
||||
var/mob/living/carbon/victim = hit_atom
|
||||
if(victim.movement_type & FLYING)
|
||||
return
|
||||
victim.Weaken(1)
|
||||
Weaken(1)
|
||||
victim.take_bodypart_damage(10)
|
||||
take_bodypart_damage(10)
|
||||
visible_message("<span class='danger'>[src] crashes into [victim], knocking them both over!</span>", "<span class='userdanger'>You violently crash into [victim]!</span>")
|
||||
if(hurt)
|
||||
victim.take_bodypart_damage(10)
|
||||
take_bodypart_damage(10)
|
||||
victim.Weaken(1)
|
||||
Weaken(1)
|
||||
visible_message("<span class='danger'>[src] crashes into [victim], knocking them both over!</span>", "<span class='userdanger'>You violently crash into [victim]!</span>")
|
||||
playsound(src,'sound/weapons/punch1.ogg',50,1)
|
||||
|
||||
|
||||
@@ -231,23 +240,6 @@
|
||||
/mob/living/carbon/is_muzzled()
|
||||
return(istype(src.wear_mask, /obj/item/clothing/mask/muzzle))
|
||||
|
||||
/mob/living/carbon/proc/spin(spintime, speed)
|
||||
set waitfor = 0
|
||||
var/D = dir
|
||||
while(spintime >= speed)
|
||||
sleep(speed)
|
||||
switch(D)
|
||||
if(NORTH)
|
||||
D = EAST
|
||||
if(SOUTH)
|
||||
D = WEST
|
||||
if(EAST)
|
||||
D = SOUTH
|
||||
if(WEST)
|
||||
D = NORTH
|
||||
setDir(D)
|
||||
spintime -= speed
|
||||
|
||||
/mob/living/carbon/resist_buckle()
|
||||
if(restrained())
|
||||
changeNext_move(CLICK_CD_BREAKOUT)
|
||||
|
||||
@@ -168,7 +168,7 @@
|
||||
O.emp_act(severity)
|
||||
..()
|
||||
|
||||
/mob/living/carbon/electrocute_act(shock_damage, obj/source, siemens_coeff = 1, safety = 0, override = 0, tesla_shock = 0, illusion = 0)
|
||||
/mob/living/carbon/electrocute_act(shock_damage, obj/source, siemens_coeff = 1, safety = 0, override = 0, tesla_shock = 0, illusion = 0, stun = TRUE)
|
||||
if(tesla_shock && tesla_ignore)
|
||||
return FALSE
|
||||
shock_damage *= siemens_coeff
|
||||
@@ -190,11 +190,11 @@
|
||||
jitteriness += 1000 //High numbers for violent convulsions
|
||||
do_jitter_animation(jitteriness)
|
||||
stuttering += 2
|
||||
if(!tesla_shock || (tesla_shock && siemens_coeff > 0.5))
|
||||
if((!tesla_shock || (tesla_shock && siemens_coeff > 0.5)) && stun)
|
||||
Stun(2)
|
||||
spawn(20)
|
||||
jitteriness = max(jitteriness - 990, 10) //Still jittery, but vastly less
|
||||
if(!tesla_shock || (tesla_shock && siemens_coeff > 0.5))
|
||||
if((!tesla_shock || (tesla_shock && siemens_coeff > 0.5)) && stun)
|
||||
Stun(3)
|
||||
Weaken(3)
|
||||
if(override)
|
||||
|
||||
@@ -436,7 +436,7 @@
|
||||
|
||||
|
||||
//Added a safety check in case you want to shock a human mob directly through electrocute_act.
|
||||
/mob/living/carbon/human/electrocute_act(shock_damage, obj/source, siemens_coeff = 1, safety = 0, override = 0, tesla_shock = 0, illusion = 0)
|
||||
/mob/living/carbon/human/electrocute_act(shock_damage, obj/source, siemens_coeff = 1, safety = 0, override = 0, tesla_shock = 0, illusion = 0, stun = TRUE)
|
||||
if(tesla_shock)
|
||||
var/total_coeff = 1
|
||||
if(gloves)
|
||||
@@ -447,6 +447,8 @@
|
||||
var/obj/item/clothing/suit/S = wear_suit
|
||||
if(S.siemens_coefficient <= 0)
|
||||
total_coeff -= 0.95
|
||||
else if(S.siemens_coefficient == (-1))
|
||||
total_coeff -= 1
|
||||
siemens_coeff = total_coeff
|
||||
if(tesla_ignore)
|
||||
siemens_coeff = 0
|
||||
@@ -461,7 +463,7 @@
|
||||
heart_attack = 0
|
||||
if(stat == CONSCIOUS)
|
||||
src << "<span class='notice'>You feel your heart beating again!</span>"
|
||||
. = ..(shock_damage,source,siemens_coeff,safety,override,tesla_shock, illusion)
|
||||
. = ..(shock_damage,source,siemens_coeff,safety,override,tesla_shock, illusion, stun)
|
||||
if(.)
|
||||
electrocution_animation(40)
|
||||
|
||||
@@ -754,4 +756,4 @@
|
||||
torn_items += leg_clothes
|
||||
|
||||
for(var/obj/item/I in torn_items)
|
||||
I.take_damage(damage_amount, damage_type, damage_flag, 0)
|
||||
I.take_damage(damage_amount, damage_type, damage_flag, 0)
|
||||
|
||||
@@ -1015,7 +1015,7 @@
|
||||
var/obj/item/organ/cyberimp/chest/thrusters/T = H.getorganslot("thrusters")
|
||||
if(!istype(J) && istype(C))
|
||||
J = C.jetpack
|
||||
if(istype(J) && J.allow_thrust(0.01, H)) //Prevents stacking
|
||||
if(istype(J) && J.full_speed && J.allow_thrust(0.01, H)) //Prevents stacking
|
||||
. -= 2
|
||||
else if(istype(T) && T.allow_thrust(0.01, H))
|
||||
. -= 2
|
||||
|
||||
@@ -150,4 +150,14 @@
|
||||
return 1
|
||||
|
||||
/mob/living/carbon/monkey/can_use_guns(var/obj/item/weapon/gun/G)
|
||||
return 1
|
||||
return 1
|
||||
|
||||
/mob/living/carbon/monkey/angry
|
||||
aggressive = TRUE
|
||||
|
||||
/mob/living/carbon/monkey/angry/Initialize()
|
||||
..()
|
||||
if(prob(10))
|
||||
var/obj/item/clothing/head/helmet/justice/escape/helmet = new(src)
|
||||
equip_to_slot_or_del(helmet,slot_head)
|
||||
helmet.attack_self(src) // todo encapsulate toggle
|
||||
@@ -93,6 +93,7 @@
|
||||
if(istype(S) && S.deathmessage)
|
||||
message_simple = S.deathmessage
|
||||
. = ..()
|
||||
message_simple = initial(message_simple)
|
||||
if(. && isalienadult(user))
|
||||
playsound(user.loc, 'sound/voice/hiss6.ogg', 80, 1, 1)
|
||||
|
||||
@@ -451,3 +452,15 @@
|
||||
message = "beeps."
|
||||
message_param = "beeps at %t."
|
||||
sound = 'sound/machines/twobeep.ogg'
|
||||
|
||||
/datum/emote/living/spin
|
||||
key = "spin"
|
||||
key_third_person = "spins"
|
||||
message = "spins around dizzily!"
|
||||
|
||||
/datum/emote/living/spin/run_emote(mob/user)
|
||||
user.spin(20, 1)
|
||||
if(istype(user, /mob/living/silicon/robot))
|
||||
var/mob/living/silicon/robot/R = user
|
||||
R.riding_datum.force_dismount()
|
||||
..()
|
||||
@@ -274,8 +274,7 @@
|
||||
take_bodypart_damage(acidpwr * min(1, acid_volume * 0.1))
|
||||
return 1
|
||||
|
||||
|
||||
/mob/living/proc/electrocute_act(shock_damage, obj/source, siemens_coeff = 1, safety = 0, tesla_shock = 0, illusion = 0)
|
||||
/mob/living/proc/electrocute_act(shock_damage, obj/source, siemens_coeff = 1, safety = 0, tesla_shock = 0, illusion = 0, stun = TRUE)
|
||||
if(tesla_shock && tesla_ignore)
|
||||
return FALSE
|
||||
if(shock_damage > 0)
|
||||
@@ -325,13 +324,16 @@
|
||||
|
||||
|
||||
/mob/living/ratvar_act()
|
||||
if(stat != DEAD && !is_servant_of_ratvar(src) && !add_servant_of_ratvar(src))
|
||||
src << "<span class='userdanger'>A blinding light boils you alive! <i>Run!</i></span>"
|
||||
adjustFireLoss(35)
|
||||
if(src)
|
||||
adjust_fire_stacks(1)
|
||||
IgniteMob()
|
||||
return FALSE
|
||||
if(stat != DEAD && !is_servant_of_ratvar(src))
|
||||
for(var/obj/item/weapon/implant/mindshield/M in implants)
|
||||
qdel(M)
|
||||
if(!add_servant_of_ratvar(src))
|
||||
src << "<span class='userdanger'>A blinding light boils you alive! <i>Run!</i></span>"
|
||||
adjustFireLoss(35)
|
||||
if(src)
|
||||
adjust_fire_stacks(1)
|
||||
IgniteMob()
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
|
||||
|
||||
@@ -57,11 +57,11 @@
|
||||
var/chassis = "repairbot"
|
||||
var/list/possible_chassis = list("cat", "mouse", "monkey", "corgi", "fox", "repairbot", "rabbit")
|
||||
|
||||
var/emitterhealth = 50
|
||||
var/emittermaxhealth = 50
|
||||
var/emitterregen = 0.5
|
||||
var/emittercd = 20
|
||||
var/emitteroverloadcd = 50
|
||||
var/emitterhealth = 20
|
||||
var/emittermaxhealth = 20
|
||||
var/emitterregen = 0.25
|
||||
var/emittercd = 50
|
||||
var/emitteroverloadcd = 100
|
||||
var/emittersemicd = FALSE
|
||||
|
||||
var/overload_ventcrawl = 0
|
||||
@@ -235,4 +235,4 @@
|
||||
|
||||
/mob/living/silicon/pai/process()
|
||||
emitterhealth = Clamp((emitterhealth + emitterregen), -50, emittermaxhealth)
|
||||
hit_slowdown = Clamp((hit_slowdown - 1), 0, 100)
|
||||
hit_slowdown = Clamp((hit_slowdown - 1), 0, 100)
|
||||
@@ -30,4 +30,6 @@
|
||||
|
||||
update_icons()
|
||||
|
||||
sql_report_death(src)
|
||||
unbuckle_all_mobs(TRUE)
|
||||
|
||||
sql_report_death(src)
|
||||
|
||||
@@ -69,4 +69,4 @@
|
||||
"You announce you are operating in low power mode.")
|
||||
playsound(loc, 'sound/machines/buzz-two.ogg', 50, 0)
|
||||
else
|
||||
src << "<span class='warning'>You can only use this emote when you're out of charge.</span>"
|
||||
src << "<span class='warning'>You can only use this emote when you're out of charge.</span>"
|
||||
|
||||
@@ -89,7 +89,9 @@
|
||||
/obj/item/clothing/head/sombrero,
|
||||
/obj/item/clothing/head/witchunter_hat)
|
||||
|
||||
|
||||
can_buckle = TRUE
|
||||
buckle_lying = FALSE
|
||||
var/datum/riding/cyborg/riding_datum = null
|
||||
|
||||
/mob/living/silicon/robot/New(loc)
|
||||
spark_system = new /datum/effect_system/spark_spread()
|
||||
@@ -995,3 +997,90 @@
|
||||
hat = new_hat
|
||||
new_hat.forceMove(src)
|
||||
update_icons()
|
||||
|
||||
/mob/living/silicon/robot/MouseDrop_T(mob/living/M, mob/living/user)
|
||||
. = ..()
|
||||
if(!(M in buckled_mobs))
|
||||
buckle_mob(M)
|
||||
|
||||
/mob/living/silicon/robot/buckle_mob(mob/living/M, force = FALSE, check_loc = TRUE)
|
||||
if(!riding_datum)
|
||||
riding_datum = new /datum/riding/cyborg
|
||||
riding_datum.ridden = src
|
||||
if(buckled_mobs)
|
||||
if(buckled_mobs.len >= max_buckled_mobs)
|
||||
return
|
||||
if(M in buckled_mobs)
|
||||
return
|
||||
if(stat)
|
||||
return
|
||||
if(incapacitated())
|
||||
return
|
||||
if(M.restrained())
|
||||
return
|
||||
if(iscyborg(M))
|
||||
M.visible_message("<span class='warning'>[M] really can't seem to mount the [src]...</span>")
|
||||
return
|
||||
if(isbot(M))
|
||||
M.visible_message("<span class='boldwarning'>No. Just... no.</span>")
|
||||
return
|
||||
if(module)
|
||||
if(!module.allow_riding)
|
||||
M.visible_message("<span class='boldwarning'>Unfortunately, [M] just can't seem to hold onto [src]!</span>")
|
||||
return
|
||||
if(iscarbon(M))
|
||||
if(!equip_buckle_inhands(M)) //MAKE SURE THIS IS LAST!
|
||||
M.visible_message("<span class='boldwarning'>[M] can't climb onto [src] because his hands are full!</span>")
|
||||
return
|
||||
. = ..(M, force, check_loc)
|
||||
riding_datum.handle_vehicle_offsets()
|
||||
|
||||
/mob/living/silicon/robot/unbuckle_mob(mob/user)
|
||||
if(iscarbon(user))
|
||||
unequip_buckle_inhands(user)
|
||||
. = ..(user)
|
||||
riding_datum.restore_position(user)
|
||||
|
||||
/mob/living/silicon/robot/proc/unequip_buckle_inhands(mob/living/carbon/user)
|
||||
for(var/obj/item/cyborgride_offhand/O in user.contents)
|
||||
if(O.ridden != src)
|
||||
CRASH("RIDING OFFHAND ON WRONG MOB")
|
||||
continue
|
||||
if(O.selfdeleting)
|
||||
continue
|
||||
else
|
||||
qdel(O)
|
||||
return TRUE
|
||||
|
||||
/mob/living/silicon/robot/proc/equip_buckle_inhands(mob/living/carbon/user)
|
||||
var/obj/item/cyborgride_offhand/inhand = new /obj/item/cyborgride_offhand(user)
|
||||
inhand.rider = user
|
||||
inhand.ridden = src
|
||||
return user.put_in_hands(inhand, TRUE)
|
||||
|
||||
/obj/item/cyborgride_offhand
|
||||
name = "offhand"
|
||||
icon = 'icons/obj/weapons.dmi'
|
||||
icon_state = "offhand"
|
||||
w_class = WEIGHT_CLASS_HUGE
|
||||
flags = ABSTRACT | DROPDEL | NOBLUDGEON
|
||||
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF
|
||||
var/mob/living/carbon/rider
|
||||
var/mob/living/silicon/robot/ridden
|
||||
var/selfdeleting = FALSE
|
||||
|
||||
/obj/item/cyborgride_offhand/dropped()
|
||||
selfdeleting = TRUE
|
||||
. = ..()
|
||||
|
||||
/obj/item/cyborgride_offhand/equipped()
|
||||
if(loc != rider)
|
||||
selfdeleting = TRUE
|
||||
qdel(src)
|
||||
. = ..()
|
||||
|
||||
/obj/item/cyborgride_offhand/Destroy()
|
||||
if(selfdeleting)
|
||||
if(rider in ridden.buckled_mobs)
|
||||
ridden.unbuckle_mob(rider)
|
||||
. = ..()
|
||||
|
||||
@@ -26,6 +26,11 @@
|
||||
|
||||
var/hat_offset = -3
|
||||
|
||||
var/list/ride_offset_x = list("north" = 0, "south" = 0, "east" = -6, "west" = 6)
|
||||
var/list/ride_offset_y = list("north" = 4, "south" = 4, "east" = 3, "west" = 3)
|
||||
var/ride_allow_incapacitated = FALSE
|
||||
var/allow_riding = TRUE
|
||||
|
||||
/obj/item/weapon/robot_module/New()
|
||||
..()
|
||||
for(var/i in basic_modules)
|
||||
|
||||
@@ -17,3 +17,8 @@
|
||||
/mob/living/silicon/robot/experience_pressure_difference(pressure_difference, direction)
|
||||
if(!magpulse)
|
||||
return ..()
|
||||
|
||||
/mob/living/silicon/robot/Moved()
|
||||
. = ..()
|
||||
if(riding_datum)
|
||||
riding_datum.on_vehicle_move()
|
||||
@@ -26,6 +26,11 @@
|
||||
/mob/living/silicon/attack_animal(mob/living/simple_animal/M)
|
||||
if(..())
|
||||
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
|
||||
if(prob(damage))
|
||||
for(var/mob/living/N in buckled_mobs)
|
||||
N.Weaken(1)
|
||||
unbuckle_mob(N)
|
||||
N.visible_message("<span class='boldwarning'>[N] is knocked off of [src] by [M]!</span>")
|
||||
switch(M.melee_damage_type)
|
||||
if(BRUTE)
|
||||
adjustBruteLoss(damage)
|
||||
@@ -73,6 +78,10 @@
|
||||
return 0
|
||||
|
||||
/mob/living/silicon/electrocute_act(shock_damage, obj/source, siemens_coeff = 1, safety = 0, tesla_shock = 0, illusion = 0)
|
||||
if(buckled_mobs)
|
||||
for(var/mob/living/M in buckled_mobs)
|
||||
unbuckle_mob(M)
|
||||
M.electrocute_act(shock_damage/100, source, siemens_coeff, safety, tesla_shock, illusion) //Hard metal shell conducts!
|
||||
return 0 //So borgs they don't die trying to fix wiring
|
||||
|
||||
/mob/living/silicon/emp_act(severity)
|
||||
@@ -83,12 +92,26 @@
|
||||
src.take_bodypart_damage(10)
|
||||
src << "<span class='userdanger'>*BZZZT*</span>"
|
||||
src << "<span class='danger'>Warning: Electromagnetic pulse detected.</span>"
|
||||
for(var/mob/living/M in buckled_mobs)
|
||||
if(prob(severity*50))
|
||||
unbuckle_mob(M)
|
||||
M.Weaken(2)
|
||||
M.visible_message("<span class='boldwarning'>[M] is thrown off of [src]!</span>")
|
||||
flash_act(affect_silicon = 1)
|
||||
..()
|
||||
|
||||
/mob/living/silicon/bullet_act(obj/item/projectile/Proj)
|
||||
if((Proj.damage_type == BRUTE || Proj.damage_type == BURN))
|
||||
adjustBruteLoss(Proj.damage)
|
||||
if(prob(Proj.damage*1.5))
|
||||
for(var/mob/living/M in buckled_mobs)
|
||||
M.visible_message("<span class='boldwarning'>[M] is knocked off of [src]!</span>")
|
||||
unbuckle_mob(M)
|
||||
M.Weaken(2)
|
||||
if(Proj.stun || Proj.weaken)
|
||||
for(var/mob/living/M in buckled_mobs)
|
||||
unbuckle_mob(M)
|
||||
M.visible_message("<span class='boldwarning'>[M] is knocked off of [src] by the [Proj]!</span>")
|
||||
Proj.on_hit(src)
|
||||
return 2
|
||||
|
||||
|
||||
@@ -145,8 +145,9 @@ Auto Patrol: []"},
|
||||
mode = BOT_HUNT
|
||||
|
||||
/mob/living/simple_animal/bot/secbot/attack_hand(mob/living/carbon/human/H)
|
||||
if(H.a_intent == INTENT_HARM)
|
||||
if((H.a_intent == INTENT_HARM) || (H.a_intent == INTENT_DISARM))
|
||||
retaliate(H)
|
||||
|
||||
return ..()
|
||||
|
||||
/mob/living/simple_animal/bot/secbot/attackby(obj/item/weapon/W, mob/user, params)
|
||||
@@ -409,4 +410,4 @@ Auto Patrol: []"},
|
||||
..()
|
||||
|
||||
/obj/machinery/bot_core/secbot
|
||||
req_access = list(access_security)
|
||||
req_access = list(access_security)
|
||||
@@ -98,7 +98,7 @@ Difficulty: Hard
|
||||
INVOKE_ASYNC(src, .proc/charge)
|
||||
else
|
||||
if(prob(70) || warped)
|
||||
INVOKE_ASYNC(src, .proc/triple_charge)
|
||||
INVOKE_ASYNC(src, .proc/charge, 2)
|
||||
else
|
||||
INVOKE_ASYNC(src, .proc/warp_charge)
|
||||
|
||||
@@ -141,12 +141,7 @@ Difficulty: Hard
|
||||
blood_warp()
|
||||
charge()
|
||||
|
||||
/mob/living/simple_animal/hostile/megafauna/bubblegum/proc/triple_charge()
|
||||
charge()
|
||||
charge()
|
||||
charge()
|
||||
|
||||
/mob/living/simple_animal/hostile/megafauna/bubblegum/proc/charge()
|
||||
/mob/living/simple_animal/hostile/megafauna/bubblegum/proc/charge(bonus_charges)
|
||||
var/turf/T = get_turf(target)
|
||||
if(!T || T == loc)
|
||||
return
|
||||
@@ -156,14 +151,18 @@ Difficulty: Hard
|
||||
walk(src, 0)
|
||||
setDir(get_dir(src, T))
|
||||
var/obj/effect/overlay/temp/decoy/D = new /obj/effect/overlay/temp/decoy(loc,src)
|
||||
animate(D, alpha = 0, color = "#FF0000", transform = matrix()*2, time = 5)
|
||||
sleep(5)
|
||||
throw_at(T, get_dist(src, T), 1, src, 0, callback = CALLBACK(src, .charge_end))
|
||||
/mob/living/simple_animal/hostile/megafauna/bubblegum/proc/charge_end()
|
||||
animate(D, alpha = 0, color = "#FF0000", transform = matrix()*2, time = 3)
|
||||
sleep(3)
|
||||
throw_at(T, get_dist(src, T), 0.5, src, 0, callback = CALLBACK(src, .charge_end, bonus_charges))
|
||||
|
||||
/mob/living/simple_animal/hostile/megafauna/bubblegum/proc/charge_end(bonus_charges)
|
||||
charging = 0
|
||||
try_bloodattack()
|
||||
if(target)
|
||||
Goto(target, move_to_delay, minimum_distance)
|
||||
if(bonus_charges)
|
||||
charge(bonus_charges--)
|
||||
else
|
||||
Goto(target, move_to_delay, minimum_distance)
|
||||
|
||||
|
||||
/mob/living/simple_animal/hostile/megafauna/bubblegum/Bump(atom/A)
|
||||
@@ -312,8 +311,8 @@ Difficulty: Hard
|
||||
DA.color = "#FF0000"
|
||||
var/oldtransform = DA.transform
|
||||
DA.transform = matrix()*2
|
||||
animate(DA, alpha = 255, color = initial(DA.color), transform = oldtransform, time = 5)
|
||||
sleep(5)
|
||||
animate(DA, alpha = 255, color = initial(DA.color), transform = oldtransform, time = 3)
|
||||
sleep(3)
|
||||
qdel(DA)
|
||||
|
||||
var/obj/effect/decal/cleanable/blood/found_bloodpool
|
||||
|
||||
@@ -299,21 +299,20 @@
|
||||
if(!gibbed)
|
||||
if(death_sound)
|
||||
playsound(get_turf(src),death_sound, 200, 1)
|
||||
if(deathmessage && !del_on_death)
|
||||
if(deathmessage || !del_on_death)
|
||||
emote("deathgasp")
|
||||
if(del_on_death)
|
||||
ghostize()
|
||||
..()
|
||||
//Prevent infinite loops if the mob Destroy() is overriden in such
|
||||
//a manner as to cause a call to death() again
|
||||
del_on_death = FALSE
|
||||
qdel(src)
|
||||
return
|
||||
else
|
||||
health = 0
|
||||
icon_state = icon_dead
|
||||
density = 0
|
||||
lying = 1
|
||||
..()
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/proc/CanAttack(atom/the_target)
|
||||
if(see_invisible < the_target.invisibility)
|
||||
@@ -551,4 +550,4 @@
|
||||
|
||||
/mob/living/simple_animal/buckle_mob(mob/living/buckled_mob, force = 0, check_loc = 1)
|
||||
. = ..()
|
||||
riding_datum = new/datum/riding/animal
|
||||
riding_datum = new/datum/riding/animal
|
||||
+19
-40
@@ -1,6 +1,5 @@
|
||||
/mob/Destroy()//This makes sure that mobs with clients/keys are not just deleted from the game.
|
||||
mob_list -= src
|
||||
SSmob.currentrun -= src
|
||||
dead_mob_list -= src
|
||||
living_mob_list -= src
|
||||
all_clockwork_mobs -= src
|
||||
@@ -28,8 +27,8 @@ var/next_mob_id = 0
|
||||
dead_mob_list += src
|
||||
else
|
||||
living_mob_list += src
|
||||
prepare_huds()
|
||||
hook_vr("mob_new",list(src))
|
||||
prepare_huds()
|
||||
..()
|
||||
|
||||
/atom/proc/prepare_huds()
|
||||
@@ -112,7 +111,7 @@ var/next_mob_id = 0
|
||||
if(self_message)
|
||||
msg = self_message
|
||||
else
|
||||
if(M.see_invisible<invisibility)//if src is invisible to us
|
||||
if(M.see_invisible<invisibility)//if src is invisible to us,
|
||||
if(blind_message) // then people see blind message if there is one, otherwise nothing.
|
||||
msg = blind_message
|
||||
else
|
||||
@@ -125,18 +124,6 @@ var/next_mob_id = 0
|
||||
continue
|
||||
M.show_message(msg,1,blind_message,2)
|
||||
|
||||
/mob/proc/get_top_level_mob()
|
||||
if(istype(src.loc,/mob)&&src.loc!=src)
|
||||
var/mob/M=src.loc
|
||||
return M.get_top_level_mob()
|
||||
return src
|
||||
|
||||
proc/get_top_level_mob(var/mob/S)
|
||||
if(istype(S.loc,/mob)&&S.loc!=S)
|
||||
var/mob/M=S.loc
|
||||
return M.get_top_level_mob()
|
||||
return S
|
||||
|
||||
// Show a message to all mobs in earshot of this one
|
||||
// This would be for audible actions by the src mob
|
||||
// message is the message output to anyone who can hear.
|
||||
@@ -352,6 +339,23 @@ proc/get_top_level_mob(var/mob/S)
|
||||
else
|
||||
M.LAssailant = usr
|
||||
|
||||
/mob/proc/spin(spintime, speed)
|
||||
set waitfor = 0
|
||||
var/D = dir
|
||||
while(spintime >= speed)
|
||||
sleep(speed)
|
||||
switch(D)
|
||||
if(NORTH)
|
||||
D = EAST
|
||||
if(SOUTH)
|
||||
D = WEST
|
||||
if(EAST)
|
||||
D = SOUTH
|
||||
if(WEST)
|
||||
D = NORTH
|
||||
setDir(D)
|
||||
spintime -= speed
|
||||
|
||||
/mob/verb/stop_pulling()
|
||||
set name = "Stop Pulling"
|
||||
set category = "IC"
|
||||
@@ -452,30 +456,7 @@ proc/get_top_level_mob(var/mob/S)
|
||||
// M.Login() //wat
|
||||
return
|
||||
|
||||
/mob/proc/update_flavor_text()
|
||||
set src in usr
|
||||
if(usr != src)
|
||||
usr << "No."
|
||||
var/msg = input(usr,"Set the flavor text in your 'examine' verb. Can also be used for OOC notes about your character.","Flavor Text",html_decode(flavor_text)) as message|null
|
||||
|
||||
if(msg != null)
|
||||
msg = copytext(msg, 1, MAX_MESSAGE_LEN)
|
||||
msg = html_encode(msg)
|
||||
|
||||
flavor_text = msg
|
||||
|
||||
/mob/proc/warn_flavor_changed()
|
||||
if(flavor_text && flavor_text != "") // don't spam people that don't use it!
|
||||
src << "<h2 class='alert'>OOC Warning:</h2>"
|
||||
src << "<span class='alert'>Your flavor text is likely out of date! <a href='byond://?src=\ref[src];flavor_change=1'>Change</a></span>"
|
||||
|
||||
/mob/proc/print_flavor_text()
|
||||
if(flavor_text && flavor_text != "")
|
||||
var/msg = replacetext(flavor_text, "\n", " ")
|
||||
if(lentext(msg) <= 40)
|
||||
return "\blue [msg]"
|
||||
else
|
||||
return "\blue [copytext(msg, 1, 37)]... <a href='byond://?src=\ref[src];flavor_more=1'>More...</a>"
|
||||
|
||||
/mob/verb/cancel_camera()
|
||||
set name = "Cancel Camera View"
|
||||
@@ -571,7 +552,6 @@ proc/get_top_level_mob(var/mob/S)
|
||||
stat(null, "Next Map: [nextmap.friendlyname]")
|
||||
stat(null, "Server Time: [time2text(world.realtime, "YYYY-MM-DD hh:mm")]")
|
||||
if(SSshuttle.emergency)
|
||||
stat(null, "Current Shuttle: [SSshuttle.emergency.name]")
|
||||
var/ETA = SSshuttle.emergency.getModeStr()
|
||||
if(ETA)
|
||||
stat(null, "[ETA] [SSshuttle.emergency.getTimerStr()]")
|
||||
@@ -967,5 +947,4 @@ proc/get_top_level_mob(var/mob/S)
|
||||
switch(var_name)
|
||||
if ("attack_log")
|
||||
return debug_variable(var_name, attack_log, 0, src, FALSE)
|
||||
|
||||
. = ..()
|
||||
@@ -175,7 +175,8 @@
|
||||
|
||||
moving = 0
|
||||
if(mob && .)
|
||||
mob.throwing = 0
|
||||
if(mob.throwing)
|
||||
mob.throwing.finalize(FALSE)
|
||||
|
||||
for(var/obj/O in mob)
|
||||
O.on_mob_move(direct, src)
|
||||
@@ -424,7 +425,7 @@
|
||||
/client/verb/toggle_walk_run()
|
||||
set name = "toggle-walk-run"
|
||||
set hidden = TRUE
|
||||
set instant = TRUE
|
||||
set instant = TRUE
|
||||
if(mob)
|
||||
mob.toggle_move_intent()
|
||||
|
||||
|
||||
@@ -69,4 +69,41 @@
|
||||
|
||||
/mob/proc/emote_vr(var/act, var/type, var/message) //This would normally go in say.dm
|
||||
if(act == "me")
|
||||
return custom_emote_vr(type, message)
|
||||
return custom_emote_vr(type, message)
|
||||
|
||||
/mob/proc/update_flavor_text()
|
||||
set src in usr
|
||||
if(usr != src)
|
||||
usr << "No."
|
||||
var/msg = input(usr,"Set the flavor text in your 'examine' verb. Can also be used for OOC notes about your character.","Flavor Text",html_decode(flavor_text)) as message|null
|
||||
|
||||
if(msg != null)
|
||||
msg = copytext(msg, 1, MAX_MESSAGE_LEN)
|
||||
msg = html_encode(msg)
|
||||
|
||||
flavor_text = msg
|
||||
|
||||
/mob/proc/warn_flavor_changed()
|
||||
if(flavor_text && flavor_text != "") // don't spam people that don't use it!
|
||||
src << "<h2 class='alert'>OOC Warning:</h2>"
|
||||
src << "<span class='alert'>Your flavor text is likely out of date! <a href='byond://?src=\ref[src];flavor_change=1'>Change</a></span>"
|
||||
|
||||
/mob/proc/print_flavor_text()
|
||||
if(flavor_text && flavor_text != "")
|
||||
var/msg = replacetext(flavor_text, "\n", " ")
|
||||
if(lentext(msg) <= 40)
|
||||
return "\blue [msg]"
|
||||
else
|
||||
return "\blue [copytext(msg, 1, 37)]... <a href='byond://?src=\ref[src];flavor_more=1'>More...</a>"
|
||||
|
||||
/mob/proc/get_top_level_mob()
|
||||
if(istype(src.loc,/mob)&&src.loc!=src)
|
||||
var/mob/M=src.loc
|
||||
return M.get_top_level_mob()
|
||||
return src
|
||||
|
||||
proc/get_top_level_mob(var/mob/S)
|
||||
if(istype(S.loc,/mob)&&S.loc!=S)
|
||||
var/mob/M=S.loc
|
||||
return M.get_top_level_mob()
|
||||
return S
|
||||
Reference in New Issue
Block a user