Merge with BEF

This commit is contained in:
VitrescentTortoise
2013-05-26 19:23:27 -07:00
25 changed files with 11239 additions and 11105 deletions
+1 -1
View File
@@ -331,7 +331,7 @@
if(!M) return
var/num
var/newdna
num = rand(1,STRUCDNASIZE-1)
num = rand(1,UNIDNASIZE)
M.dna.check_integrity()
newdna = setblock(M.dna.uni_identity,num,add_zero2(num2hex(rand(1,4095),1),3),3)
M.dna.uni_identity = newdna
+5 -5
View File
@@ -4,8 +4,8 @@
var/title = "NOPE"
//Job access. The use of minimal_access or access is determined by a config setting: config.jobs_have_minimal_access
var/minimal_access = list() //Useful for servers which prefer to only have access given to the places a job absolutely needs (Larger server population)
var/access = list() //Useful for servers which either have fewer players, so each person needs to fill more than one role, or servers which like to give more access, so players can't hide forever in their super secure departments (I'm looking at you, chemistry!)
var/list/minimal_access = list() //Useful for servers which prefer to only have access given to the places a job absolutely needs (Larger server population)
var/list/access = list() //Useful for servers which either have fewer players, so each person needs to fill more than one role, or servers which like to give more access, so players can't hide forever in their super secure departments (I'm looking at you, chemistry!)
//Bitflags for the job
var/flag = 0
@@ -46,12 +46,12 @@
/datum/job/proc/get_access()
if(!config) //Needed for robots.
return src.minimal_access
return src.minimal_access.Copy()
if(config.jobs_have_minimal_access)
return src.minimal_access
return src.minimal_access.Copy()
else
return src.access
return src.access.Copy()
//If the configuration option is set to require players to be logged as old enough to play certain jobs, then this proc checks that they are, otherwise it just returns 1
/datum/job/proc/player_old_enough(client/C)
+1
View File
@@ -197,6 +197,7 @@
if(H.dna)
H.dna.mutantrace = mrace
H.update_mutantrace()
H.update_mutantrace_languages()
H.suiciding = 0
src.attempting = 0
return 1
+24 -1
View File
@@ -104,4 +104,27 @@ obj/machinery/recharger/update_icon() //we have an update_icon() in addition to
obj/machinery/recharger/wallcharger
name = "wall recharger"
icon = 'icons/obj/stationobjs.dmi'
icon_state = "wrecharger0"
icon_state = "wrecharger0"
obj/machinery/recharger/wallcharger/process()
if(stat & (NOPOWER|BROKEN) || !anchored)
return
if(charging)
if(istype(charging, /obj/item/weapon/gun/energy))
var/obj/item/weapon/gun/energy/E = charging
if(E.power_supply.charge < E.power_supply.maxcharge)
E.power_supply.give(100)
icon_state = "wrecharger1"
use_power(250)
else
icon_state = "wrecharger2"
return
if(istype(charging, /obj/item/weapon/melee/baton))
var/obj/item/weapon/melee/baton/B = charging
if(B.charges < initial(B.charges))
B.charges++
icon_state = "wrecharger1"
use_power(150)
else
icon_state = "wrecharger2"
@@ -120,8 +120,8 @@
/obj/item/weapon/melee/telebaton/attack_self(mob/user as mob)
on = !on
if(on)
user.visible_message("\red You extend the baton.",\
"\red With a flick of their wrist, [user] extends their telescopic baton.",\
user.visible_message("\red With a flick of their wrist, [user] extends their telescopic baton.",\
"\red You extend the baton.",\
"You hear an ominous click.")
icon_state = "telebaton_1"
item_state = "telebaton_1"
@@ -129,8 +129,8 @@
force = 15//quite robust
attack_verb = list("smacked", "struck", "slapped")
else
user.visible_message("\blue You collapse the baton.",\
"\blue [user] collapses their telescopic baton.",\
user.visible_message("\blue [user] collapses their telescopic baton.",\
"\blue You collapse the baton.",\
"You hear a click.")
icon_state = "telebaton_0"
item_state = "telebaton_0"
+2 -1
View File
@@ -90,7 +90,8 @@ var/list/event_last_fired = list()
for(var/event_type in event_last_fired) if(possibleEvents[event_type])
var/time_passed = world.time - event_last_fired[event_type]
var/weight_modifier = max(0, 60 * 60 - time_passed / 100)
var/full_recharge_after = 60 * 60 * 10 * 3 // 3 hours
var/weight_modifier = max(0, (full_recharge_after - time_passed) / 300)
possibleEvents[event_type] = max(possibleEvents[event_type] - weight_modifier, 0)
+4 -10
View File
@@ -54,8 +54,8 @@
var/datum/organ/external/temp = M:organs_by_name["r_hand"]
if (M.hand)
temp = M:organs_by_name["l_hand"]
if(temp && temp.status & ORGAN_DESTROYED)
M << "\red Yo- wait a minute."
if(temp && !temp.is_usable())
M << "\red You can't use your [temp.display_name]"
return
for(var/datum/disease/D in viruses)
@@ -76,14 +76,6 @@
/mob/living/carbon/attack_paw(mob/M as mob)
if(!istype(M, /mob/living/carbon)) return
if (hasorgans(M))
var/datum/organ/external/temp = M:organs_by_name["r_hand"]
if (M.hand)
temp = M:organs_by_name["l_hand"]
if(temp && temp.status & ORGAN_DESTROYED)
M << "\red Yo- wait a minute."
return
for(var/datum/disease/D in viruses)
if(D.spread_by_touch())
@@ -187,6 +179,8 @@
status += "numb"
if(org.status & ORGAN_DESTROYED)
status = "MISSING!"
if(org.status & ORGAN_MUTATED)
status = "weirdly shapen."
if(status == "")
status = "OK"
src.show_message(text("\t []My [] is [].",status=="OK"?"\blue ":"\red ",org.display_name,status),1)
@@ -48,9 +48,6 @@
/mob/living/carbon/human/death(gibbed)
if(halloss > 0 && !gibbed)
halloss = 0
return
if(stat == DEAD) return
if(healths) healths.icon_state = "health5"
stat = DEAD
@@ -823,6 +823,15 @@
else if(src.dna.mutantrace == "tajaran")
return "Tajaran"
/mob/living/carbon/proc/update_mutantrace_languages()
if(src.dna)
if(src.dna.mutantrace == "lizard")
src.soghun_talk_understand = 1
else if(src.dna.mutantrace == "skrell")
src.skrell_talk_understand = 1
else if(src.dna.mutantrace == "tajaran")
src.tajaran_talk_understand = 1
/mob/living/carbon/human/proc/play_xylophone()
if(!src.xylophone)
visible_message("\red [src] begins playing his ribcage like a xylophone. It's quite spooky.","\blue You begin to play a spooky refrain on your ribcage.","\red You hear a spooky xylophone melody.")
@@ -3,6 +3,13 @@
M << "No attacking people at spawn, you jackass."
return
var/datum/organ/external/temp = M:organs_by_name["r_hand"]
if (M.hand)
temp = M:organs_by_name["l_hand"]
if(temp && !temp.is_usable())
M << "\red You can't use your [temp.display_name]."
return
..()
if((M != src) && check_shields(0, M.name))
@@ -63,6 +63,35 @@
if(HULK in mutations) return
..()
/mob/living/carbon/human/adjustCloneLoss(var/amount)
..()
var/heal_prob = max(0, 80 - getCloneLoss())
var/mut_prob = min(80, getCloneLoss()+10)
if (amount > 0)
if (prob(mut_prob))
var/list/datum/organ/external/candidates = list()
for (var/datum/organ/external/O in organs)
if(!(O.status & ORGAN_MUTATED))
candidates |= O
if (candidates.len)
var/datum/organ/external/O = pick(candidates)
O.mutate()
src << "<span class = 'notice'>Something is not right with your [O.display_name]...</span>"
return
else
if (prob(heal_prob))
for (var/datum/organ/external/O in organs)
if (O.status & ORGAN_MUTATED)
O.unmutate()
src << "<span class = 'notice'>Your [O.display_name] is shaped normally again.</span>"
return
if (getCloneLoss() < 1)
for (var/datum/organ/external/O in organs)
world << "[O.display_name]!"
if (O.status & ORGAN_MUTATED)
O.unmutate()
src << "<span class = 'notice'>Your [O.display_name] is shaped normally again.</span>"
////////////////////////////////////////////
//Returns a list of damaged organs
@@ -126,7 +126,8 @@ Please contact me on #coderbus IRC. ~Carn x
var/list/overlays_lying[TOTAL_LAYERS]
var/list/overlays_standing[TOTAL_LAYERS]
var/previous_damage_appearance // store what the body last looked like, so we only have to update it if something changed
var/race_icon
var/icon/race_icon
var/icon/deform_icon
//UPDATES OVERLAYS FROM OVERLAYS_LYING/OVERLAYS_STANDING
//this proc is messy as I was forced to include some old laggy cloaking code to it so that I don't break cloakers
@@ -234,18 +235,16 @@ proc/get_damage_icon_part(damage_state, body_part)
var/g = "m"
if(gender == FEMALE) g = "f"
var/datum/organ/external/chest = get_organ("chest")
stand_icon = chest.get_icon(g)
if(!skeleton)
stand_icon = new /icon(race_icon, "torso_[g][fat?"_fat":""]")
if(husk)
stand_icon.ColorTone(husk_color_mod)
else if(hulk)
// stand_icon.ColorTone(hulk_color_mod)
var/list/TONE = ReadRGB(hulk_color_mod)
stand_icon.MapColors(rgb(TONE[1],0,0),rgb(0,TONE[2],0),rgb(0,0,TONE[3]))
else if(plant)
stand_icon.ColorTone(plant_color_mod)
else
stand_icon = new /icon(race_icon, "torso")
var/datum/organ/external/head = get_organ("head")
var/has_head = 0
@@ -255,28 +254,22 @@ proc/get_damage_icon_part(damage_state, body_part)
for(var/datum/organ/external/part in organs)
if(!istype(part, /datum/organ/external/chest) && !(part.status & ORGAN_DESTROYED))
var/icon/temp
if(istype(part, /datum/organ/external/groin))
if(skeleton)
temp = new /icon(race_icon, "groin")
else
temp = new /icon(race_icon, "groin_[g]")
else if(istype(part, /datum/organ/external/head))
if(skeleton)
temp = new /icon(race_icon, "head")
else
temp = new /icon(race_icon, "head_[g]")
if (istype(part, /datum/organ/external/groin) || istype(part, /datum/organ/external/head))
temp = part.get_icon(g)
else
temp = new /icon(race_icon, "[part.icon_name]")
temp = part.get_icon()
if(part.status & ORGAN_ROBOT)
temp.GrayScale()
if(part.status & ORGAN_DEAD)
temp.ColorTone(necrosis_color_mod)
temp.SetIntensity(0.7)
else if(!skeleton)
if(husk)
temp.ColorTone(husk_color_mod)
else if(hulk)
// temp.ColorTone(hulk_color_mod)
var/list/TONE = ReadRGB(hulk_color_mod)
temp.MapColors(rgb(TONE[1],0,0),rgb(0,TONE[2],0),rgb(0,0,TONE[3]))
else if(plant)
@@ -442,12 +435,16 @@ proc/get_damage_icon_part(damage_state, body_part)
switch(dna.mutantrace)
if("tajaran")
race_icon = 'icons/mob/human_races/r_tajaran.dmi'
deform_icon = 'icons/mob/human_races/r_def_tajaran.dmi'
if("lizard")
race_icon = 'icons/mob/human_races/r_lizard.dmi'
deform_icon = 'icons/mob/human_races/r_def_lizard.dmi'
if("skrell")
race_icon = 'icons/mob/human_races/r_skrell.dmi'
deform_icon = 'icons/mob/human_races/r_def_skrell.dmi'
else
race_icon = 'icons/mob/human_races/r_human.dmi'
deform_icon = 'icons/mob/human_races/r_def_human.dmi'
else
icon = 'icons/mob/human_races/r_human.dmi'
+3 -3
View File
@@ -402,7 +402,7 @@ var/list/department_radio_keys = list(
var/deaf_message = ""
var/deaf_type = 1
if(M != src)
deaf_message = "<span class='name'>[name][alt_name]</span> talks but you cannot hear them."
deaf_message = "<span class='name'>[name]</span>[alt_name] talks but you cannot hear them."
else
deaf_message = "<span class='notice'>You cannot hear yourself!</span>"
deaf_type = 2 // Since you should be able to hear yourself without looking
@@ -416,12 +416,12 @@ var/list/department_radio_keys = list(
message_b = voice_message
else
message_b = stars(message)
message_b = say_quote(message_b)
message_b = say_quote(message,is_speaking_soghun,is_speaking_skrell,is_speaking_taj)
if (italics)
message_b = "<i>[message_b]</i>"
rendered = "<span class='game say'><span class='name'>[voice_name]</span> <span class='message'>[message_b]</span></span>"
rendered = "<span class='game say'><span class='name'>[name]</span>[alt_name] <span class='message'>[message_b]</span></span>" //Voice_name isn't too useful. You'd be able to tell who was talking presumably.
for (var/M in heard_b)
@@ -210,14 +210,14 @@
/mob/living/silicon/robot/verb/Namepick()
if(custom_name)
return 0
spawn(0)
var/newname
newname = input(src,"You are a robot. Enter a name, or leave blank for the default name.", "Name change","") as text
if (newname != "")
custom_name = newname
var/newname
newname = input(src,"You are a robot. Enter a name, or leave blank for the default name.", "Name change","") as text
if (newname != "")
custom_name = newname
updatename("Default")
updateicon()
updatename("Default")
updateicon()
/mob/living/silicon/robot/verb/cmd_robot_alerts()
set category = "Robot Commands"
+3
View File
@@ -11,6 +11,9 @@
proc/receive_chem(chemical as obj)
return 0
/datum/organ/proc/get_icon()
return icon('icons/mob/human.dmi',"blank")
//Handles chem traces
/mob/living/carbon/human/proc/handle_trace_chems()
//New are added for reagents to random organs.
+51 -22
View File
@@ -547,6 +547,14 @@
if(T)
T.robotize()
/datum/organ/external/proc/mutate()
src.status |= ORGAN_MUTATED
owner.update_body()
/datum/organ/external/proc/unmutate()
src.status &= ~ORGAN_MUTATED
owner.update_body()
/datum/organ/external/proc/get_damage() //returns total damage
return max(brute_dam + burn_dam - perma_injury, perma_injury) //could use health?
@@ -556,21 +564,32 @@
return 1
return 0
/datum/organ/external/get_icon(gender="")
if (status & ORGAN_MUTATED)
return new /icon(owner.deform_icon, "[icon_name][gender ? "_[gender]" : ""]")
else
return new /icon(owner.race_icon, "[icon_name][gender ? "_[gender]" : ""]")
/datum/organ/external/proc/is_usable()
return !(status & (ORGAN_DESTROYED|ORGAN_MUTATED|ORGAN_DEAD))
/****************************************************
ORGAN DEFINES
****************************************************/
/datum/organ/external/chest
name = "chest"
icon_name = "chest"
icon_name = "torso"
display_name = "chest"
max_damage = 150
min_broken_damage = 75
body_part = UPPER_TORSO
/datum/organ/external/groin
name = "groin"
icon_name = "diaper"
icon_name = "groin"
display_name = "groin"
max_damage = 115
min_broken_damage = 70
@@ -653,27 +672,37 @@
body_part = HEAD
var/disfigured = 0
take_damage(brute, burn, sharp, used_weapon = null, list/forbidden_limbs = list())
..(brute, burn, sharp, used_weapon, forbidden_limbs)
if (!disfigured)
if (brute_dam > 40)
if (prob(50))
disfigure("brute")
if (burn_dam > 40)
disfigure("burn")
/datum/organ/external/head/get_icon()
if (!owner)
return ..()
var/g = "m"
if(owner.gender == FEMALE) g = "f"
if (status & ORGAN_MUTATED)
. = new /icon(owner.deform_icon, "[icon_name]_[g]")
else
. = new /icon(owner.race_icon, "[icon_name]_[g]")
proc/disfigure(var/type = "brute")
if (disfigured)
return
if(type == "brute")
owner.visible_message("\red You hear a sickening cracking sound coming from \the [owner]'s face.", \
"\red <b>Your face becomes unrecognizible mangled mess!</b>", \
"\red You hear a sickening crack.")
else
owner.visible_message("\red [owner]'s face melts away, turning into mangled mess!", \
"\red <b>Your face melts off!</b>", \
"\red You hear a sickening sizzle.")
disfigured = 1
/datum/organ/external/head/take_damage(brute, burn, sharp, used_weapon = null, list/forbidden_limbs = list())
..(brute, burn, sharp, used_weapon, forbidden_limbs)
if (!disfigured)
if (brute_dam > 40)
if (prob(50))
disfigure("brute")
if (burn_dam > 40)
disfigure("burn")
/datum/organ/external/head/proc/disfigure(var/type = "brute")
if (disfigured)
return
if(type == "brute")
owner.visible_message("\red You hear a sickening cracking sound coming from \the [owner]'s face.", \
"\red <b>Your face becomes unrecognizible mangled mess!</b>", \
"\red You hear a sickening crack.")
else
owner.visible_message("\red [owner]'s face melts away, turning into mangled mess!", \
"\red <b>Your face melts off!</b>", \
"\red You hear a sickening sizzle.")
disfigured = 1
/****************************************************
EXTERNAL ORGAN ITEMS
+2
View File
@@ -304,6 +304,7 @@ var/MAX_EXPLOSION_RANGE = 14
// mob/var/list/mutations
#define STRUCDNASIZE 27
#define UNIDNASIZE 13
// Generic mutations:
#define TK 1
@@ -582,6 +583,7 @@ var/list/TAGGERLOCATIONS = list("Disposals",
#define ORGAN_SPLINTED 256
#define SALVED 512
#define ORGAN_DEAD 1024
#define ORGAN_MUTATED 2048
#define ROUNDSTART_LOGOUT_REPORT_TIME 6000 //Amount of time (in deciseconds) after the rounds starts, that the player disconnect report is issued.