Skip to content

Commit

Permalink
Merge pull request tgstation#18402 from optimumtact/flamingfunremoval
Browse files Browse the repository at this point in the history
Better logging and notification of setting on fire
  • Loading branch information
Jordie0608 authored Jun 11, 2016
2 parents 264aafb + f58b13d commit 0777916
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 12 deletions.
9 changes: 6 additions & 3 deletions code/game/objects/items/weapons/cigs_lighters.dm
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,9 @@ CIGARETTE PACKETS ARE IN FANCY.DM
/obj/item/weapon/match/attack(mob/living/carbon/M, mob/living/carbon/user)
if(!isliving(M))
return
M.IgniteMob()
if(M.IgniteMob())
message_admins("[key_name_admin(user)] set (key_name_admin(M)) on fire")
log_game("[key_name(user)] set [key_name(M)] on fire")
var/obj/item/clothing/mask/cigarette/cig = help_light_cig(M,user)
if(lit && cig && user.a_intent == "help")
if(cig.lit)
Expand Down Expand Up @@ -528,8 +530,9 @@ CIGARETTE PACKETS ARE IN FANCY.DM
return

/obj/item/weapon/lighter/attack(mob/living/carbon/M, mob/living/carbon/user)
if(lit)
M.IgniteMob()
if(lit && M.IgniteMob())
message_admins("[key_name_admin(user)] set (key_name_admin(M)) on fire")
log_game("[key_name(user)] set [key_name(M)] on fire")
var/obj/item/clothing/mask/cigarette/cig = help_light_cig(M,user)
if(lit && cig && user.a_intent == "help")
if(cig.lit)
Expand Down
4 changes: 3 additions & 1 deletion code/game/objects/items/weapons/tools.dm
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,9 @@

if(isliving(O))
var/mob/living/L = O
L.IgniteMob()
if(L.IgniteMob())
message_admins("[key_name_admin(user)] set (key_name_admin(L)) on fire")
log_game("[key_name(user)] set [key_name(L)] on fire")

/obj/item/weapon/weldingtool/attack_self(mob/user)
toggle(user)
Expand Down
6 changes: 4 additions & 2 deletions code/modules/hydroponics/grown/flowers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,9 @@
if(istype(M, /mob/living))
M << "<span class='danger'>You are lit on fire from the intense heat of the [name]!</span>"
M.adjust_fire_stacks(seed.potency / 20)
M.IgniteMob()
if(M.IgniteMob())
message_admins("[key_name_admin(user)] set (key_name_admin(M)) on fire")
log_game("[key_name(user)] set [key_name(M)] on fire")

/obj/item/weapon/grown/novaflower/afterattack(atom/A as mob|obj, mob/user,proximity)
if(!proximity) return
Expand All @@ -196,4 +198,4 @@
..()
if(!user.gloves)
user << "<span class='danger'>The [name] burns your bare hand!</span>"
user.adjustFireLoss(rand(1, 5))
user.adjustFireLoss(rand(1, 5))
7 changes: 5 additions & 2 deletions code/modules/mob/living/carbon/human/life.dm
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,11 @@
return thermal_protection

/mob/living/carbon/human/IgniteMob()
if(!dna || !dna.species.IgniteMob(src))
..()
//If have no DNA or can be Ignited, call parent handling to light user
//If firestacks are high enough
if(!dna || dna.species.CanIgniteMob(src))
return ..()
. = FALSE //No ignition

/mob/living/carbon/human/ExtinguishMob()
if(!dna || !dna.species.ExtinguishMob(src))
Expand Down
5 changes: 3 additions & 2 deletions code/modules/mob/living/carbon/human/species.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1510,9 +1510,10 @@
if((RESISTTEMP in specflags) || (NOFIRE in specflags))
return 1

/datum/species/proc/IgniteMob(mob/living/carbon/human/H)
/datum/species/proc/CanIgniteMob(mob/living/carbon/human/H)
if((RESISTTEMP in specflags) || (NOFIRE in specflags))
return 1
return FALSE
return TRUE

/datum/species/proc/ExtinguishMob(mob/living/carbon/human/H)
return
Expand Down
5 changes: 4 additions & 1 deletion code/modules/mob/living/living_defense.dm
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@
src.AddLuminosity(3)
throw_alert("fire", /obj/screen/alert/fire)
update_fire()
return TRUE
return FALSE

/mob/living/proc/ExtinguishMob()
if(on_fire)
Expand Down Expand Up @@ -161,7 +163,8 @@
if(on_fire) //Only spread fire stacks if we're on fire
fire_stacks /= 2
L.fire_stacks += fire_stacks
L.IgniteMob()
if(L.IgniteMob())
log_game("[key_name(src)] bumped into [key_name(L)] and set them on fire")

if(L_old_on_fire) //Only ignite us and gain their stacks if they were onfire before we bumped them
L.fire_stacks /= 2
Expand Down
2 changes: 1 addition & 1 deletion code/modules/mob/living/simple_animal/simple_animal.dm
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@
return

/mob/living/simple_animal/IgniteMob()
return
return FALSE

/mob/living/simple_animal/ExtinguishMob()
return
Expand Down

0 comments on commit 0777916

Please sign in to comment.