mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 19:47:22 +01:00
Re-add harmbatonning. Adds forcesay: if you're typing when you get hit by a stun weapon, you say a garbled version of what you were typing (from /tg/).
This commit is contained in:
@@ -264,7 +264,8 @@ emp_act
|
||||
|
||||
if(armor >= 2) return 0
|
||||
if(!I.force) return 0
|
||||
|
||||
var/Iforce = I.force //to avoid runtimes on the forcesay checks at the bottom. Some items might delete themselves if you drop them. (stunning yourself, ninja swords)
|
||||
|
||||
apply_damage(I.force, I.damtype, affecting, armor, sharp=weapon_sharp, edge=weapon_edge, used_weapon=I)
|
||||
|
||||
var/bloody = 0
|
||||
@@ -310,6 +311,10 @@ emp_act
|
||||
if(bloody)
|
||||
bloody_body(src)
|
||||
|
||||
|
||||
if(Iforce > 10 || Iforce >= 5 && prob(33))
|
||||
forcesay(hit_appends) //forcesay checks stat already
|
||||
|
||||
//Melee weapon embedded object code.
|
||||
if (I.damtype == BRUTE && !I.is_robot_module())
|
||||
var/damage = I.force
|
||||
|
||||
@@ -77,6 +77,39 @@
|
||||
|
||||
..(message)
|
||||
|
||||
/mob/living/carbon/human/proc/forcesay(list/append)
|
||||
if(stat == CONSCIOUS)
|
||||
if(client)
|
||||
var/virgin = 1 //has the text been modified yet?
|
||||
var/temp = winget(client, "input", "text")
|
||||
if(findtextEx(temp, "Say \"", 1, 7) && length(temp) > 5) //case sensitive means
|
||||
|
||||
temp = replacetext(temp, ";", "") //general radio
|
||||
|
||||
if(findtext(trim_left(temp), ":", 6, 7)) //dept radio
|
||||
temp = copytext(trim_left(temp), 8)
|
||||
virgin = 0
|
||||
|
||||
if(virgin)
|
||||
temp = copytext(trim_left(temp), 6) //normal speech
|
||||
virgin = 0
|
||||
|
||||
while(findtext(trim_left(temp), ":", 1, 2)) //dept radio again (necessary)
|
||||
temp = copytext(trim_left(temp), 3)
|
||||
|
||||
if(findtext(temp, "*", 1, 2)) //emotes
|
||||
return
|
||||
world << "Text after stuff is [temp]"
|
||||
temp = copytext(trim_left(temp), 1, rand(5,8))
|
||||
world << "Text after trimming is [temp]"
|
||||
|
||||
var/trimmed = trim_left(temp)
|
||||
if(length(trimmed))
|
||||
if(append)
|
||||
temp += pick(append)
|
||||
|
||||
say(temp)
|
||||
winset(client, "input", "text=[null]")
|
||||
|
||||
/mob/living/carbon/human/say_understands(var/other,var/datum/language/speaking = null)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user