mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-01-06 07:32:15 +00:00
ghosts now have stat=DEAD so certain verbs don't break.
replaced canweaken and canstun variables with status_flags bitfield. Current flags are CANWEAKEN CANSTUN CANPARALYSE. Although you could add stuff like CANDAMAGE, CANBLIND, CANDEAFEN etc. to add additional flexibility to mob code and reduce on duplication. Added humans_need_surnames as a config option. If when spawning a human has only one name it will give them a random surname. I'd recommend leaving it on so that people can't name themselves "floor" "Unknown" etc. totally removed autolowercasing of names (except for first letter) due to people pestering me. inb4 everyone starts CRUISECONTROLLING. allowed a few characters like @ # etc for when the flag allow_numbers is set. So AIs can use those symbols (numbers and symbols cannot be used as the first character because of syntax. Added alium nests. They're basically beds that only aliums can use. They are made of sticky resin which aliums secure their prey too for sexytimes. Weed nodes are no longer dense. Tidied up some alium verbs so that they are more structured. This will allow me to add Alt-Click neurotoxin shooting for queens and sentinels Queens can secrete resin now to build nests/walls/membranes (doors to come!) Drones that evolve into queens when there is already a live Queen will become princesses instead so the hive can tell them how stupid they are for splitting from the will of the hive. It also gives them a number so they can be differentiated between. Credits to 39kk9t for fixing larva/death.dm, hissing which I forgot to do and some of the alium verbs. You're awesome <3 git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3983 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -19,4 +19,13 @@
|
||||
client.images += activeIndicator
|
||||
|
||||
/mob/living/carbon/alien/IsAdvancedToolUser()
|
||||
return has_fine_manipulation
|
||||
return has_fine_manipulation
|
||||
|
||||
|
||||
/mob/living/carbon/alien/Stun(amount)
|
||||
if(status_flags & CANSTUN)
|
||||
stunned = max(max(stunned,amount),0) //can't go below 0, getting a low amount of stun doesn't lower your current stun
|
||||
else
|
||||
// add some movement delay
|
||||
move_delay_add = min(move_delay_add + round(amount / 2), 10) // a maximum delay of 10
|
||||
return
|
||||
@@ -82,43 +82,23 @@ I kind of like the right click only--the window version can get a little confusi
|
||||
var/obj/effect/alien/acid/A = new(src.loc)
|
||||
A.target = src
|
||||
for(var/mob/M in viewers(src, null))
|
||||
M.show_message(text("\green <B>[user] vomits globs of vile stuff all over [src]!</B>"), 1)
|
||||
M.show_message(text("\green <B>[user] vomits globs of vile stuff all over [src]. It begins to sizzle and melt under the bubbling mess of acid!</B>"), 1)
|
||||
A.tick()
|
||||
|
||||
/mob/living/carbon/alien/humanoid/proc/corrode_target() //Aliens only see items on the list of objects that they can actually spit on./N
|
||||
set name = "Spit Corrosive Acid (200)"
|
||||
/mob/living/carbon/alien/humanoid/proc/corrosive_acid(obj/O as obj in oview(1)) //If they right click to corrode, an error will flash if its an invalid target./N
|
||||
set name = "Corrossive Acid (200)"
|
||||
set desc = "Drench an object in acid, destroying it over time."
|
||||
set category = "Alien"
|
||||
|
||||
if(powerc(200))//Check 1.
|
||||
var/list/xeno_target
|
||||
xeno_target = list("Abort Command")
|
||||
for(var/obj/O in view(1))
|
||||
if(!O.unacidable)
|
||||
xeno_target.Add(O)
|
||||
var/obj/A
|
||||
A = input("Corrode which target?", "Targets", A) in xeno_target
|
||||
if(!A == "Abort Command")
|
||||
if(powerc(200))//Check 2.
|
||||
if(A in view(1))//Check 3.
|
||||
adjustToxLoss(-200)
|
||||
A.acid(src)
|
||||
else
|
||||
src << "\green Target is too far away."
|
||||
return
|
||||
|
||||
/mob/living/carbon/alien/humanoid/verb/corrode(obj/O as anything in oview(1)) //If they right click to corrode, an error will flash if its an invalid target./N
|
||||
set name = "Corrode with Acid (200)"
|
||||
set desc = "Drench an object in acid, destroying it over time."
|
||||
set category = "Alien"
|
||||
|
||||
if(istype(O, /obj))
|
||||
if(powerc(200))
|
||||
if(!O.unacidable)
|
||||
if(powerc(200))
|
||||
if(O in oview(1))
|
||||
if(O.unacidable) //So the aliens don't destroy energy fields/singularies/other aliens/etc with their acid.
|
||||
src << "\green You cannot dissolve this object."
|
||||
else
|
||||
adjustToxLoss(-200)
|
||||
O.acid()
|
||||
else//So the aliens don't destroy energy fields/singularies/other aliens/etc with their acid.
|
||||
src << "\green You cannot destroy this object."
|
||||
O.acid(src)
|
||||
else
|
||||
src << "\green Target is too far away."
|
||||
return
|
||||
|
||||
/mob/living/carbon/alien/humanoid/verb/ventcrawl() // -- TLE
|
||||
@@ -194,4 +174,63 @@ I kind of like the right click only--the window version can get a little confusi
|
||||
src << "\green This vent is not connected to anything."
|
||||
else
|
||||
src << "\green You must be standing on or beside an open air vent to enter it."
|
||||
return
|
||||
return
|
||||
|
||||
/mob/living/carbon/alien/humanoid/proc/neurotoxin(mob/target as mob in oview())
|
||||
set name = "Spit Neurotoxin (50)"
|
||||
set desc = "Spits neurotoxin at someone, paralyzing them for a short time."
|
||||
set category = "Alien"
|
||||
|
||||
if(powerc(50))
|
||||
if(isalien(target))
|
||||
src << "\green Your allies are not a valid target."
|
||||
return
|
||||
adjustToxLoss(-50)
|
||||
src << "\green You spit neurotoxin at [target]."
|
||||
for(var/mob/O in oviewers())
|
||||
if ((O.client && !( O.blinded )))
|
||||
O << "\red [src] spits neurotoxin at [target]!"
|
||||
//I'm not motivated enough to revise this. Prjectile code in general needs update.
|
||||
var/turf/T = loc
|
||||
var/turf/U = (istype(target, /atom/movable) ? target.loc : target)
|
||||
|
||||
if(!U || !T)
|
||||
return
|
||||
while(U && !istype(U,/turf))
|
||||
U = U.loc
|
||||
if(!istype(T, /turf))
|
||||
return
|
||||
if (U == T)
|
||||
usr.bullet_act(src, get_organ_target())
|
||||
return
|
||||
if(!istype(U, /turf))
|
||||
return
|
||||
|
||||
var/obj/item/projectile/energy/dart/A = new /obj/item/projectile/energy/dart(usr.loc)
|
||||
|
||||
A.current = U
|
||||
A.yo = U.y - T.y
|
||||
A.xo = U.x - T.x
|
||||
A.process()
|
||||
return
|
||||
|
||||
/mob/living/carbon/alien/humanoid/proc/resin() // -- TLE
|
||||
set name = "Secrete Resin (100)"
|
||||
set desc = "Secrete tough malleable resin."
|
||||
set category = "Alien"
|
||||
|
||||
if(powerc(100))
|
||||
var/choice = input("Choose what you wish to shape.","Resin building") as null|anything in list("resin wall","resin membrane","resin nest") //would do it through typesof but then the player choice would have the type path and we don't want the internal workings to be exposed ICly - Urist
|
||||
if(!choice || !powerc(100)) return
|
||||
adjustToxLoss(-100)
|
||||
src << "\green You shape a [choice]."
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message(text("\red <B>[src] vomits up a thick purple substance and begins to shape it!</B>"), 1)
|
||||
switch(choice)
|
||||
if("resin wall")
|
||||
new /obj/effect/alien/resin/wall(loc)
|
||||
if("resin membrane")
|
||||
new /obj/effect/alien/resin/membrane(loc)
|
||||
if("resin nest")
|
||||
new /obj/structure/stool/bed/nest(loc)
|
||||
return
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
if(src.name == "alien drone")
|
||||
src.name = text("alien drone ([rand(1, 1000)])")
|
||||
src.real_name = src.name
|
||||
src.verbs += /mob/living/carbon/alien/humanoid/proc/corrode_target
|
||||
src.verbs -= /mob/living/carbon/alien/humanoid/verb/ActivateHuggers
|
||||
verbs.Add(/mob/living/carbon/alien/humanoid/proc/resin,/mob/living/carbon/alien/humanoid/proc/corrosive_acid)
|
||||
verbs -= /mob/living/carbon/alien/humanoid/verb/ActivateHuggers //<-- pointless
|
||||
//Drones use the same base as generic humanoids.
|
||||
//Drone verbs
|
||||
|
||||
@@ -25,22 +25,4 @@
|
||||
new_xeno.mind_initialize(src, "Queen")
|
||||
new_xeno.key = key
|
||||
del(src)
|
||||
return
|
||||
|
||||
/mob/living/carbon/alien/humanoid/drone/verb/resinwall() // -- TLE
|
||||
set name = "Shape Resin (100)"
|
||||
set desc = "Produce a wall of resin that blocks entry and line of sight"
|
||||
set category = "Alien"
|
||||
|
||||
if(powerc(100))
|
||||
adjustToxLoss(-100)
|
||||
var/choice = input("Choose what you wish to shape.","Resin building") as anything in list("resin wall","resin membrane") //would do it through typesof but then the player choice would have the type path and we don't want the internal workings to be exposed ICly - Urist
|
||||
src << "\green You shape a [choice]."
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message(text("\red <B>[src] vomits up a thick purple substance and begins to shape it!</B>"), 1)
|
||||
switch(choice)
|
||||
if("resin wall")
|
||||
new /obj/effect/alien/resin/wall(loc)
|
||||
if("resin membrane")
|
||||
new /obj/effect/alien/resin/membrane(loc)
|
||||
return
|
||||
@@ -5,7 +5,6 @@
|
||||
if(name == "alien hunter")
|
||||
name = text("alien hunter ([rand(1, 1000)])")
|
||||
real_name = name
|
||||
verbs -= /mob/living/carbon/alien/humanoid/verb/corrode
|
||||
|
||||
/mob/living/carbon/alien/humanoid/hunter
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
if(name == "alien sentinel")
|
||||
name = text("alien sentinel ([rand(1, 1000)])")
|
||||
real_name = name
|
||||
verbs += /mob/living/carbon/alien/humanoid/proc/corrode_target
|
||||
verbs.Add(/mob/living/carbon/alien/humanoid/proc/corrosive_acid,/mob/living/carbon/alien/humanoid/proc/neurotoxin)
|
||||
|
||||
/mob/living/carbon/alien/humanoid/sentinel
|
||||
|
||||
@@ -50,43 +50,3 @@
|
||||
else
|
||||
adjustBruteLoss(-10)
|
||||
adjustFireLoss(-10)
|
||||
|
||||
//Sentinel verbs
|
||||
|
||||
/mob/living/carbon/alien/humanoid/sentinel/verb/spit(mob/target as mob in oview())
|
||||
set name = "Spit Neurotoxin (50)"
|
||||
set desc = "Spits neurotoxin at someone, paralyzing them for a short time."
|
||||
set category = "Alien"
|
||||
|
||||
if(powerc(50))
|
||||
if(isalien(target))
|
||||
src << "\green Your allies are not a valid target."
|
||||
return
|
||||
adjustToxLoss(-50)
|
||||
src << "\green You spit neurotoxin at [target]."
|
||||
for(var/mob/O in oviewers())
|
||||
if ((O.client && !( O.blinded )))
|
||||
O << "\red [src] spits neurotoxin at [target]!"
|
||||
//I'm not motivated enough to revise this. Prjectile code in general needs update.
|
||||
var/turf/T = loc
|
||||
var/turf/U = (istype(target, /atom/movable) ? target.loc : target)
|
||||
|
||||
if(!U || !T)
|
||||
return
|
||||
while(U && !istype(U,/turf))
|
||||
U = U.loc
|
||||
if(!istype(T, /turf))
|
||||
return
|
||||
if (U == T)
|
||||
usr.bullet_act(src, get_organ_target())
|
||||
return
|
||||
if(!istype(U, /turf))
|
||||
return
|
||||
|
||||
var/obj/item/projectile/energy/dart/A = new /obj/item/projectile/energy/dart(usr.loc)
|
||||
|
||||
A.current = U
|
||||
A.yo = U.y - T.y
|
||||
A.xo = U.x - T.x
|
||||
A.process()
|
||||
return
|
||||
@@ -33,6 +33,10 @@
|
||||
if (!muzzled)
|
||||
message = "<B>The [src.name]</B> roars."
|
||||
m_type = 2
|
||||
if("hiss")
|
||||
if(!muzzled)
|
||||
message = "<B>The [src.name]</B> hisses."
|
||||
m_type = 2
|
||||
if("tail")
|
||||
message = "<B>The [src.name]</B> waves its tail."
|
||||
m_type = 1
|
||||
|
||||
@@ -2,13 +2,16 @@
|
||||
var/datum/reagents/R = new/datum/reagents(100)
|
||||
reagents = R
|
||||
R.my_atom = src
|
||||
//there should only be one queen
|
||||
// if(src.name == "alien")
|
||||
// src.name = text("alien ([rand(1, 1000)])")
|
||||
src.real_name = src.name
|
||||
src.verbs += /mob/living/carbon/alien/humanoid/proc/corrode_target
|
||||
src.verbs += /mob/living/carbon/alien/humanoid/sentinel/verb/spit
|
||||
src.verbs -= /mob/living/carbon/alien/humanoid/verb/ventcrawl
|
||||
|
||||
//there should only be one queen
|
||||
for(var/mob/living/carbon/alien/humanoid/queen/Q in world)
|
||||
if(Q.stat != DEAD)
|
||||
name = "alien princess ([rand(1, 1000)])" //if this is too cutesy feel free to change it/remove it.
|
||||
break
|
||||
|
||||
real_name = src.name
|
||||
verbs.Add(/mob/living/carbon/alien/humanoid/proc/corrosive_acid,/mob/living/carbon/alien/humanoid/proc/neurotoxin,/mob/living/carbon/alien/humanoid/proc/resin)
|
||||
verbs -= /mob/living/carbon/alien/humanoid/verb/ventcrawl
|
||||
|
||||
|
||||
/mob/living/carbon/alien/humanoid/queen
|
||||
@@ -59,7 +62,7 @@
|
||||
/mob/living/carbon/alien/humanoid/queen/verb/lay_egg()
|
||||
|
||||
set name = "Lay Egg (200)"
|
||||
set desc = "Plants an egg"
|
||||
set desc = "Lay an egg to produce huggers to impregnate prey with."
|
||||
set category = "Alien"
|
||||
|
||||
if(locate(/obj/effect/alien/egg) in get_turf(src))
|
||||
|
||||
@@ -4,12 +4,7 @@
|
||||
if(src.healths)
|
||||
src.healths.icon_state = "health6"
|
||||
|
||||
/*
|
||||
if(istype(src,/mob/living/carbon/alien/larva/metroid))
|
||||
src.icon_state = "metroid_dead"
|
||||
*/
|
||||
else
|
||||
src.icon_state = "larva_l"
|
||||
src.icon_state = "larva_l"
|
||||
src.stat = 2
|
||||
|
||||
if (!gibbed)
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
if(IRRADIATE)
|
||||
radiation += max((((effect - (effect*(getarmor(null, "rad")/100))))/(blocked+1)),0)//Rads auto check armor
|
||||
if(STUTTER)
|
||||
if(canstun) // stun is usually associated with stutter
|
||||
if(status_flags & CANSTUN) // stun is usually associated with stutter
|
||||
stuttering = max(stuttering,(effect/(blocked+1)))
|
||||
if(EYE_BLUR)
|
||||
eye_blurry = max(eye_blurry,(effect/(blocked+1)))
|
||||
|
||||
@@ -28,8 +28,7 @@
|
||||
nopush = 1
|
||||
a_intent = "harm"
|
||||
stop_automated_movement = 1
|
||||
canstun = 0
|
||||
canweaken = 0
|
||||
status_flags = CANPARALYSE
|
||||
var/energy = 0
|
||||
var/max_energy = 1000
|
||||
|
||||
|
||||
@@ -31,8 +31,7 @@
|
||||
nopush = 1
|
||||
a_intent = "harm"
|
||||
stop_automated_movement = 1
|
||||
canstun = 0
|
||||
canweaken = 0
|
||||
status_flags = CANPARALYSE
|
||||
|
||||
|
||||
Life()
|
||||
@@ -168,8 +167,7 @@
|
||||
speed = -1
|
||||
a_intent = "harm"
|
||||
stop_automated_movement = 1
|
||||
canstun = 0
|
||||
canweaken = 0
|
||||
status_flags = CANPARALYSE
|
||||
see_in_dark = 7
|
||||
|
||||
Life()
|
||||
@@ -301,8 +299,7 @@
|
||||
nopush = 1
|
||||
a_intent = "harm"
|
||||
stop_automated_movement = 1
|
||||
canstun = 0
|
||||
canweaken = 0
|
||||
status_flags = CANPARALYSE
|
||||
|
||||
Life()
|
||||
..()
|
||||
|
||||
@@ -737,52 +737,51 @@ note dizziness decrements automatically in the mob's Life() proc.
|
||||
|
||||
|
||||
/mob/proc/Stun(amount)
|
||||
if(canstun)
|
||||
if(status_flags & CANSTUN)
|
||||
stunned = max(max(stunned,amount),0) //can't go below 0, getting a low amount of stun doesn't lower your current stun
|
||||
else
|
||||
if(istype(src, /mob/living/carbon/alien)) // add some movement delay
|
||||
var/mob/living/carbon/alien/Alien = src
|
||||
Alien.move_delay_add = min(Alien.move_delay_add + round(amount / 2), 10) // a maximum delay of 10
|
||||
return
|
||||
|
||||
/mob/proc/SetStunned(amount) //if you REALLY need to set stun to a set amount without the whole "can't go below current stunned"
|
||||
if(canstun)
|
||||
if(status_flags & CANSTUN)
|
||||
stunned = max(amount,0)
|
||||
return
|
||||
|
||||
/mob/proc/AdjustStunned(amount)
|
||||
if(canstun)
|
||||
if(status_flags & CANSTUN)
|
||||
stunned = max(stunned + amount,0)
|
||||
return
|
||||
|
||||
/mob/proc/Weaken(amount)
|
||||
if(canweaken)
|
||||
if(status_flags & CANWEAKEN)
|
||||
weakened = max(max(weakened,amount),0)
|
||||
update_canmove() //updates lying, canmove and icons
|
||||
return
|
||||
|
||||
/mob/proc/SetWeakened(amount)
|
||||
if(canweaken)
|
||||
if(status_flags & CANWEAKEN)
|
||||
weakened = max(amount,0)
|
||||
update_canmove() //updates lying, canmove and icons
|
||||
return
|
||||
|
||||
/mob/proc/AdjustWeakened(amount)
|
||||
if(canweaken)
|
||||
if(status_flags & CANWEAKEN)
|
||||
weakened = max(weakened + amount,0)
|
||||
update_canmove() //updates lying, canmove and icons
|
||||
return
|
||||
|
||||
/mob/proc/Paralyse(amount)
|
||||
paralysis = max(max(paralysis,amount),0)
|
||||
if(status_flags & CANPARALYSE)
|
||||
paralysis = max(max(paralysis,amount),0)
|
||||
return
|
||||
|
||||
/mob/proc/SetParalysis(amount)
|
||||
paralysis = max(amount,0)
|
||||
if(status_flags & CANPARALYSE)
|
||||
paralysis = max(amount,0)
|
||||
return
|
||||
|
||||
/mob/proc/AdjustParalysis(amount)
|
||||
paralysis = max(paralysis + amount,0)
|
||||
if(status_flags & CANPARALYSE)
|
||||
paralysis = max(paralysis + amount,0)
|
||||
return
|
||||
|
||||
/mob/proc/Sleeping(amount)
|
||||
|
||||
@@ -198,8 +198,7 @@
|
||||
|
||||
var/UI = 'screen1_Midnight.dmi' // For changing the UI from preferences
|
||||
|
||||
var/canstun = 1 // determines if this mob can be stunned by things
|
||||
var/canweaken = 1 // determines if this mob can be weakened/knocked down by things
|
||||
var/status_flags = 255 //bitflags defining which status effects can be inflicted (replaces canweaken, canstun, etc)
|
||||
var/nopush = 0 //Can they be shoved?
|
||||
|
||||
var/area/lastarea = null
|
||||
|
||||
@@ -445,7 +445,7 @@ datum/preferences
|
||||
|
||||
switch(link_tags["real_name"])
|
||||
if("input")
|
||||
new_name = reject_bad_name( input(user, "Please select a name:", "Character Generation") as text|null, 2 )
|
||||
new_name = reject_bad_name( input(user, "Please select a name:", "Character Generation") as text|null )
|
||||
|
||||
if("random")
|
||||
randomize_name()
|
||||
@@ -453,7 +453,7 @@ datum/preferences
|
||||
if(new_name)
|
||||
real_name = new_name
|
||||
else
|
||||
user << "<font color='red'>Invalid name. Your name should be at least 4 letters and two words but it should be under [MAX_NAME_LEN] characters long. It may only contain the characters A-Z, a-z, -, ' and .</font>"
|
||||
user << "<font color='red'>Invalid name. Your name should be at least 2 and at most [MAX_NAME_LEN] characters long. It may only contain the characters A-Z, a-z, -, ' and .</font>"
|
||||
|
||||
if(link_tags["age"])
|
||||
switch(link_tags["age"])
|
||||
@@ -707,6 +707,15 @@ datum/preferences
|
||||
proc/copy_to(mob/living/carbon/human/character, safety = 0)
|
||||
if(be_random_name)
|
||||
randomize_name()
|
||||
|
||||
if(config.humans_need_surnames)
|
||||
var/firstspace = findtext(real_name, " ")
|
||||
var/name_length = length(real_name)
|
||||
if(!firstspace) //we need a surname
|
||||
real_name += " [pick(last_names)]"
|
||||
else if(firstspace == name_length)
|
||||
real_name += "[pick(last_names)]"
|
||||
|
||||
character.real_name = real_name
|
||||
character.original_name = real_name //Original name is only used in ghost chat! It is not to be edited by anything!
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#define SAVEFILE_VERSION_MIN 5
|
||||
#define SAVEFILE_VERSION_MAX 6
|
||||
#define SAVEFILE_VERSION_MIN 7
|
||||
#define SAVEFILE_VERSION_MAX 7
|
||||
|
||||
datum/preferences/proc/savefile_path(mob/user)
|
||||
return "data/player_saves/[copytext(user.ckey, 1, 2)]/[user.ckey]/preferences.sav"
|
||||
|
||||
Reference in New Issue
Block a user