mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-19 02:54:41 +01:00
TG: (Might very possibly be broken. Didn't port most of the stuff due to it having been rewritten. - Erthilo)
Adds BS12 dismemberment. Not all features of it are implemented yet, but it should be equal to our previous system. Adds greater changeling code, but doesn't change the genome count yet on it. Renames registered to registered_name on IDs because bs12 had it and it seemed like a good idea to do last night. For some reason. Adds an afterattack to mobs that can be used. (In fairness, lots of shit in attack_hand should be in there instead, like stungloves and stuff, to minimize duplicated code) Revision: r3537 Author: VivianFoxfoot
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
/mob/living/carbon/brain
|
||||
var
|
||||
obj/item/device/mmi/container = null
|
||||
obj/item/container = null
|
||||
timeofhostdeath = 0
|
||||
|
||||
New()
|
||||
@@ -31,9 +31,14 @@
|
||||
return 1
|
||||
return ..()
|
||||
|
||||
Login()
|
||||
if(!container)
|
||||
verbs += /mob/proc/ghost
|
||||
|
||||
Logout()
|
||||
verbs -= /mob/proc/ghost
|
||||
/mob/living/carbon/brain/Login()
|
||||
..()
|
||||
|
||||
if (!isturf(src.loc))
|
||||
src.client.eye = src.loc
|
||||
src.client.perspective = EYE_PERSPECTIVE
|
||||
if (!container || !istype(container, /obj/item/device/mmi))
|
||||
src.verbs += /mob/proc/ghost
|
||||
|
||||
return
|
||||
@@ -1,5 +1,5 @@
|
||||
/mob/living/carbon/brain/death(gibbed)
|
||||
if(!gibbed && container)//If not gibbed but in a container.
|
||||
if(!gibbed && container && istype(container, /obj/item/device/mmi))//If not gibbed but in a container.
|
||||
for(var/mob/O in viewers(container, null))
|
||||
O.show_message(text("\red <B>[]'s MMI flatlines!</B>", src), 1, "\red You hear something flatline.", 2)
|
||||
container.icon_state = "mmi_dead"
|
||||
|
||||
@@ -40,6 +40,8 @@
|
||||
|
||||
clamp_values()
|
||||
|
||||
|
||||
|
||||
proc
|
||||
|
||||
clamp_values()
|
||||
@@ -318,4 +320,5 @@
|
||||
if(bodytemperature > 409)
|
||||
for(var/datum/disease/D in viruses)
|
||||
D.cure()
|
||||
return
|
||||
return
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
/mob/living/carbon/brain/say(var/message)
|
||||
if(!container) return //No container, can't speak, bucko./N
|
||||
if(!(container && istype(container, /obj/item/device/mmi)))
|
||||
return //No MMI, can't speak, bucko./N
|
||||
else ..()
|
||||
@@ -193,7 +193,6 @@
|
||||
var/status = ""
|
||||
var/brutedamage = org.brute_dam
|
||||
var/burndamage = org.burn_dam
|
||||
|
||||
if(halloss > 0)
|
||||
if(prob(30))
|
||||
brutedamage += halloss
|
||||
@@ -215,6 +214,9 @@
|
||||
status += "blistered"
|
||||
else if(burndamage > 0)
|
||||
status += "numb"
|
||||
if(org.destroyed)
|
||||
status = "MISSING!"
|
||||
|
||||
if(status == "")
|
||||
status = "OK"
|
||||
src.show_message(text("\t []My [] is [].",status=="OK"?"\blue ":"\red ",org.getDisplayName(),status),1)
|
||||
|
||||
@@ -70,11 +70,17 @@
|
||||
|
||||
|
||||
/mob/living/carbon/human/New()
|
||||
|
||||
..()
|
||||
|
||||
|
||||
|
||||
var/datum/reagents/R = new/datum/reagents(1000)
|
||||
reagents = R
|
||||
R.my_atom = src
|
||||
|
||||
if(!dna) dna = new /datum/dna(null)
|
||||
if(!dna)
|
||||
dna = new /datum/dna(null)
|
||||
|
||||
new /datum/organ/external/chest(src)
|
||||
new /datum/organ/external/groin(src)
|
||||
@@ -123,19 +129,24 @@
|
||||
gender = MALE
|
||||
g = "m"
|
||||
|
||||
spawn (1)
|
||||
if(!stand_icon)
|
||||
stand_icon = new /icon('human.dmi', "body_[g]_s")
|
||||
if(!lying_icon)
|
||||
lying_icon = new /icon('human.dmi', "body_[g]_l")
|
||||
spawn(1)
|
||||
stand_icon = new /icon('human.dmi', "body_[g]_s")
|
||||
lying_icon = new /icon('human.dmi', "body_[g]_l")
|
||||
icon = stand_icon
|
||||
update_clothing()
|
||||
|
||||
src << "\blue Your icons have been generated!"
|
||||
|
||||
|
||||
spawn(10) // Failsafe for.. weirdness.
|
||||
update_clothing()
|
||||
update_body()
|
||||
|
||||
vessel = new/datum/reagents(600)
|
||||
vessel.my_atom = src
|
||||
vessel.add_reagent("blood",560)
|
||||
spawn(1) fixblood()
|
||||
spawn(1)
|
||||
fixblood()
|
||||
|
||||
..()
|
||||
/*var/known_languages = list()
|
||||
@@ -267,6 +278,7 @@
|
||||
var/hungry = (500 - nutrition)/5 // So overeat would be 100 and default level would be 80
|
||||
if (hungry >= 70) tally += hungry/50
|
||||
|
||||
|
||||
for(var/organ in list("l_leg","l_foot","r_leg","r_foot"))
|
||||
var/datum/organ/external/o = organs["[organ]"]
|
||||
if(o.broken)
|
||||
@@ -1484,7 +1496,6 @@
|
||||
del(face_standing)
|
||||
del(face_lying)
|
||||
return
|
||||
|
||||
if(!facial_hair_style || !hair_style) return//Seems people like to lose their icons, this should stop the runtimes for now
|
||||
del(face_standing)
|
||||
del(face_lying)
|
||||
|
||||
@@ -119,35 +119,36 @@
|
||||
if("lizard")
|
||||
attack_verb = "scratch"
|
||||
if("plant")
|
||||
attack_verb = "slash"
|
||||
attack_verb = "whip"
|
||||
else
|
||||
attack_verb = "punch"
|
||||
|
||||
if(M.type == /mob/living/carbon/human/tajaran)
|
||||
if(istajaran(M))
|
||||
attack_verb = "slash"
|
||||
|
||||
var/damage = rand(0, 5)
|
||||
if(!damage)
|
||||
if(M.mutantrace == "lizard")
|
||||
playsound(loc, 'slashmiss.ogg', 25, 1, -1)
|
||||
else if(M.type != /mob/living/carbon/human/tajaran)
|
||||
playsound(loc, 'punchmiss.ogg', 25, 1, -1)
|
||||
else if (M.type == /mob/living/carbon/human/tajaran)
|
||||
playsound(loc, 'slashmiss.ogg', 25, 1, -1)
|
||||
switch(attack_verb)
|
||||
if(("slash") || ("scratch"))
|
||||
playsound(loc, 'slashmiss.ogg', 25, 1, -1)
|
||||
else
|
||||
playsound(loc, 'punchmiss.ogg', 25, 1, -1)
|
||||
|
||||
visible_message("\red <B>[M] has attempted to [attack_verb] [src]!</B>")
|
||||
return 0
|
||||
|
||||
|
||||
var/datum/organ/external/affecting = get_organ(ran_zone(M.zone_sel.selecting))
|
||||
var/armor_block = run_armor_check(affecting, "melee")
|
||||
|
||||
if(M.mutations & HULK) damage += 5
|
||||
if(M.mutantrace == "lizard")
|
||||
damage += 10
|
||||
playsound(loc, 'slice.ogg', 25, 1, -1)
|
||||
else if(M.type != /mob/living/carbon/human/tajaran)
|
||||
playsound(loc, "punch", 25, 1, -1)
|
||||
else if (M.type == /mob/living/carbon/human/tajaran)
|
||||
damage += 10
|
||||
playsound(loc, 'slice.ogg', 25, 1, -1)
|
||||
|
||||
switch(attack_verb)
|
||||
if(("slash") || ("scratch"))
|
||||
damage += 10
|
||||
playsound(loc, 'slice.ogg', 25, 1, -1)
|
||||
else
|
||||
playsound(loc, "punch", 25, 1, -1)
|
||||
|
||||
visible_message("\red <B>[M] has [attack_verb]ed [src]!</B>")
|
||||
|
||||
@@ -157,11 +158,10 @@
|
||||
apply_effect(2, WEAKEN, armor_block)
|
||||
UpdateDamageIcon()
|
||||
|
||||
|
||||
if("disarm")
|
||||
M.attack_log += text("\[[time_stamp()]\] <font color='red'>Disarmed [src.name] ([src.ckey])</font>")
|
||||
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been disarmed by [M.name] ([M.ckey])</font>")
|
||||
|
||||
|
||||
log_admin("ATTACK: [src] ([src.ckey]) disarmed [M] ([M.ckey]).")
|
||||
log_attack("<font color='red'>[M.name] ([M.ckey]) disarmed [src.name] ([src.ckey])</font>")
|
||||
|
||||
@@ -212,4 +212,7 @@
|
||||
playsound(loc, 'punchmiss.ogg', 25, 1, -1)
|
||||
visible_message("\red <B>[M] attempted to disarm [src]!</B>")
|
||||
update_clothing()
|
||||
return
|
||||
|
||||
/mob/living/carbon/human/proc/afterattack(atom/target as mob|obj|turf|area, mob/living/user as mob|obj, inrange, params)
|
||||
return
|
||||
@@ -119,10 +119,9 @@ emp_act
|
||||
if(!I || !user) return 0
|
||||
|
||||
var/datum/organ/external/affecting = get_organ(ran_zone(user.zone_sel.selecting))
|
||||
|
||||
var/hit_area = affecting.display_name
|
||||
|
||||
|
||||
|
||||
if((user != src) && check_shields(I.force, "the [I.name]"))
|
||||
return 0
|
||||
|
||||
|
||||
@@ -1148,22 +1148,41 @@
|
||||
if (mutantrace == "lizard" || mutantrace == "metroid")
|
||||
see_in_dark = 3
|
||||
see_invisible = 1
|
||||
|
||||
else if (istajaran(src))
|
||||
see_in_dark = 8
|
||||
|
||||
else if (druggy) // If drugged~
|
||||
see_in_dark = 2
|
||||
//see_invisible regulated by drugs themselves.
|
||||
else
|
||||
see_in_dark = 2
|
||||
var/seer = 0
|
||||
for(var/obj/effect/rune/R in world)
|
||||
if(loc==R.loc && R.word1==wordsee && R.word2==wordhell && R.word3==wordjoin)
|
||||
seer = 1
|
||||
if(!seer)
|
||||
see_invisible = 0
|
||||
|
||||
else if(istype(head, /obj/item/clothing/head/helmet/welding))
|
||||
var/seer = 0
|
||||
for(var/obj/effect/rune/R in world)
|
||||
if(loc==R.loc && R.word1==wordsee && R.word2==wordhell && R.word3==wordjoin)
|
||||
seer = 1
|
||||
if(!seer)
|
||||
see_invisible = 0
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
else if(istype(head, /obj/item/clothing/head/helmet/welding)) // wat. This is never fucking called.
|
||||
if(!head:up && tinted_weldhelh)
|
||||
see_in_dark = 1
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* HUD shit goes here, as long as it doesn't modify src.sight flags */
|
||||
// The purpose of this is to stop xray and w/e from preventing you from using huds -- Love, Doohl
|
||||
if(istype(glasses, /obj/item/clothing/glasses/hud/health))
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
/mob/living/carbon/human/say(var/message)
|
||||
/* if(src.mutantrace == "lizard")
|
||||
if(copytext(message, 1, 2) != "*")
|
||||
message = dd_replaceText(message, "s", stutter("ss"))*///Just here for reference. -- Erthilo
|
||||
if(src.mutantrace == "metroid" && prob(5))
|
||||
if(copytext(message, 1, 2) != "*")
|
||||
if(copytext(message, 1, 2) == ";")
|
||||
|
||||
@@ -113,6 +113,7 @@
|
||||
var/canmove = 1.0
|
||||
var/eye_stat = null//Living, potentially Carbon
|
||||
var/lastpuke = 0
|
||||
var/unacidable = 0
|
||||
|
||||
var/name_archive //For admin things like possession
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
return 0
|
||||
|
||||
/proc/iscat(A)
|
||||
if(istype(A, /mob/living/simple_animal/cat))
|
||||
if(istype(A, /mob/living/simple_animal/cat/))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
@@ -115,12 +115,16 @@ proc/hasorgans(A)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
|
||||
|
||||
|
||||
/proc/hsl2rgb(h, s, l)
|
||||
return
|
||||
|
||||
|
||||
/proc/check_zone(zone)
|
||||
if(!zone) return "chest"
|
||||
if(!zone)
|
||||
return "chest"
|
||||
switch(zone)
|
||||
if("eyes")
|
||||
zone = "head"
|
||||
|
||||
@@ -91,7 +91,8 @@
|
||||
brute *= 0.66 //~2/3 damage for ROBOLIMBS
|
||||
burn *= 0.66 //~2/3 damage for ROBOLIMBS
|
||||
|
||||
if(owner && !robot) owner.pain(display_name, (brute+burn)*3, 1)
|
||||
if(owner && !robot)
|
||||
owner.pain(display_name, (brute+burn)*3, 1)
|
||||
if(sharp)
|
||||
var/nux = brute * rand(10,15)
|
||||
if(brute_dam >= max_damage)
|
||||
@@ -382,7 +383,7 @@
|
||||
destspawn = 1
|
||||
if(!robot)
|
||||
owner.visible_message("\red [owner.name]'s [display_name] flies off in an arc.",\
|
||||
"\red <b>Your [display_name] goes flying off!</b>",\
|
||||
"<span class='moderate'><b>Your [display_name] goes flying off!</b></span>",\
|
||||
"You hear a terrible sound of ripping tendons and flesh.")
|
||||
else
|
||||
owner.visible_message("\red [owner.name]'s [display_name] explodes violently!",\
|
||||
|
||||
@@ -84,6 +84,8 @@
|
||||
min_broken_damage = 15
|
||||
body_part = HAND_LEFT
|
||||
|
||||
|
||||
|
||||
obj/item/weapon/organ
|
||||
icon = 'human.dmi'
|
||||
|
||||
@@ -112,6 +114,12 @@ obj/item/weapon/organ/head
|
||||
var/mob/living/carbon/brain/brainmob
|
||||
var/brain_op_stage = 0
|
||||
|
||||
obj/item/weapon/organ/head/New()
|
||||
..()
|
||||
spawn(5)
|
||||
if(brainmob && brainmob.client)
|
||||
brainmob.client.screen.len = null //clear the hud
|
||||
|
||||
obj/item/weapon/organ/head/proc/transfer_identity(var/mob/living/carbon/human/H)//Same deal as the regular brain proc. Used for human-->head
|
||||
brainmob = new(src)
|
||||
brainmob.name = H.real_name
|
||||
@@ -119,6 +127,11 @@ obj/item/weapon/organ/head/proc/transfer_identity(var/mob/living/carbon/human/H)
|
||||
brainmob.dna = H.dna
|
||||
if(H.mind)
|
||||
H.mind.transfer_to(brainmob)
|
||||
brainmob.container = src
|
||||
if (brainmob.client)
|
||||
spawn(10)
|
||||
if(brainmob.client)
|
||||
verbs += /mob/proc/ghost
|
||||
|
||||
obj/item/weapon/organ/head/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(istype(W,/obj/item/weapon/scalpel))
|
||||
|
||||
Reference in New Issue
Block a user