mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-30 16:47:13 +01:00
Merge branch 'master' of https://github.com/tgstation/-tg-station into MidJuneBugfixes
Conflicts: code/modules/mob/living/carbon/carbon.dm
This commit is contained in:
+16
-1
@@ -46,4 +46,19 @@
|
||||
#define PASSTABLE 1
|
||||
#define PASSGLASS 2
|
||||
#define PASSGRILLE 4
|
||||
#define PASSBLOB 8
|
||||
#define PASSBLOB 8
|
||||
|
||||
//flags for species
|
||||
|
||||
#define MUTCOLORS 1
|
||||
#define HAIR 2
|
||||
#define FACEHAIR 4
|
||||
#define EYECOLOR 8
|
||||
#define LIPS 16
|
||||
#define COLDRES 32
|
||||
#define HEATRES 64
|
||||
#define RADIMMUNE 128
|
||||
#define NOBREATH 256
|
||||
#define NOGUNS 512
|
||||
#define NOBLOOD 1024
|
||||
#define NOFIRE 2048
|
||||
@@ -10,6 +10,15 @@
|
||||
//underwear
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/underwear, underwear_all, underwear_m, underwear_f)
|
||||
|
||||
//Species
|
||||
for(var/spath in typesof(/datum/species))
|
||||
if(spath == /datum/species)
|
||||
continue
|
||||
var/datum/species/S = new spath()
|
||||
if(S.roundstart)
|
||||
roundstart_species[S.name] = S.type
|
||||
species_list[S.id] = S.type
|
||||
|
||||
//Surgeries
|
||||
for(var/path in typesof(/datum/surgery))
|
||||
if(path == /datum/surgery)
|
||||
|
||||
@@ -56,10 +56,8 @@ var/list/skin_tones = list(
|
||||
"african2"
|
||||
)
|
||||
|
||||
var/list/mutant_races = list(
|
||||
"human",
|
||||
"lizard",
|
||||
)
|
||||
var/global/list/species_list[0]
|
||||
var/global/list/roundstart_species[0]
|
||||
|
||||
proc/age2agedescription(age)
|
||||
switch(age)
|
||||
|
||||
@@ -252,6 +252,15 @@ Turf and target are seperate in case you want to teleport some distance from a t
|
||||
if(isAI(src))
|
||||
var/mob/living/silicon/ai/AI = src
|
||||
if(oldname != real_name)
|
||||
if(AI.eyeobj)
|
||||
AI.eyeobj.name = "[newname] (AI Eye)"
|
||||
|
||||
// Set ai pda name
|
||||
if(AI.aiPDA)
|
||||
AI.aiPDA.owner = newname
|
||||
AI.aiPDA.name = newname + " (" + AI.aiPDA.ownjob + ")"
|
||||
|
||||
// Notify Cyborgs
|
||||
for(var/mob/living/silicon/robot/Slave in AI.connected_robots)
|
||||
Slave.show_laws()
|
||||
|
||||
@@ -330,22 +339,7 @@ Turf and target are seperate in case you want to teleport some distance from a t
|
||||
|
||||
if(cmptext("ai",role))
|
||||
if(isAI(src))
|
||||
var/mob/living/silicon/ai/A = src
|
||||
oldname = null//don't bother with the records update crap
|
||||
//world << "<b>[newname] is the AI!</b>"
|
||||
//world << sound('sound/AI/newAI.ogg')
|
||||
// Set eyeobj name
|
||||
if(A.eyeobj)
|
||||
A.eyeobj.name = "[newname] (AI Eye)"
|
||||
|
||||
// Set ai pda name
|
||||
if(A.aiPDA)
|
||||
A.aiPDA.owner = newname
|
||||
A.aiPDA.name = newname + " (" + A.aiPDA.ownjob + ")"
|
||||
|
||||
// Notify Cyborgs
|
||||
for(var/mob/living/silicon/robot/Slave in A.connected_robots)
|
||||
Slave.show_laws()
|
||||
|
||||
if(cmptext("cyborg",role))
|
||||
if(isrobot(src))
|
||||
|
||||
@@ -43,7 +43,6 @@
|
||||
#define AI_CAMERA_LUMINOSITY 5
|
||||
#define AI_VOX 1 // Comment out if you don't want VOX to be enabled and have players download the voice sounds.
|
||||
|
||||
|
||||
//Additional code for the above flags.
|
||||
#ifdef dellogging
|
||||
#warn compiling del logging. This will have additional overheads. //will warn you if compiling with dellogging
|
||||
|
||||
@@ -77,6 +77,7 @@
|
||||
var/traitor_scaling_coeff = 6 //how much does the amount of players get divided by to determine traitors
|
||||
var/changeling_scaling_coeff = 7 //how much does the amount of players get divided by to determine changelings
|
||||
|
||||
var/traitor_objectives_amount = 2
|
||||
var/protect_roles_from_antagonist = 0// If security and such can be traitor/cult/other
|
||||
var/allow_latejoin_antagonists = 0 // If late-joining players can be traitor/changeling
|
||||
var/continuous_round_rev = 0 // Gamemodes which end instantly will instead keep on going until the round ends by escape shuttle or nuke.
|
||||
@@ -85,6 +86,7 @@
|
||||
var/shuttle_refuel_delay = 12000
|
||||
var/show_game_type_odds = 0 //if set this allows players to see the odds of each roundtype on the get revision screen
|
||||
var/mutant_races = 0 //players can choose their mutant race before joining the game
|
||||
var/mutant_colors = 0
|
||||
|
||||
var/alert_desc_green = "All threats to the station have passed. Security may not have weapons visible, privacy laws are once again fully enforced."
|
||||
var/alert_desc_blue_upto = "The station has received reliable information about possible hostile activity on the station. Security staff may have weapons visible, random searches are permitted."
|
||||
@@ -344,6 +346,8 @@
|
||||
config.traitor_scaling_coeff = text2num(value)
|
||||
if("changeling_scaling_coeff")
|
||||
config.changeling_scaling_coeff = text2num(value)
|
||||
if("traitor_objectives_amount")
|
||||
config.traitor_objectives_amount = text2num(value)
|
||||
if("probability")
|
||||
var/prob_pos = findtext(value, " ")
|
||||
var/prob_name = null
|
||||
@@ -385,6 +389,8 @@
|
||||
config.default_laws = text2num(value)
|
||||
if("join_with_mutant_race")
|
||||
config.mutant_races = 1
|
||||
if("mutant_colors")
|
||||
config.mutant_colors = 1
|
||||
else
|
||||
diary << "Unknown setting in configuration: '[name]'"
|
||||
|
||||
|
||||
@@ -11,6 +11,9 @@ var/datum/controller/garbage_collector/garbage = new()
|
||||
// refID's are associated with the time at which they time out and need to be manually del()
|
||||
// we do this so we aren't constantly locating them and preventing them from being gc'd
|
||||
|
||||
var/list/logging = list() // list of all types that have failed to GC associated with the number of times that's happened.
|
||||
// the types are stored as strings
|
||||
|
||||
/datum/controller/garbage_collector/proc/AddTrash(var/datum/A)
|
||||
if(!istype(A) || !isnull(A.gc_destroyed))
|
||||
return
|
||||
@@ -37,6 +40,7 @@ var/datum/controller/garbage_collector/garbage = new()
|
||||
if(A && A.gc_destroyed == GCd_at_time) // So if something else coincidently gets the same ref, it's not deleted by mistake
|
||||
// Something's still referring to the qdel'd object. Kill it.
|
||||
testing("GC: -- \ref[A] | [A.type] was unable to be GC'd and was deleted --")
|
||||
logging["[A.type]"]++
|
||||
del(A)
|
||||
dels++
|
||||
// else
|
||||
|
||||
@@ -73,7 +73,7 @@ datum/shuttle_controller
|
||||
last_call_loc = null
|
||||
|
||||
if(recall_count == 2)
|
||||
priority_announce("The emergency shuttle has been recalled.\n\nExcessive number of emergency shuttle calls detected. We will attempt to trace any further signals to their source. Results may be viewed on any communications console.", null, 'sound/AI/shuttlerecalled.ogg')
|
||||
priority_announce("The emergency shuttle has been recalled.\n\nExcessive number of emergency shuttle calls detected. We will attempt to trace all future calls and recalls to their source. Tracing results can be viewed on any communications console.", null, 'sound/AI/shuttlerecalled.ogg')
|
||||
else
|
||||
priority_announce("The emergency shuttle has been recalled.", null, 'sound/AI/shuttlerecalled.ogg', "Priority")
|
||||
setdirection(-1)
|
||||
|
||||
+10
-23
@@ -249,12 +249,11 @@ client
|
||||
body += "<option value='?_src_=vars;godmode=\ref[D]'>Toggle Godmode</option>"
|
||||
body += "<option value='?_src_=vars;build_mode=\ref[D]'>Toggle Build Mode</option>"
|
||||
body += "<option value='?_src_=vars;direct_control=\ref[D]'>Assume Direct Control</option>"
|
||||
body += "<option value='?_src_=vars;make_skeleton=\ref[D]'>Make 2spooky</option>"
|
||||
body += "<option value='?_src_=vars;drop_everything=\ref[D]'>Drop Everything</option>"
|
||||
body += "<option value='?_src_=vars;regenerateicons=\ref[D]'>Regenerate Icons</option>"
|
||||
if(ishuman(D))
|
||||
body += "<option value>---</option>"
|
||||
body += "<option value='?_src_=vars;setmutantrace=\ref[D]'>Set Mutantrace</option>"
|
||||
body += "<option value='?_src_=vars;setspecies=\ref[D]'>Set Species</option>"
|
||||
body += "<option value='?_src_=vars;makeai=\ref[D]'>Make AI</option>"
|
||||
body += "<option value='?_src_=vars;makerobot=\ref[D]'>Make cyborg</option>"
|
||||
body += "<option value='?_src_=vars;makemonkey=\ref[D]'>Make monkey</option>"
|
||||
@@ -581,17 +580,6 @@ client
|
||||
if(usr.client)
|
||||
usr.client.cmd_assume_direct_control(M)
|
||||
|
||||
else if(href_list["make_skeleton"])
|
||||
if(!check_rights(R_FUN)) return
|
||||
|
||||
var/mob/living/carbon/human/H = locate(href_list["make_skeleton"])
|
||||
if(!istype(H))
|
||||
usr << "This can only be used on instances of type /mob/living/carbon/human"
|
||||
return
|
||||
|
||||
H.makeSkeleton()
|
||||
href_list["datumrefresh"] = href_list["make_skeleton"]
|
||||
|
||||
else if(href_list["delall"])
|
||||
if(!check_rights(R_DEBUG|R_SERVER)) return
|
||||
|
||||
@@ -786,25 +774,24 @@ client
|
||||
return
|
||||
holder.Topic(href, list("makeai"=href_list["makeai"]))
|
||||
|
||||
else if(href_list["setmutantrace"])
|
||||
else if(href_list["setspecies"])
|
||||
if(!check_rights(R_SPAWN)) return
|
||||
|
||||
var/mob/living/carbon/human/H = locate(href_list["setmutantrace"])
|
||||
var/mob/living/carbon/human/H = locate(href_list["setspecies"])
|
||||
if(!istype(H))
|
||||
usr << "This can only be done to instances of type /mob/living/carbon/human"
|
||||
return
|
||||
|
||||
var/new_mutantrace = input("Please choose a new mutantrace","Mutantrace",null) as null|anything in list("NONE","golem","lizard","slime","plant","shadow", "fly", "skeleton")
|
||||
switch(new_mutantrace)
|
||||
if(null) return
|
||||
if("NONE") new_mutantrace = ""
|
||||
var/result = input(usr, "Please choose a new species","Species") as null|anything in species_list
|
||||
|
||||
if(!H)
|
||||
usr << "Mob doesn't exist anymore"
|
||||
return
|
||||
if(H.dna)
|
||||
H.dna.mutantrace = new_mutantrace
|
||||
H.update_body()
|
||||
H.update_hair()
|
||||
|
||||
if(result)
|
||||
var/newtype = species_list[result]
|
||||
H.dna.species = new newtype()
|
||||
H.regenerate_icons()
|
||||
|
||||
else if(href_list["adjustDamage"] && href_list["mobToDamage"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
@@ -139,15 +139,14 @@
|
||||
..()
|
||||
switch(stage)
|
||||
if(1)
|
||||
if(ishuman(affected_mob) && affected_mob.dna && affected_mob.dna.mutantrace == "slime")
|
||||
if(ishuman(affected_mob) && affected_mob.dna && affected_mob.dna.species.id == "slime")
|
||||
stage = 5
|
||||
if(3)
|
||||
if(ishuman(affected_mob))
|
||||
var/mob/living/carbon/human/human = affected_mob
|
||||
if(human.dna && !human.dna.mutantrace)
|
||||
human.dna.mutantrace = "slime"
|
||||
human.update_body()
|
||||
|
||||
if(human.dna && human.dna.species.id != "slime")
|
||||
human.dna.species = new /datum/species/slime()
|
||||
human.update_icons()
|
||||
|
||||
/datum/disease/transformation/corgi
|
||||
name = "The Barkening"
|
||||
|
||||
+2
-13
@@ -1172,19 +1172,8 @@ datum/mind
|
||||
..()
|
||||
mind.assigned_role = "Shade"
|
||||
|
||||
/mob/living/simple_animal/construct/builder/mind_initialize()
|
||||
/mob/living/simple_animal/construct/mind_initialize()
|
||||
..()
|
||||
mind.assigned_role = "Artificer"
|
||||
mind.assigned_role = "[initial(name)]"
|
||||
mind.special_role = "Cultist"
|
||||
|
||||
/mob/living/simple_animal/construct/wraith/mind_initialize()
|
||||
..()
|
||||
mind.assigned_role = "Wraith"
|
||||
mind.special_role = "Cultist"
|
||||
|
||||
/mob/living/simple_animal/construct/armoured/mind_initialize()
|
||||
..()
|
||||
mind.assigned_role = "Juggernaut"
|
||||
mind.special_role = "Cultist"
|
||||
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin
|
||||
desc = "A wizard spell"
|
||||
panel = "Spells"
|
||||
anchored = 1 // Crap like fireball projectiles are proc_holders, this is needed so fireballs don't get blown back into your face via atmos etc.
|
||||
pass_flags = PASSTABLE
|
||||
density = 0
|
||||
opacity = 0
|
||||
|
||||
@@ -191,6 +192,11 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin
|
||||
var/datum/effect/effect/system/bad_smoke_spread/smoke = new /datum/effect/effect/system/bad_smoke_spread()
|
||||
smoke.set_up(smoke_amt, 0, location, smoke_amt == 1 ? 15 : 0) // same here
|
||||
smoke.start()
|
||||
else if(smoke_spread == 3)
|
||||
var/datum/effect/effect/system/sleep_smoke_spread/smoke = new /datum/effect/effect/system/sleep_smoke_spread()
|
||||
smoke.set_up(smoke_amt, 0, location, smoke_amt == 1 ? 15 : 0) // same here
|
||||
smoke.start()
|
||||
|
||||
|
||||
/obj/effect/proc_holder/spell/proc/cast(list/targets)
|
||||
return
|
||||
|
||||
@@ -110,3 +110,20 @@
|
||||
invocation_type = "none"
|
||||
proj_lifespan = 10
|
||||
max_targets = 6
|
||||
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/smoke/disable
|
||||
name = "Paralysing Smoke"
|
||||
desc = "This spell spawns a cloud of paralysing smoke."
|
||||
|
||||
school = "conjuration"
|
||||
charge_max = 200
|
||||
clothes_req = 0
|
||||
invocation = "none"
|
||||
invocation_type = "none"
|
||||
range = -1
|
||||
include_user = 1
|
||||
cooldown_min = 20 //25 deciseconds reduction per rank
|
||||
|
||||
smoke_spread = 3
|
||||
smoke_amt = 10
|
||||
|
||||
+5
-1
@@ -250,6 +250,10 @@ var/list/blood_splatter_icons = list()
|
||||
|
||||
//returns 1 if made bloody, returns 0 otherwise
|
||||
/atom/proc/add_blood(mob/living/carbon/M)
|
||||
if(ishuman(M) && M.dna)
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(NOBLOOD in H.dna.species.specflags)
|
||||
return 0
|
||||
if(rejects_blood())
|
||||
return 0
|
||||
if(!istype(M))
|
||||
@@ -270,7 +274,7 @@ var/list/blood_splatter_icons = list()
|
||||
//try to find a pre-processed blood-splatter. otherwise, make a new one
|
||||
var/index = blood_splatter_index()
|
||||
var/icon/blood_splatter_icon = blood_splatter_icons[index]
|
||||
if(!blood_splatter_icon )
|
||||
if(!blood_splatter_icon)
|
||||
blood_splatter_icon = icon(initial(icon), initial(icon_state), , 1) //we only want to apply blood-splatters to the initial icon_state for each object
|
||||
blood_splatter_icon.Blend("#fff", ICON_ADD) //fills the icon_state with white (except where it's transparent)
|
||||
blood_splatter_icon.Blend(icon('icons/effects/blood.dmi', "itemblood"), ICON_MULTIPLY) //adds blood and the remaining white areas become transparant
|
||||
|
||||
@@ -127,7 +127,10 @@
|
||||
|
||||
//done throwing, either because it hit something or it finished moving
|
||||
src.throwing = 0
|
||||
if(isobj(src)) src.throw_impact(get_turf(src))
|
||||
if(isobj(src))
|
||||
src.throw_impact(get_turf(src))
|
||||
|
||||
return 1
|
||||
|
||||
|
||||
//Overlays
|
||||
@@ -152,4 +155,4 @@
|
||||
/atom/movable/overlay/attack_hand(a, b, c)
|
||||
if (src.master)
|
||||
return src.master.attack_hand(a, b, c)
|
||||
return
|
||||
return
|
||||
|
||||
+17
-12
@@ -20,7 +20,8 @@
|
||||
var/struc_enzymes
|
||||
var/uni_identity
|
||||
var/blood_type
|
||||
var/mutantrace = null //The type of mutant race the player is if applicable (i.e. potato-man)
|
||||
var/datum/species/species = new /datum/species/human() //The type of mutant race the player is if applicable (i.e. potato-man)
|
||||
var/mutant_color = "FFF" // What color you are if you have certain speciess
|
||||
var/real_name //Stores the real name of the person who originally got this dna datum. Used primarely for changelings,
|
||||
|
||||
/datum/dna/proc/generate_uni_identity(mob/living/carbon/character)
|
||||
@@ -30,6 +31,8 @@
|
||||
L[DNA_GENDER_BLOCK] = construct_block((character.gender!=MALE)+1, 2)
|
||||
if(istype(character, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = character
|
||||
if(!H.dna.species)
|
||||
H.dna.species = new /datum/species/human()
|
||||
L[DNA_HAIR_STYLE_BLOCK] = construct_block(hair_styles_list.Find(H.hair_style), hair_styles_list.len)
|
||||
L[DNA_HAIR_COLOR_BLOCK] = sanitize_hexcolor(H.hair_color)
|
||||
L[DNA_FACIAL_HAIR_STYLE_BLOCK] = construct_block(facial_hair_styles_list.Find(H.facial_hair_style), facial_hair_styles_list.len)
|
||||
@@ -62,11 +65,17 @@
|
||||
. += repeat_string(DNA_UNIQUE_ENZYMES_LEN, "0")
|
||||
return .
|
||||
|
||||
/proc/hardset_dna(mob/living/carbon/owner, ui, se, real_name, mutantrace, blood_type)
|
||||
/proc/hardset_dna(mob/living/carbon/owner, ui, se, real_name, blood_type, datum/species/mrace, mcolor)
|
||||
if(!istype(owner, /mob/living/carbon/monkey) && !istype(owner, /mob/living/carbon/human))
|
||||
return
|
||||
if(!owner.dna)
|
||||
create_dna(owner)
|
||||
create_dna(owner, mrace)
|
||||
|
||||
if(mrace)
|
||||
owner.dna.species = new mrace()
|
||||
|
||||
if(mcolor)
|
||||
owner.dna.mutant_color = mcolor
|
||||
|
||||
if(real_name)
|
||||
owner.real_name = real_name
|
||||
@@ -79,18 +88,13 @@
|
||||
owner.dna.uni_identity = ui
|
||||
updateappearance(owner)
|
||||
|
||||
var/update_mutantrace = (mutantrace != owner.dna.mutantrace)
|
||||
owner.dna.mutantrace = mutantrace
|
||||
if(update_mutantrace && istype(owner, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = owner
|
||||
H.update_body()
|
||||
H.update_hair()
|
||||
|
||||
if(se)
|
||||
owner.dna.struc_enzymes = se
|
||||
domutcheck(owner)
|
||||
|
||||
check_dna_integrity(owner)
|
||||
|
||||
owner.regenerate_icons()
|
||||
return
|
||||
|
||||
/proc/check_dna_integrity(mob/living/carbon/character)
|
||||
@@ -122,8 +126,9 @@
|
||||
character.dna.unique_enzymes = character.dna.generate_unique_enzymes(character)
|
||||
return character.dna
|
||||
|
||||
/proc/create_dna(mob/living/carbon/C) //don't use this unless you're about to use hardset_dna or ready_dna
|
||||
/proc/create_dna(mob/living/carbon/C, datum/species/S) //don't use this unless you're about to use hardset_dna or ready_dna
|
||||
C.dna = new /datum/dna()
|
||||
if(S) C.dna.species = new S() // do not remove; this is here to prevent runtimes
|
||||
|
||||
/////////////////////////// DNA DATUM
|
||||
|
||||
@@ -981,7 +986,7 @@ proc/deconstruct_block(value, values, blocksize=DNA_BLOCK_SIZE)
|
||||
|
||||
/datum/dna/proc/is_same_as(var/datum/dna/D)
|
||||
if(uni_identity == D.uni_identity && struc_enzymes == D.struc_enzymes && real_name == D.real_name)
|
||||
if(mutantrace == D.mutantrace && blood_type == D.blood_type)
|
||||
if(species == D.species && mutant_color == D.mutant_color && blood_type == D.blood_type)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
|
||||
@@ -90,7 +90,8 @@
|
||||
new_dna.uni_identity = T.dna.uni_identity
|
||||
new_dna.struc_enzymes = T.dna.struc_enzymes
|
||||
new_dna.real_name = T.dna.real_name
|
||||
new_dna.mutantrace = T.dna.mutantrace
|
||||
new_dna.species = T.dna.species
|
||||
new_dna.mutant_color = T.dna.mutant_color
|
||||
new_dna.blood_type = T.dna.blood_type
|
||||
absorbed_dna |= new_dna //And add the target DNA to our absorbed list.
|
||||
absorbedcount++ //all that done, let's increment the objective counter.
|
||||
@@ -88,7 +88,7 @@
|
||||
var/datum/dna/NewDNA = selected_dna
|
||||
if(ismonkey(target))
|
||||
user << "<span class='notice'>We stealthily sting [target.name].</span>"
|
||||
hardset_dna(target, NewDNA.uni_identity, NewDNA.struc_enzymes, NewDNA.real_name, NewDNA.mutantrace, NewDNA.blood_type)
|
||||
hardset_dna(target, NewDNA.uni_identity, NewDNA.struc_enzymes, NewDNA.real_name, NewDNA.blood_type, NewDNA.species, NewDNA.mutant_color)
|
||||
updateappearance(target)
|
||||
feedback_add_details("changeling_powers","TS")
|
||||
return 1
|
||||
|
||||
@@ -8,16 +8,17 @@
|
||||
max_genetic_damage = 3
|
||||
|
||||
//Change our DNA to that of somebody we've absorbed.
|
||||
/obj/effect/proc_holder/changeling/transform/sting_action(var/mob/living/carbon/user)
|
||||
/obj/effect/proc_holder/changeling/transform/sting_action(var/mob/living/carbon/human/user)
|
||||
var/datum/changeling/changeling = user.mind.changeling
|
||||
var/datum/dna/chosen_dna = changeling.select_dna("Select the target DNA: ", "Target DNA")
|
||||
|
||||
if(!chosen_dna)
|
||||
return
|
||||
|
||||
|
||||
user.dna = chosen_dna
|
||||
user.real_name = chosen_dna.real_name
|
||||
user.dna.species = new chosen_dna.species.type(user)
|
||||
user.dna.mutant_color = chosen_dna.mutant_color
|
||||
updateappearance(user)
|
||||
domutcheck(user, null)
|
||||
|
||||
|
||||
@@ -13,10 +13,19 @@ datum/objective/New(var/text)
|
||||
datum/objective/proc/check_completion()
|
||||
return completed
|
||||
|
||||
datum/objective/proc/is_unique_objective(possible_target)
|
||||
for(var/datum/objective/assassinate/O in owner.objectives)
|
||||
if(O.get_target() == possible_target)
|
||||
return 0
|
||||
return 1
|
||||
|
||||
datum/objective/proc/get_target()
|
||||
return target
|
||||
|
||||
datum/objective/proc/find_target()
|
||||
var/list/possible_targets = list()
|
||||
for(var/datum/mind/possible_target in ticker.minds)
|
||||
if(possible_target != owner && ishuman(possible_target.current) && (possible_target.current.stat != 2))
|
||||
if(possible_target != owner && ishuman(possible_target.current) && (possible_target.current.stat != 2) && is_unique_objective(possible_target))
|
||||
possible_targets += possible_target
|
||||
if(possible_targets.len > 0)
|
||||
target = pick(possible_targets)
|
||||
@@ -255,21 +264,32 @@ datum/objective/steal
|
||||
var/obj/item/steal_target = null //Needed for custom objectives (they're just items, not datums).
|
||||
dangerrating = 5 //Overridden by the individual item's difficulty, but defaults to 5 for custom objectives.
|
||||
|
||||
datum/objective/steal/get_target()
|
||||
return steal_target
|
||||
|
||||
datum/objective/steal/New()
|
||||
..()
|
||||
if(!possible_items.len)//Only need to fill the list when it's needed.
|
||||
init_subtypes(/datum/objective_item/steal,possible_items)
|
||||
|
||||
datum/objective/steal/find_target()
|
||||
return set_target(pick(possible_items))
|
||||
var/approved_targets = list()
|
||||
for(var/datum/objective_item/possible_item in possible_items)
|
||||
if(is_unique_objective(possible_item.targetitem))
|
||||
approved_targets += possible_item
|
||||
return set_target(safepick(possible_items))
|
||||
|
||||
datum/objective/steal/proc/set_target(var/datum/objective_item/item)
|
||||
targetinfo = item
|
||||
if(item)
|
||||
targetinfo = item
|
||||
|
||||
steal_target = targetinfo.targetitem
|
||||
explanation_text = "Steal [targetinfo.name]."
|
||||
dangerrating = targetinfo.difficulty
|
||||
return steal_target
|
||||
steal_target = targetinfo.targetitem
|
||||
explanation_text = "Steal [targetinfo.name]."
|
||||
dangerrating = targetinfo.difficulty
|
||||
return steal_target
|
||||
else
|
||||
explanation_text = "Free objective"
|
||||
return
|
||||
|
||||
datum/objective/steal/proc/select_target() //For admins setting objectives manually.
|
||||
var/list/possible_items_all = possible_items+"custom"
|
||||
@@ -292,7 +312,7 @@ datum/objective/steal/proc/select_target() //For admins setting objectives manua
|
||||
return steal_target
|
||||
|
||||
datum/objective/steal/check_completion()
|
||||
if(!steal_target || !owner.current) return 0
|
||||
if(!steal_target) return 1
|
||||
if(!isliving(owner.current)) return 0
|
||||
var/list/all_items = owner.current.GetAllContents() //this should get things in cheesewheels, books, etc.
|
||||
|
||||
|
||||
@@ -116,16 +116,17 @@
|
||||
assign_exchange_role(exchange_red,"red")
|
||||
assign_exchange_role(exchange_blue,"blue")
|
||||
else
|
||||
if(prob(50))
|
||||
var/datum/objective/assassinate/kill_objective = new
|
||||
kill_objective.owner = traitor
|
||||
kill_objective.find_target()
|
||||
traitor.objectives += kill_objective
|
||||
else
|
||||
var/datum/objective/steal/steal_objective = new
|
||||
steal_objective.owner = traitor
|
||||
steal_objective.find_target()
|
||||
traitor.objectives += steal_objective
|
||||
for(var/i = 0, i < config.traitor_objectives_amount, i++)
|
||||
if(prob(50))
|
||||
var/datum/objective/assassinate/kill_objective = new
|
||||
kill_objective.owner = traitor
|
||||
kill_objective.find_target()
|
||||
traitor.objectives += kill_objective
|
||||
else
|
||||
var/datum/objective/steal/steal_objective = new
|
||||
steal_objective.owner = traitor
|
||||
steal_objective.find_target()
|
||||
traitor.objectives += steal_objective
|
||||
|
||||
if(prob(90))
|
||||
if (!(locate(/datum/objective/escape) in traitor.objectives))
|
||||
|
||||
@@ -22,13 +22,6 @@
|
||||
transfer_soul("VICTIM", M, user)
|
||||
return
|
||||
|
||||
/*/obj/item/device/soulstone/attack(mob/living/simple_animal/shade/M as mob, mob/user as mob)//APPARENTLY THEY NEED THEIR OWN SPECIAL SNOWFLAKE CODE IN THE LIVING ANIMAL DEFINES
|
||||
if(!istype(M, /mob/living/simple_animal/shade))//If target is not a shade
|
||||
return ..()
|
||||
user.attack_log += text("\[[time_stamp()]\] <span class='danger'>Used the [src.name] to capture the soul of [M.name] ([M.ckey])</span>")
|
||||
|
||||
transfer_soul("SHADE", M, user)
|
||||
return*/
|
||||
///////////////////Options for using captured souls///////////////////////////////////////
|
||||
|
||||
/obj/item/device/soulstone/attack_self(mob/user)
|
||||
@@ -46,8 +39,6 @@
|
||||
return
|
||||
|
||||
|
||||
|
||||
|
||||
/obj/item/device/soulstone/Topic(href, href_list)
|
||||
var/mob/U = usr
|
||||
if (!in_range(src, U)||U.machine!=src)
|
||||
@@ -160,53 +151,35 @@
|
||||
var/construct_class = alert(U, "Please choose which type of construct you wish to create.",,"Juggernaut","Wraith","Artificer")
|
||||
switch(construct_class)
|
||||
if("Juggernaut")
|
||||
var/mob/living/simple_animal/construct/armoured/Z = new /mob/living/simple_animal/construct/armoured (get_turf(T.loc))
|
||||
Z.key = A.key
|
||||
if(iscultist(U))
|
||||
if(ticker.mode.name == "cult")
|
||||
ticker.mode:add_cultist(Z.mind)
|
||||
else
|
||||
ticker.mode.cult+=Z.mind
|
||||
ticker.mode.update_cult_icons_added(Z.mind)
|
||||
qdel(T)
|
||||
Z << "<B>You are a Juggernaut. Though slow, your shell can withstand extreme punishment, create shield walls and even deflect energy weapons, and rip apart enemies and walls alike.</B>"
|
||||
Z << "<B>You are still bound to serve your creator, follow their orders and help them complete their goals at all costs.</B>"
|
||||
Z.cancel_camera()
|
||||
qdel(C)
|
||||
makeNewConstruct(/mob/living/simple_animal/construct/armoured, A, U)
|
||||
|
||||
if("Wraith")
|
||||
var/mob/living/simple_animal/construct/wraith/Z = new /mob/living/simple_animal/construct/wraith (get_turf(T.loc))
|
||||
Z.key = A.key
|
||||
if(iscultist(U))
|
||||
if(ticker.mode.name == "cult")
|
||||
ticker.mode:add_cultist(Z.mind)
|
||||
else
|
||||
ticker.mode.cult+=Z.mind
|
||||
ticker.mode.update_cult_icons_added(Z.mind)
|
||||
qdel(T)
|
||||
Z << "<B>You are a Wraith. Though relatively fragile, you are fast, deadly, and even able to phase through walls.</B>"
|
||||
Z << "<B>You are still bound to serve your creator, follow their orders and help them complete their goals at all costs.</B>"
|
||||
Z.cancel_camera()
|
||||
qdel(C)
|
||||
makeNewConstruct(/mob/living/simple_animal/construct/wraith, A, U)
|
||||
|
||||
if("Artificer")
|
||||
var/mob/living/simple_animal/construct/builder/Z = new /mob/living/simple_animal/construct/builder (get_turf(T.loc))
|
||||
Z.key = A.key
|
||||
if(iscultist(U))
|
||||
if(ticker.mode.name == "cult")
|
||||
ticker.mode:add_cultist(Z.mind)
|
||||
else
|
||||
ticker.mode.cult+=Z.mind
|
||||
ticker.mode.update_cult_icons_added(Z.mind)
|
||||
qdel(T)
|
||||
Z << "<B>You are an Artificer. You are incredibly weak and fragile, but you are able to construct fortifications, use magic missile, repair allied constructs (by clicking on them), </B><I>and most important of all create new constructs</I><B> (Use your Artificer spell to summon a new construct shell and Summon Soulstone to create a new soulstone).</B>"
|
||||
Z << "<B>You are still bound to serve your creator, follow their orders and help them complete their goals at all costs.</B>"
|
||||
Z.cancel_camera()
|
||||
qdel(C)
|
||||
makeNewConstruct(/mob/living/simple_animal/construct/builder, A, U)
|
||||
|
||||
qdel(T)
|
||||
qdel(C)
|
||||
else
|
||||
U << "<span class='userdanger'>Creation failed!</span>: The soul stone is empty! Go kill someone!"
|
||||
return
|
||||
|
||||
|
||||
proc/makeNewConstruct(var/mob/living/simple_animal/construct/ctype, var/mob/target, var/mob/stoner = null, cultoverride = 0)
|
||||
var/mob/living/simple_animal/construct/newstruct = new ctype(get_turf(target))
|
||||
newstruct.key = target.key
|
||||
if(stoner && iscultist(stoner) || cultoverride)
|
||||
if(ticker.mode.name == "cult")
|
||||
ticker.mode:add_cultist(newstruct.mind)
|
||||
else
|
||||
ticker.mode.cult+=newstruct.mind
|
||||
ticker.mode.update_cult_icons_added(newstruct.mind)
|
||||
newstruct << newstruct.playstyle_string
|
||||
newstruct << "<B>You are still bound to serve your creator, follow their orders and help them complete their goals at all costs.</B>"
|
||||
newstruct.cancel_camera()
|
||||
|
||||
|
||||
/obj/item/device/soulstone/proc/init_shade(var/obj/item/device/soulstone/C, var/mob/living/carbon/human/T, var/mob/U as mob, var/vic = 0)
|
||||
new /obj/effect/decal/remains/human(T.loc) //Spawns a skeleton
|
||||
T.invisibility = 101
|
||||
|
||||
@@ -43,7 +43,7 @@ Captain
|
||||
L.imp_in = H
|
||||
L.implanted = 1
|
||||
|
||||
world << "<b>[H.real_name] is the captain!</b>"
|
||||
world << "<b>Captain [H.real_name] on deck!</b>"
|
||||
|
||||
/datum/job/captain/get_access()
|
||||
return get_all_accesses()
|
||||
|
||||
@@ -74,8 +74,14 @@
|
||||
equip_backpack(H)
|
||||
|
||||
//Equip the rest of the gear
|
||||
if(H.dna)
|
||||
H.dna.species.before_equip_job(src, H)
|
||||
|
||||
equip_items(H)
|
||||
|
||||
if(H.dna)
|
||||
H.dna.species.after_equip_job(src, H)
|
||||
|
||||
//Equip ID
|
||||
var/obj/item/weapon/card/id/C = new default_id(H)
|
||||
C.access = get_access()
|
||||
|
||||
@@ -807,20 +807,17 @@ table tr:first-child th:first-child { border: none;}
|
||||
|
||||
if(istype(W, /obj/item/stack/cable_coil))
|
||||
var/obj/item/stack/cable_coil/cable = W
|
||||
if(cable.amount < 5)
|
||||
user << "You need more cable!"
|
||||
if(cable.get_amount() < 5)
|
||||
user << "<span class='warning'>You need five lengths of cable to wire the fire alarm.</span>"
|
||||
return
|
||||
|
||||
user << "You start wiring the air alarm!"
|
||||
spawn(20)
|
||||
cable.amount -= 5
|
||||
if(!cable.amount)
|
||||
qdel(cable)
|
||||
|
||||
user << "You wire the air alarm!"
|
||||
wires.wires_status = 0
|
||||
buildstage = 2
|
||||
update_icon()
|
||||
user << "<span class='notice'>You start wiring the air alarm.</span>"
|
||||
if (do_after(user, 20))
|
||||
if (cable.get_amount() >= 5 && buildstage == 1)
|
||||
cable.use(5)
|
||||
user << "<span class='notice'>You wire the air alarm.</span>"
|
||||
wires.wires_status = 0
|
||||
buildstage = 2
|
||||
update_icon()
|
||||
return
|
||||
if(0)
|
||||
if(istype(W, /obj/item/weapon/airalarm_electronics))
|
||||
@@ -999,13 +996,11 @@ FIRE ALARM
|
||||
if(1)
|
||||
if(istype(W, /obj/item/stack/cable_coil))
|
||||
var/obj/item/stack/cable_coil/coil = W
|
||||
if(coil.amount < 5)
|
||||
if(coil.get_amount() < 5)
|
||||
user << "<span class='warning'>You need more cable for this!</span>"
|
||||
return
|
||||
|
||||
coil.amount -= 5
|
||||
if(!coil.amount)
|
||||
qdel(coil)
|
||||
coil.use(5)
|
||||
|
||||
buildstage = 2
|
||||
user << "<span class='notice'>You wire \the [src]!</span>"
|
||||
|
||||
@@ -698,9 +698,6 @@ Auto Patrol: []"},
|
||||
if(istype(perp:wear_suit, /obj/item/clothing/suit/wizrobe))
|
||||
threatcount += 2
|
||||
|
||||
if(perp.dna && perp.dna.mutantrace && perp.dna.mutantrace != "none")
|
||||
threatcount += 2
|
||||
|
||||
//Agent cards lower threatlevel when normal idchecking is off.
|
||||
if((perp.wear_id && istype(perp:wear_id.GetID(), /obj/item/weapon/card/id/syndicate)) && src.idcheck)
|
||||
threatcount -= 2
|
||||
@@ -967,14 +964,16 @@ Auto Patrol: []"},
|
||||
if(6)
|
||||
if(istype(W, /obj/item/stack/cable_coil))
|
||||
var/obj/item/stack/cable_coil/coil = W
|
||||
var/turf/T = get_turf(user)
|
||||
if (coil.get_amount() < 1)
|
||||
user << "<span class='warning'>You need one length of cable to wire the ED-209.</span>"
|
||||
return
|
||||
user << "<span class='notice'>You start to wire [src]...</span>"
|
||||
sleep(40)
|
||||
if(get_turf(user) == T)
|
||||
coil.use(1)
|
||||
build_step++
|
||||
user << "<span class='notice'>You wire the ED-209 assembly.</span>"
|
||||
name = "wired ED-209 assembly"
|
||||
if (do_after(user, 40))
|
||||
if (coil.get_amount() >= 1 && build_step == 6)
|
||||
coil.use(1)
|
||||
build_step = 7
|
||||
user << "<span class='notice'>You wire the ED-209 assembly.</span>"
|
||||
name = "wired ED-209 assembly"
|
||||
|
||||
if(7)
|
||||
switch(lasercolor)
|
||||
|
||||
@@ -102,11 +102,14 @@
|
||||
var/obj/item/stack/tile/plasteel/T = W
|
||||
if(src.amount >= 50)
|
||||
return
|
||||
var/loaded = min(50-src.amount, T.amount)
|
||||
var/loaded = min(50 - src.amount, T.get_amount())
|
||||
T.use(loaded)
|
||||
src.amount += loaded
|
||||
user << "<span class='notice'>You load [loaded] tiles into the floorbot. He now contains [src.amount] tiles.</span>"
|
||||
src.updateicon()
|
||||
if (loaded > 0)
|
||||
user << "<span class='notice'>You load [loaded] tiles into the floorbot. He now contains [src.amount] tiles.</span>"
|
||||
src.updateicon()
|
||||
else
|
||||
user << "<span class='warning'>You need at least one floor tile to put into the floorbot.</span>"
|
||||
else if(istype(W, /obj/item/weapon/card/id)||istype(W, /obj/item/device/pda))
|
||||
if(src.allowed(usr) && !open && !emagged)
|
||||
src.locked = !src.locked
|
||||
@@ -409,16 +412,19 @@
|
||||
..()
|
||||
return
|
||||
if(src.contents.len >= 1)
|
||||
user << "<span class='notice'>They wont fit in as there is already stuff inside.</span>"
|
||||
user << "<span class='alert'>They won't fit in, as there is already stuff inside.</span>"
|
||||
return
|
||||
if(T.use(10))
|
||||
if(user.s_active)
|
||||
user.s_active.close(user)
|
||||
var/obj/item/weapon/toolbox_tiles/B = new /obj/item/weapon/toolbox_tiles
|
||||
user.put_in_hands(B)
|
||||
user << "<span class='notice'>You add the tiles into the empty toolbox. They protrude from the top.</span>"
|
||||
user.unEquip(src, 1)
|
||||
qdel(src)
|
||||
else
|
||||
user << "<span class='alert'>You need 10 floor tiles to start building a floorbot.</span>"
|
||||
return
|
||||
if(user.s_active)
|
||||
user.s_active.close(user)
|
||||
qdel(T)
|
||||
var/obj/item/weapon/toolbox_tiles/B = new /obj/item/weapon/toolbox_tiles
|
||||
user.put_in_hands(B)
|
||||
user << "<span class='notice'>You add the tiles into the empty toolbox. They protrude from the top.</span>"
|
||||
user.unEquip(src, 1)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/weapon/toolbox_tiles/attackby(var/obj/item/W, mob/user as mob)
|
||||
..()
|
||||
|
||||
@@ -630,9 +630,6 @@ Auto Patrol: []"},
|
||||
if(istype(humanperp.head, /obj/item/clothing/head/wizard) || istype(humanperp.head, /obj/item/clothing/head/helmet/space/rig/wizard))
|
||||
threatcount += 2
|
||||
|
||||
if(humanperp.dna && humanperp.dna.mutantrace && humanperp.dna.mutantrace != "none")
|
||||
threatcount += 2
|
||||
|
||||
//Agent cards lower threatlevel.
|
||||
if(humanperp.wear_id && istype(humanperp.wear_id.GetID(), /obj/item/weapon/card/id/syndicate))
|
||||
threatcount -= 2
|
||||
@@ -789,4 +786,4 @@ Auto Patrol: []"},
|
||||
overlays -= "hs_arm"
|
||||
new /obj/item/robot_parts/l_arm(get_turf(src))
|
||||
user << "<span class='notice'>You remove the robot arm from [src].</span>"
|
||||
build_step--
|
||||
build_step--
|
||||
|
||||
@@ -59,8 +59,11 @@
|
||||
if(istype(W, /obj/item/stack/cable_coil))
|
||||
var/obj/item/stack/cable_coil/C = W
|
||||
if(C.use(2))
|
||||
user << "You add wires to the assembly."
|
||||
user << "<span class='notice'>You add wires to the assembly.</span>"
|
||||
state = 3
|
||||
else
|
||||
user << "<span class='warning'>You need two lengths of cable to wire a camera.</span>"
|
||||
return
|
||||
return
|
||||
|
||||
else if(istype(W, /obj/item/weapon/weldingtool))
|
||||
|
||||
@@ -123,7 +123,7 @@
|
||||
//Clonepod
|
||||
|
||||
//Start growing a human clone in the pod!
|
||||
/obj/machinery/clonepod/proc/growclone(var/ckey, var/clonename, var/ui, var/se, var/mindref, var/mrace)
|
||||
/obj/machinery/clonepod/proc/growclone(var/ckey, var/clonename, var/ui, var/se, var/mindref, var/datum/species/mrace, var/mcolor)
|
||||
if(panel_open)
|
||||
return 0
|
||||
if(mess || attempting)
|
||||
@@ -188,7 +188,8 @@
|
||||
|
||||
// -- End mode specific stuff
|
||||
|
||||
hardset_dna(H, ui, se, null, mrace)
|
||||
hardset_dna(H, ui, se, null, null, mrace, mcolor)
|
||||
|
||||
if(efficiency > 2)
|
||||
for(var/A in bad_se_blocks)
|
||||
setblock(H.dna.struc_enzymes, A, construct_block(0,2))
|
||||
@@ -203,6 +204,8 @@
|
||||
H.facial_hair_style = "Shaved"
|
||||
H.hair_style = pick("Bedhead", "Bedhead 2", "Bedhead 3")
|
||||
|
||||
H.regenerate_icons()
|
||||
|
||||
H.suiciding = 0
|
||||
src.attempting = 0
|
||||
return 1
|
||||
|
||||
@@ -63,14 +63,18 @@
|
||||
state = 1
|
||||
icon_state = "1"
|
||||
if(istype(P, /obj/item/stack/cable_coil))
|
||||
if(P:amount >= 5)
|
||||
var/obj/item/stack/cable_coil/C = P
|
||||
if(C.get_amount() >= 5)
|
||||
playsound(loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
if(do_after(user, 20))
|
||||
P:amount -= 5
|
||||
if(!P:amount) qdel(P)
|
||||
user << "<span class='notice'>You add cables to the frame.</span>"
|
||||
state = 3
|
||||
icon_state = "3"
|
||||
if (C.get_amount() >= 5 && state == 3)
|
||||
C.use(5)
|
||||
user << "<span class='notice'>You add cables to the frame.</span>"
|
||||
state = 3
|
||||
icon_state = "3"
|
||||
else
|
||||
user << "<span class='warning'>You need five lengths of cable to wire the AI core.</span>"
|
||||
return
|
||||
if(3)
|
||||
if(istype(P, /obj/item/weapon/wirecutters))
|
||||
if (brain)
|
||||
@@ -84,15 +88,18 @@
|
||||
A.amount = 5
|
||||
|
||||
if(istype(P, /obj/item/stack/sheet/rglass))
|
||||
if(P:amount >= 2)
|
||||
var/obj/item/stack/sheet/rglass/G = P
|
||||
if(G.get_amount() >= 2)
|
||||
playsound(loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
if(do_after(user, 20))
|
||||
if (P)
|
||||
P:amount -= 2
|
||||
if(!P:amount) qdel(P)
|
||||
if (G.get_amount() >= 2 && state == 3)
|
||||
G.use(2)
|
||||
user << "<span class='notice'>You put in the glass panel.</span>"
|
||||
state = 4
|
||||
icon_state = "4"
|
||||
else
|
||||
user << "<span class='warning'>You need two sheets of reinforced glass to insert them into AI core.</span>"
|
||||
return
|
||||
|
||||
if(istype(P, /obj/item/weapon/aiModule/core/full)) //Allows any full core boards to be applied to AI cores.
|
||||
var/obj/item/weapon/aiModule/core/M = P
|
||||
|
||||
@@ -326,50 +326,51 @@
|
||||
if(istype(P, /obj/item/weapon/screwdriver) && circuit)
|
||||
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
|
||||
user << "<span class='notice'>You unfasten the circuit board.</span>"
|
||||
src.state = 1
|
||||
src.icon_state = "1"
|
||||
state = 1
|
||||
icon_state = "1"
|
||||
if(istype(P, /obj/item/stack/cable_coil))
|
||||
var/obj/item/stack/cable_coil/C = P
|
||||
if(C.amount >= 5)
|
||||
if(C.get_amount() >= 5)
|
||||
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
user << "<span class='notice'>You start adding cables to the frame.</span>"
|
||||
if(do_after(user, 20))
|
||||
if(C && C.amount >= 5)
|
||||
C.amount -= 5
|
||||
if(C.amount <= 0) qdel(C)
|
||||
if(C.get_amount() >= 5 && state == 2)
|
||||
C.use(5)
|
||||
user << "<span class='notice'>You've added cables to the frame.</span>"
|
||||
src.state = 3
|
||||
src.icon_state = "3"
|
||||
state = 3
|
||||
icon_state = "3"
|
||||
else
|
||||
user << "<span class='warning'>You need more cable to do that.</span>"
|
||||
user << "<span class='warning'>You need five lengths of cable to wire the frame.</span>"
|
||||
if(3)
|
||||
if(istype(P, /obj/item/weapon/wirecutters))
|
||||
playsound(src.loc, 'sound/items/Wirecutter.ogg', 50, 1)
|
||||
user << "<span class='notice'>You remove the cables.</span>"
|
||||
src.state = 2
|
||||
src.icon_state = "2"
|
||||
state = 2
|
||||
icon_state = "2"
|
||||
var/obj/item/stack/cable_coil/A = new (loc)
|
||||
A.amount = 5
|
||||
A.add_fingerprint(user)
|
||||
|
||||
if(istype(P, /obj/item/stack/sheet/glass))
|
||||
if(P:amount >= 2)
|
||||
var/obj/item/stack/sheet/glass/G = P
|
||||
if(G.get_amount() < 2)
|
||||
user << "<span class='warning'>You need two glass sheets to continue construction.</span>"
|
||||
return
|
||||
else
|
||||
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
user << "<span class='notice'>You start to put in the glass panel.</span>"
|
||||
if(do_after(user, 20))
|
||||
if(P)
|
||||
P:use(2)
|
||||
if(G.get_amount() >= 2 && state == 3)
|
||||
G.use(2)
|
||||
user << "<span class='notice'>You've put in the glass panel.</span>"
|
||||
src.state = 4
|
||||
state = 4
|
||||
src.icon_state = "4"
|
||||
else
|
||||
user << "<span class='warning'>You need more glass to do that.</span>"
|
||||
if(4)
|
||||
if(istype(P, /obj/item/weapon/crowbar))
|
||||
playsound(src.loc, 'sound/items/Crowbar.ogg', 50, 1)
|
||||
user << "<span class='notice'>You remove the glass panel.</span>"
|
||||
src.state = 3
|
||||
src.icon_state = "3"
|
||||
state = 3
|
||||
icon_state = "3"
|
||||
var/obj/item/stack/sheet/glass/G = new (loc, 2)
|
||||
G.add_fingerprint(user)
|
||||
if(istype(P, /obj/item/weapon/screwdriver))
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
if(!(pod1.occupant || pod1.mess) && (pod1.efficiency > 5))
|
||||
for(var/datum/data/record/R in records)
|
||||
if(!(pod1.occupant || pod1.mess))
|
||||
if(pod1.growclone(R.fields["ckey"], R.fields["name"], R.fields["UI"], R.fields["SE"], R.fields["mind"], R.fields["mrace"]))
|
||||
if(pod1.growclone(R.fields["ckey"], R.fields["name"], R.fields["UI"], R.fields["SE"], R.fields["mind"], R.fields["mrace"], R.fields["mcolor"]))
|
||||
records -= R
|
||||
|
||||
/obj/machinery/computer/cloning/proc/updatemodules()
|
||||
@@ -328,7 +328,7 @@
|
||||
temp = "<font class='bad'>Clonepod malfunction.</font>"
|
||||
else if(!config.revival_cloning)
|
||||
temp = "<font class='bad'>Unable to initiate cloning cycle.</font>"
|
||||
else if(pod1.growclone(C.fields["ckey"], C.fields["name"], C.fields["UI"], C.fields["SE"], C.fields["mind"], C.fields["mrace"]))
|
||||
else if(pod1.growclone(C.fields["ckey"], C.fields["name"], C.fields["UI"], C.fields["SE"], C.fields["mind"], C.fields["mrace"], C.fields["mcolor"]))
|
||||
temp = "[C.fields["name"]] => <font class='good'>Cloning cycle in progress...</font>"
|
||||
records.Remove(C)
|
||||
if(active_record == C)
|
||||
@@ -368,10 +368,10 @@
|
||||
return
|
||||
|
||||
var/datum/data/record/R = new()
|
||||
if(subject.dna)
|
||||
R.fields["mrace"] = subject.dna.mutantrace
|
||||
if(subject.dna.species)
|
||||
R.fields["mrace"] = subject.dna.species.type
|
||||
else
|
||||
R.fields["mrace"] = null
|
||||
R.fields["mrace"] = /datum/species/human
|
||||
R.fields["ckey"] = subject.ckey
|
||||
R.fields["name"] = subject.real_name
|
||||
R.fields["id"] = copytext(md5(subject.real_name), 2, 6)
|
||||
@@ -379,6 +379,7 @@
|
||||
R.fields["UI"] = subject.dna.uni_identity
|
||||
R.fields["SE"] = subject.dna.struc_enzymes
|
||||
R.fields["blood_type"] = subject.dna.blood_type
|
||||
R.fields["mcolor"] = subject.dna.mutant_color
|
||||
|
||||
//Add an implant if needed
|
||||
var/obj/item/weapon/implant/health/imp = locate(/obj/item/weapon/implant/health, subject)
|
||||
|
||||
@@ -355,9 +355,9 @@ var/const/CALL_SHUTTLE_REASON_LENGTH = 12
|
||||
if (src.authenticated)
|
||||
if(emergency_shuttle.recall_count > 1)
|
||||
if(emergency_shuttle.last_call_loc)
|
||||
dat += "<BR>Latest emergency signal trace attempt successful.<BR>Last signal origin: <b>[format_text(emergency_shuttle.last_call_loc.name)]</b>.<BR>"
|
||||
dat += "<BR>Last emergency shuttle call/recall traced to: <b>[format_text(emergency_shuttle.last_call_loc.name)]</b>.<BR>"
|
||||
else
|
||||
dat += "<BR>Latest emergency signal trace attempt failed.<BR>"
|
||||
dat += "<BR>Last emergency shuttle call/recall trace failed.<BR>"
|
||||
dat += "Logged in as: [auth_id]"
|
||||
dat += "<BR>\[ <A HREF='?src=\ref[src];operation=logout'>Log Out</A> \]<BR>"
|
||||
dat += "<BR><B>General Functions</B>"
|
||||
|
||||
@@ -55,16 +55,18 @@
|
||||
if(1)
|
||||
if(istype(P, /obj/item/stack/cable_coil))
|
||||
var/obj/item/stack/cable_coil/C = P
|
||||
if(C.amount >= 5)
|
||||
if(C.get_amount() >= 5)
|
||||
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
user << "<span class='notice'>You start to add cables to the frame.</span>"
|
||||
if(do_after(user, 20))
|
||||
if(C)
|
||||
C.amount -= 5
|
||||
if(!C.amount) qdel(C)
|
||||
if(C.get_amount() >= 5 && state == 1)
|
||||
C.use(5)
|
||||
user << "<span class='notice'>You add cables to the frame.</span>"
|
||||
state = 2
|
||||
icon_state = "box_1"
|
||||
else
|
||||
user << "<span class='warning'>You need five length of cable to wire the frame.</span>"
|
||||
return
|
||||
if(istype(P, /obj/item/weapon/wrench))
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1)
|
||||
user << "<span class='notice'>You dismantle the frame.</span>"
|
||||
@@ -138,6 +140,9 @@
|
||||
success=1
|
||||
if(istype(P, /obj/item/stack/cable_coil))
|
||||
var/obj/item/stack/cable_coil/CP = P
|
||||
if (CP.get_amount() < 1)
|
||||
user << "You need more cable!"
|
||||
return
|
||||
var/obj/item/stack/cable_coil/CC = new /obj/item/stack/cable_coil(src, 1, CP.item_color)
|
||||
if(CP.use(1))
|
||||
components += CC
|
||||
|
||||
@@ -1024,6 +1024,8 @@ About the new airlock wires panel:
|
||||
playsound(src.loc, 'sound/machines/airlock.ogg', 30, 1)
|
||||
if(src.closeOther != null && istype(src.closeOther, /obj/machinery/door/airlock/) && !src.closeOther.density)
|
||||
src.closeOther.close()
|
||||
else
|
||||
playsound(src.loc, 'sound/machines/airlockforced.ogg', 30, 1)
|
||||
|
||||
if(autoclose && normalspeed)
|
||||
spawn(150)
|
||||
@@ -1060,6 +1062,9 @@ About the new airlock wires panel:
|
||||
playsound(src.loc, 'sound/items/bikehorn.ogg', 30, 1)
|
||||
else
|
||||
playsound(src.loc, 'sound/machines/airlock.ogg', 30, 1)
|
||||
else
|
||||
playsound(src.loc, 'sound/machines/airlockforced.ogg', 30, 1)
|
||||
|
||||
var/obj/structure/window/killthis = (locate(/obj/structure/window) in get_turf(src))
|
||||
if(killthis)
|
||||
killthis.ex_act(2)//Smashin windows
|
||||
|
||||
@@ -653,16 +653,12 @@
|
||||
if(1)
|
||||
if(istype(I, /obj/item/stack/sheet/metal))
|
||||
var/obj/item/stack/sheet/metal/M = I
|
||||
if(M.amount>=2) //requires 2 metal sheets
|
||||
if(M.use(2))
|
||||
user << "<span class='notice'>You add some metal armor to the interior frame.</span>"
|
||||
build_step = 2
|
||||
M.amount -= 2
|
||||
icon_state = "turret_frame2"
|
||||
if(M.amount <= 0)
|
||||
user.unEquip(M, 1) //We're deleting it anyway, so no point in having NODROP fuck shit up.
|
||||
qdel(M)
|
||||
else
|
||||
user << "<span class='warning'>You need two sheets of metal for that.</span>"
|
||||
user << "<span class='warning'>You need two sheets of metal to continue construction.</span>"
|
||||
return
|
||||
|
||||
else if(istype(I, /obj/item/weapon/wrench))
|
||||
@@ -743,15 +739,11 @@
|
||||
if(6)
|
||||
if(istype(I, /obj/item/stack/sheet/metal))
|
||||
var/obj/item/stack/sheet/metal/M = I
|
||||
if(M.amount>=2)
|
||||
if(M.use(2))
|
||||
user << "<span class='notice'>You add some metal armor to the exterior frame.</span>"
|
||||
build_step = 7
|
||||
M.amount -= 2
|
||||
if(M.amount <= 0)
|
||||
user.unEquip(M, 1) //If we don't force-unequip, bugs happen because the item was deleted without updating the neccesary stuffs.
|
||||
qdel(M)
|
||||
else
|
||||
user << "<span class='warning'>You need two sheets of metal for that.</span>"
|
||||
user << "<span class='warning'>You need two sheets of metal to continue construction.</span>"
|
||||
return
|
||||
|
||||
else if(istype(I, /obj/item/weapon/screwdriver))
|
||||
|
||||
@@ -155,20 +155,19 @@
|
||||
/obj/machinery/recharge_station/proc/restock_modules()
|
||||
if(occupier)
|
||||
if(occupier.module && occupier.module.modules)
|
||||
var/list/um = occupier.contents|occupier.module.modules
|
||||
// ^ makes sinle list of active (occupier.contents) and inactive modules (occupier.module.modules)
|
||||
var/list/um = occupier.contents|occupier.module.modules // Makes single list of active (occupier.contents) and inactive (occupier.module.modules) modules
|
||||
var/coeff = recharge_speed / 200
|
||||
for (var/datum/robot_energy_storage/st in occupier.module.storages)
|
||||
st.energy = min(st.max_energy, st.energy + coeff * st.recharge_rate)
|
||||
for(var/obj/O in um)
|
||||
// Engineering
|
||||
if(istype(O,/obj/item/stack/sheet/metal) || istype(O,/obj/item/stack/sheet/rglass) || istype(O,/obj/item/stack/rods) || istype(O,/obj/item/stack/cable_coil)|| istype(O,/obj/item/stack/tile/plasteel))
|
||||
if(O:amount < 50)
|
||||
O:amount += coeff
|
||||
// Security
|
||||
//General
|
||||
if(istype(O,/obj/item/device/flash))
|
||||
if(O:broken)
|
||||
O:broken = 0
|
||||
O:times_used = 0
|
||||
O:icon_state = "flash"
|
||||
// Engineering
|
||||
// Security
|
||||
if(istype(O,/obj/item/weapon/gun/energy/taser/cyborg))
|
||||
if(O:power_supply.charge < O:power_supply.maxcharge)
|
||||
var/obj/item/weapon/gun/energy/G = O
|
||||
|
||||
@@ -247,14 +247,17 @@
|
||||
|
||||
else if(istype(W, /obj/item/stack/cable_coil) && malfunction && is_open)
|
||||
var/obj/item/stack/cable_coil/coil = W
|
||||
user << "\blue You begin to replace the wires."
|
||||
//if(do_after(user, min(60, round( ((maxhealth/health)*10)+(malfunction*10) ))) //Take longer to repair heavier damage
|
||||
if (coil.get_amount() < 1)
|
||||
user << "You need one length of cable to repair [src]."
|
||||
return
|
||||
user << "<span class='notice'>You begin to replace the wires.</span>"
|
||||
if(do_after(user, 30))
|
||||
if(!src || !coil) return
|
||||
if(coil.get_amount() < 1)
|
||||
return
|
||||
coil.use(1)
|
||||
health = max_health
|
||||
malfunction = 0
|
||||
user << "\blue You repair the [src]!"
|
||||
user << "<span class='notice'>You repair the [src]!</span>"
|
||||
update_icon()
|
||||
|
||||
else if(istype(W, /obj/item/weapon/wrench))
|
||||
|
||||
@@ -109,7 +109,7 @@
|
||||
index2 -= message2_len
|
||||
update_display(line1, line2)
|
||||
if(4) // supply shuttle timer
|
||||
var/line1 = "SUPPLY"
|
||||
var/line1 = "CARGO"
|
||||
var/line2
|
||||
if(supply_shuttle.moving)
|
||||
line2 = get_supply_shuttle_timer()
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
construct_op --
|
||||
stat &= ~BROKEN // the machine's not borked anymore!
|
||||
else
|
||||
user << "<span class='danger'>You need more cable to do that.</span>"
|
||||
user << "<span class='danger'>You need five lengths of cable for this machine.</span>"
|
||||
if(istype(P, /obj/item/weapon/crowbar))
|
||||
user << "<span class='notice'>You begin prying out the circuit board and components...</span>"
|
||||
playsound(src.loc, 'sound/items/Crowbar.ogg', 50, 1)
|
||||
|
||||
@@ -247,11 +247,10 @@
|
||||
if(prob(30 - (accurate * 10))) //oh dear a problem
|
||||
if(ishuman(M))//don't remove people from the round randomly you jerks
|
||||
var/mob/living/carbon/human/human = M
|
||||
if(human.dna && !human.dna.mutantrace)
|
||||
if(human.dna && human.dna.species.id == "human")
|
||||
M << "<span class='danger'>You hear a buzzing in your ears.</span>"
|
||||
human.dna.mutantrace = "fly"
|
||||
human.update_body()
|
||||
human.update_hair()
|
||||
human.dna.species = new /datum/species/fly()
|
||||
human.regenerate_icons()
|
||||
human.apply_effect((rand(120 - accurate * 40, 180 - accurate * 60)), IRRADIATE, 0)
|
||||
return
|
||||
|
||||
|
||||
@@ -646,7 +646,7 @@
|
||||
product_ads = "Probably not bad for you!;Don't believe the scientists!;It's good for you!;Don't quit, buy more!;Smoke!;Nicotine heaven.;Best cigarettes since 2150.;Award-winning cigs."
|
||||
vend_delay = 34
|
||||
icon_state = "cigs"
|
||||
products = list(/obj/item/weapon/storage/fancy/cigarettes = 10,/obj/item/weapon/storage/box/matches = 10,/obj/item/weapon/lighter/random = 4,/obj/item/weapon/rollingpaperpack = 5)
|
||||
products = list(/obj/item/weapon/storage/fancy/cigarettes = 10,/obj/item/weapon/storage/box/matches = 10,/obj/item/weapon/lighter/random = 4,/obj/item/weapon/storage/fancy/rollingpapers = 5)
|
||||
contraband = list(/obj/item/weapon/lighter/zippo = 4)
|
||||
premium = list(/obj/item/clothing/mask/cigarette/cigar/havana = 2)
|
||||
refill_canister = /obj/item/weapon/vending_refill/cigarette
|
||||
|
||||
@@ -112,10 +112,10 @@
|
||||
ore.Move(ore_box)
|
||||
else if(target.loc == C)
|
||||
log_message("Drilled through [target]")
|
||||
if(ismob(target))
|
||||
var/mob/M = target
|
||||
add_logs(chassis.occupant, M, "attacked", object="[name]", addition="(INTENT: [uppertext(chassis.occupant.a_intent)]) (DAMTYE: [uppertext(damtype)])")
|
||||
target.ex_act(2)
|
||||
if(isliving(target))
|
||||
drill_mob(target, chassis.occupant)
|
||||
else
|
||||
target.ex_act(2)
|
||||
return 1
|
||||
|
||||
can_attach(obj/mecha/M as obj)
|
||||
@@ -124,6 +124,20 @@
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/tool/drill/proc/drill_mob(mob/living/target, mob/user, var/drill_damage=80)
|
||||
target.visible_message("<span class='danger'>[chassis] drills [target] with the [src].</span>\
|
||||
<span class='userdanger'>[chassis] drills [target] with the [src].</span>")
|
||||
add_logs(user, target, "attacked", object="[name]", addition="(INTENT: [uppertext(user.a_intent)]) (DAMTYPE: [uppertext(damtype)])")
|
||||
if(ishuman(target))
|
||||
var/mob/living/carbon/human/H = target
|
||||
var/obj/item/organ/limb/affecting = H.get_organ("chest")
|
||||
affecting.take_damage(drill_damage)
|
||||
H.update_damage_overlays(0)
|
||||
else
|
||||
target.take_organ_damage(drill_damage)
|
||||
target.Paralyse(10)
|
||||
target.updatehealth()
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/tool/drill/diamonddrill
|
||||
name = "diamond-tipped exosuit drill"
|
||||
desc = "Equipment for engineering and combat exosuits. This is an upgraded version of the drill that'll pierce the heavens!"
|
||||
@@ -172,10 +186,10 @@
|
||||
ore.Move(ore_box)
|
||||
else if(target.loc == C)
|
||||
log_message("Drilled through [target]")
|
||||
if(ismob(target))
|
||||
var/mob/M = target
|
||||
add_logs(chassis.occupant, M, "attacked", object="[name]", addition="(INTENT: [uppertext(chassis.occupant.a_intent)]) (DAMTYE: [uppertext(damtype)])")
|
||||
target.ex_act(2)
|
||||
if(isliving(target))
|
||||
drill_mob(target, chassis.occupant, 120)
|
||||
else
|
||||
target.ex_act(2)
|
||||
return 1
|
||||
|
||||
can_attach(obj/mecha/M as obj)
|
||||
|
||||
+20
-31
@@ -703,12 +703,11 @@
|
||||
else if(istype(W, /obj/item/stack/cable_coil))
|
||||
if(state == 3 && hasInternalDamage(MECHA_INT_SHORT_CIRCUIT))
|
||||
var/obj/item/stack/cable_coil/CC = W
|
||||
if(CC.amount > 1)
|
||||
CC.use(2)
|
||||
if(CC.use(2))
|
||||
clearInternalDamage(MECHA_INT_SHORT_CIRCUIT)
|
||||
user << "You replace the fused wires."
|
||||
user << "<span class='notice'>You replace the fused wires.</span>"
|
||||
else
|
||||
user << "There's not enough wire to finish the task."
|
||||
user << "<span class='warning'>You need two lengths of cable to fix this mecha.</span>"
|
||||
return
|
||||
else if(istype(W, /obj/item/weapon/screwdriver))
|
||||
if(hasInternalDamage(MECHA_INT_TEMP_CONTROL))
|
||||
@@ -933,50 +932,40 @@
|
||||
return
|
||||
|
||||
|
||||
/obj/mecha/verb/move_inside()
|
||||
set category = "Object"
|
||||
set name = "Enter Exosuit"
|
||||
set src in oview(1)
|
||||
|
||||
if (usr.stat || !ishuman(usr) || usr.restrained() || !usr.Adjacent(src))
|
||||
/obj/mecha/MouseDrop_T(mob/M as mob, mob/user as mob)
|
||||
if (!user.canUseTopic(src) || (user != M))
|
||||
return
|
||||
src.log_message("[usr] tries to move in.")
|
||||
src.log_message("[user] tries to move in.")
|
||||
if (src.occupant)
|
||||
usr << "\blue <B>The [src.name] is already occupied!</B>"
|
||||
usr << "<span class='warning'>The [src.name] is already occupied!</span>"
|
||||
src.log_append_to_last("Permission denied.")
|
||||
return
|
||||
/*
|
||||
if (usr.abiotic())
|
||||
usr << "\blue <B>Subject cannot have abiotic items on.</B>"
|
||||
return
|
||||
*/
|
||||
var/passed
|
||||
if(src.dna)
|
||||
if(check_dna_integrity(usr))
|
||||
var/mob/living/carbon/C = usr
|
||||
if(check_dna_integrity(user))
|
||||
var/mob/living/carbon/C = user
|
||||
if(C.dna.unique_enzymes==src.dna)
|
||||
passed = 1
|
||||
else if(src.operation_allowed(usr))
|
||||
else if(src.operation_allowed(user))
|
||||
passed = 1
|
||||
if(!passed)
|
||||
usr << "\red Access denied"
|
||||
user << "<span class='warning'>Access denied.</span>"
|
||||
src.log_append_to_last("Permission denied.")
|
||||
return
|
||||
for(var/mob/living/carbon/slime/M in range(1,usr))
|
||||
if(M.Victim == usr)
|
||||
usr << "You're too busy getting your life sucked out of you."
|
||||
for(var/mob/living/carbon/slime/S in range(1,user))
|
||||
if(S.Victim == user)
|
||||
user << "You're too busy getting your life sucked out of you."
|
||||
return
|
||||
// usr << "You start climbing into [src.name]"
|
||||
|
||||
visible_message("\blue [usr] starts to climb into [src.name]")
|
||||
visible_message("<span class='notice'>[user] starts to climb into [src.name]")
|
||||
|
||||
if(enter_after(40,usr))
|
||||
if(enter_after(40,user))
|
||||
if(!src.occupant)
|
||||
moved_inside(usr)
|
||||
else if(src.occupant!=usr)
|
||||
usr << "[src.occupant] was faster. Try better next time, loser."
|
||||
moved_inside(user)
|
||||
else if(src.occupant!=user)
|
||||
user << "[src.occupant] was faster. Try better next time, loser."
|
||||
else
|
||||
usr << "You stop entering the exosuit."
|
||||
user << "You stop entering the exosuit."
|
||||
return
|
||||
|
||||
/obj/mecha/proc/moved_inside(var/mob/living/carbon/human/H as mob)
|
||||
|
||||
@@ -20,12 +20,11 @@
|
||||
|
||||
else if(istype(used_atom, /obj/item/stack/cable_coil))
|
||||
var/obj/item/stack/cable_coil/C = used_atom
|
||||
if(C.amount<4)
|
||||
if(C.use(4))
|
||||
playsound(holder, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
else
|
||||
user << ("There's not enough cable to finish the task.")
|
||||
return 0
|
||||
else
|
||||
C.use(4)
|
||||
playsound(holder, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
else if(istype(used_atom, /obj/item/stack))
|
||||
var/obj/item/stack/S = used_atom
|
||||
if(S.amount < 5)
|
||||
@@ -53,12 +52,11 @@
|
||||
|
||||
else if(istype(used_atom, /obj/item/stack/cable_coil))
|
||||
var/obj/item/stack/cable_coil/C = used_atom
|
||||
if(C.amount<4)
|
||||
if (C.use(4))
|
||||
playsound(holder, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
else
|
||||
user << ("There's not enough cable to finish the task.")
|
||||
return 0
|
||||
else
|
||||
C.use(4)
|
||||
playsound(holder, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
else if(istype(used_atom, /obj/item/stack))
|
||||
var/obj/item/stack/S = used_atom
|
||||
if(S.amount < 5)
|
||||
|
||||
@@ -582,6 +582,7 @@ steam.start() -- spawns the effect
|
||||
icon = 'icons/effects/96x96.dmi'
|
||||
pixel_x = -32
|
||||
pixel_y = -32
|
||||
color = "#9C3636"
|
||||
|
||||
/obj/effect/effect/sleep_smoke/New()
|
||||
..()
|
||||
@@ -596,7 +597,7 @@ steam.start() -- spawns the effect
|
||||
// if (M.wear_suit, /obj/item/clothing/suit/wizrobe && (M.hat, /obj/item/clothing/head/wizard) && (M.shoes, /obj/item/clothing/shoes/sandal)) // I'll work on it later
|
||||
else
|
||||
M.drop_item()
|
||||
M:sleeping += 1
|
||||
M:sleeping += 5
|
||||
if (M.coughedtime != 1)
|
||||
M.coughedtime = 1
|
||||
M.emote("cough")
|
||||
@@ -612,7 +613,7 @@ steam.start() -- spawns the effect
|
||||
return
|
||||
else
|
||||
M.drop_item()
|
||||
M:sleeping += 1
|
||||
M:sleeping += 5
|
||||
if (M.coughedtime != 1)
|
||||
M.coughedtime = 1
|
||||
M.emote("cough")
|
||||
|
||||
@@ -32,6 +32,8 @@
|
||||
var/obj/item/device/uplink/hidden/hidden_uplink = null // All items can have an uplink hidden inside, just remember to add the triggers.
|
||||
var/reflect_chance = 0 //This var dictates what % of a time an object will reflect an energy based weapon's shot
|
||||
|
||||
var/list/species_exception = list() // even if a species cannot put items in a certain slot, if the species id is in the item's exception list, it will be able to wear that item
|
||||
|
||||
/obj/item/device
|
||||
icon = 'icons/obj/device.dmi'
|
||||
|
||||
|
||||
@@ -81,10 +81,10 @@
|
||||
if(user.has_mutation(HULK))
|
||||
user << "<span class='warning'>Your meaty finger is too large for the button!</span>"
|
||||
return
|
||||
if(iscarbon(user))
|
||||
var/mob/living/carbon/C = user
|
||||
if(C.is_mutantrace("adamantine"))
|
||||
user << "<span class='warning'>Your metal fingers can't press the button!</span>"
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(H.dna && NOGUNS in H.dna.species.specflags)
|
||||
user << "<span class='warning'>Your fingers can't press the button!</span>"
|
||||
return
|
||||
|
||||
add_fingerprint(user)
|
||||
|
||||
@@ -78,18 +78,15 @@
|
||||
|
||||
if(istype(W, /obj/item/stack/sheet/glass))
|
||||
var/obj/item/stack/sheet/glass/G = W
|
||||
if(G.amount - decrement >= 0 && uses < max_uses)
|
||||
var/remaining = max(G.amount - decrement, 0)
|
||||
if(!remaining && !(G.amount - decrement) == 0)
|
||||
user << "There isn't enough glass."
|
||||
return
|
||||
G.amount = remaining
|
||||
if(!G.amount)
|
||||
user.drop_item()
|
||||
qdel(G)
|
||||
AddUses(increment)
|
||||
user << "You insert a piece of glass into the [src.name]. You have [uses] lights remaining."
|
||||
if(uses >= max_uses)
|
||||
user << "span class='warning'>[src.name] is full."
|
||||
return
|
||||
else if(G.use(decrement))
|
||||
AddUses(increment)
|
||||
user << "<span class='notice'>You insert a piece of glass into the [src.name]. You have [uses] lights remaining.</span>"
|
||||
return
|
||||
else
|
||||
user << "<span class='warning'>You need one sheet of glass to replace lights.</span>"
|
||||
|
||||
if(istype(W, /obj/item/weapon/light))
|
||||
var/obj/item/weapon/light/L = W
|
||||
|
||||
@@ -78,16 +78,16 @@ MASS SPECTROMETER
|
||||
|
||||
// Clumsiness/brain damage check
|
||||
if ((CLUMSY in user.mutations || user.getBrainLoss() >= 60) && prob(50))
|
||||
user << text("<span class='notice'>You stupidly try to analyze the floor's vitals!</span>")
|
||||
user.visible_message(text("<span class='alert'>[user] has analyzed the floor's vitals!</span>"))
|
||||
user.show_message(text("<span class='notice'>Analyzing Results for The floor:\n\t Overall Status: Healthy"), 1)
|
||||
user.show_message(text("<span class='notice'>\t Damage Specifics: <font color='blue'>0</font>-<font color='green'>0</font>-<font color='#FF8000'>0</font>-<font color='red'>0</font></span>"), 1)
|
||||
user << "<span class='notice'>You stupidly try to analyze the floor's vitals!</span>"
|
||||
user.visible_message("<span class='warning'>[user] has analyzed the floor's vitals!</span>")
|
||||
user.show_message("<span class='notice'>Analyzing Results for The floor:\n\t Overall Status: Healthy", 1)
|
||||
user.show_message("<span class='notice'>\t Damage Specifics: <font color='blue'>0</font>-<font color='green'>0</font>-<font color='#FF8000'>0</font>-<font color='red'>0</font></span>", 1)
|
||||
user.show_message("<span class='notice'>Key: <font color='blue'>Suffocation</font>/<font color='green'>Toxin</font>/<font color='#FF8000'>Burn</font>/<font color='red'>Brute</font></span>", 1)
|
||||
user.show_message("<span class='notice'>Body Temperature: ???</span>", 1)
|
||||
return
|
||||
|
||||
|
||||
user.visible_message(text("<span class='alert'>[] has analyzed []'s vitals!</span>", user, M))
|
||||
user.visible_message("<span class='notice'>[user] has analyzed [M]'s vitals.</span>")
|
||||
|
||||
healthscan(user, M, mode)
|
||||
|
||||
@@ -102,21 +102,26 @@ MASS SPECTROMETER
|
||||
var/tox_loss = M.getToxLoss()
|
||||
var/fire_loss = M.getFireLoss()
|
||||
var/brute_loss = M.getBruteLoss()
|
||||
var/mob_status = (M.stat > 1 ? "<font color='red'>Deceased</font>" : text("[]% healthy", M.health))
|
||||
var/mob_status = (M.stat > 1 ? "<font color='red'>Deceased</font>" : "[M.health]% healthy")
|
||||
|
||||
if(M.status_flags & FAKEDEATH)
|
||||
mob_status = "<font color='red'>Deceased</font>"
|
||||
oxy_loss = max(rand(1, 40), oxy_loss, (300 - (tox_loss + fire_loss + brute_loss))) // Random oxygen loss
|
||||
|
||||
user.show_message(text("<span class='notice'>Analyzing Results for []:\n\t Overall Status: []</span>", M, mob_status), 1)
|
||||
user.show_message(text("<span class='notice'>\t Damage Specifics: <font color='blue'>[]</font>-<font color='green'>[]</font>-<font color='#FF8000'>[]</font>-<font color='red'>[]</font></span>", oxy_loss, tox_loss, fire_loss, brute_loss), 1)
|
||||
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(H.dna)// Show target's species, if they have one
|
||||
user.show_message("<span class='notice'>Species: <b>[H.dna.species.name]</b></span>", 1)
|
||||
else // Otherwise we can assume that they are a regular human
|
||||
user.show_message("<span class='notice'>Species: <b>Human</b></span>", 1)
|
||||
user.show_message("<span class='notice'>\t Damage Specifics: <font color='blue'>[oxy_loss]</font>-<font color='green'>[tox_loss]</font>-<font color='#FF8000'>[fire_loss]</font>-<font color='red'>[brute_loss]</font></span>", 1)
|
||||
user.show_message("<span class='notice'>Key: <font color='blue'>Suffocation</font>/<font color='green'>Toxin</font>/<font color='#FF8000'>Burn</font>/<font color='red'>Brute</font></span>", 1)
|
||||
user.show_message("<span class='notice'>Body Temperature: [M.bodytemperature-T0C]°C ([M.bodytemperature*1.8-459.67]°F)</span>", 1)
|
||||
|
||||
// Time of death
|
||||
if(M.tod && (M.stat == DEAD || (M.status_flags & FAKEDEATH)))
|
||||
user.show_message("<span class='notice'>Time of Death:</span> [M.tod]")
|
||||
user.show_message("<span class='notice'>Time of Death:</span> [M.tod]", 1)
|
||||
|
||||
// Organ damage report
|
||||
if(istype(M, /mob/living/carbon/human) && mode == 1)
|
||||
@@ -131,26 +136,26 @@ MASS SPECTROMETER
|
||||
|
||||
// Damage descriptions
|
||||
|
||||
user.show_message(text("<span class='notice'>[] | [] | [] | []</span>", oxy_loss > 50 ? "\red Severe oxygen deprivation detected\blue" : "Subject bloodstream oxygen level normal", tox_loss > 50 ? "\red Dangerous amount of toxins detected\blue" : "Subject bloodstream toxin level minimal", fire_loss > 50 ? "\red Severe burn damage detected\blue" : "Subject burn injury status O.K", brute_loss > 50 ? "\red Severe anatomical damage detected\blue" : "Subject brute-force injury status O.K"), 1)
|
||||
user.show_message(text("<span class='notice'>[] | [] | [] | []</span>", oxy_loss > 50 ? "<span class='warning'> Severe oxygen deprivation detected</span>" : "<span class='info'>Subject bloodstream oxygen level normal</span>", tox_loss > 50 ? "<span class='warning'> Dangerous amount of toxins detected</span>" : "<span class='info'>Subject bloodstream toxin level minimal</span>", fire_loss > 50 ? "<span class='warning'> Severe burn damage detected</span>" : "<span class='info'>Subject burn injury status O.K</span>", brute_loss > 50 ? "<span class='warning'> Severe anatomical damage detected</span>" : "<span class='info'>Subject brute-force injury status O.K</span>"), 1)
|
||||
|
||||
if(M.getStaminaLoss())
|
||||
user.show_message(text("<span class='info'>Subject appears to be suffering from fatigue.</span>"), 1)
|
||||
user.show_message("<span class='info'>Subject appears to be suffering from fatigue.</span>", 1)
|
||||
|
||||
if (M.getCloneLoss())
|
||||
user.show_message(text("<span class='alert'>Subject appears to have been imperfectly cloned.</span>"), 1)
|
||||
user.show_message("<span class='warning'>Subject appears to have been imperfectly cloned.</span>", 1)
|
||||
|
||||
for(var/datum/disease/D in M.viruses)
|
||||
if(!D.hidden[SCANNER])
|
||||
user.show_message(text("<span class='warning'><b>Warning: [D.form] Detected</b>\nName: [D.name].\nType: [D.spread].\nStage: [D.stage]/[D.max_stages].\nPossible Cure: [D.cure]</span>"))
|
||||
user.show_message("<span class='warning'><b>Warning: [D.form] Detected</b>\nName: [D.name].\nType: [D.spread].\nStage: [D.stage]/[D.max_stages].\nPossible Cure: [D.cure]</span>", 1)
|
||||
|
||||
if (M.reagents && M.reagents.get_reagent_amount("inaprovaline"))
|
||||
user.show_message(text("<span class='notice'>Bloodstream Analysis located [M.reagents:get_reagent_amount("inaprovaline")] units of rejuvenation chemicals.</span>"), 1)
|
||||
user.show_message("<span class='notice'>Bloodstream Analysis located [M.reagents:get_reagent_amount("inaprovaline")] units of rejuvenation chemicals.</span>", 1)
|
||||
if (M.getBrainLoss() >= 100 || !M.getorgan(/obj/item/organ/brain))
|
||||
user.show_message(text("<span class='alert'>Subject brain function is non-existant.</span>"), 1)
|
||||
user.show_message("<span class='warning'>Subject brain function is non-existant.</span>", 1)
|
||||
else if (M.getBrainLoss() >= 60)
|
||||
user.show_message(text("<span class='warning'>Severe brain damage detected. Subject likely to have mental retardation.</span>"), 1)
|
||||
user.show_message("<span class='warning'>Severe brain damage detected. Subject likely to have mental retardation.</span>", 1)
|
||||
else if (M.getBrainLoss() >= 10)
|
||||
user.show_message(text("<span class='warning'>Significant brain damage detected. Subject may have had a concussion.</span>"), 1)
|
||||
user.show_message("<span class='warning'>Significant brain damage detected. Subject may have had a concussion.</span>", 1)
|
||||
|
||||
/obj/item/device/healthanalyzer/verb/toggle_mode()
|
||||
set name = "Switch Verbosity"
|
||||
@@ -193,11 +198,11 @@ MASS SPECTROMETER
|
||||
var/pressure = environment.return_pressure()
|
||||
var/total_moles = environment.total_moles()
|
||||
|
||||
user.show_message("\blue <B>Results:</B>", 1)
|
||||
user.show_message("<span class='info'> <B>Results:</B></span>", 1)
|
||||
if(abs(pressure - ONE_ATMOSPHERE) < 10)
|
||||
user.show_message("\blue Pressure: [round(pressure,0.1)] kPa", 1)
|
||||
user.show_message("<span class='info'> Pressure: [round(pressure,0.1)] kPa</span>", 1)
|
||||
else
|
||||
user.show_message("\red Pressure: [round(pressure,0.1)] kPa", 1)
|
||||
user.show_message("<span class='warning'> Pressure: [round(pressure,0.1)] kPa</span>", 1)
|
||||
if(total_moles)
|
||||
var/o2_concentration = environment.oxygen/total_moles
|
||||
var/n2_concentration = environment.nitrogen/total_moles
|
||||
@@ -206,27 +211,27 @@ MASS SPECTROMETER
|
||||
|
||||
var/unknown_concentration = 1-(o2_concentration+n2_concentration+co2_concentration+plasma_concentration)
|
||||
if(abs(n2_concentration - N2STANDARD) < 20)
|
||||
user.show_message("\blue Nitrogen: [round(n2_concentration*100)]%", 1)
|
||||
user.show_message("<span class='info'> Nitrogen: [round(n2_concentration*100)]%</span>", 1)
|
||||
else
|
||||
user.show_message("\red Nitrogen: [round(n2_concentration*100)]%", 1)
|
||||
user.show_message("<span class='warning'> Nitrogen: [round(n2_concentration*100)]%</span>", 1)
|
||||
|
||||
if(abs(o2_concentration - O2STANDARD) < 2)
|
||||
user.show_message("\blue Oxygen: [round(o2_concentration*100)]%", 1)
|
||||
user.show_message("<span class='info'> Oxygen: [round(o2_concentration*100)]%</span>", 1)
|
||||
else
|
||||
user.show_message("\red Oxygen: [round(o2_concentration*100)]%", 1)
|
||||
user.show_message("<span class='warning'> Oxygen: [round(o2_concentration*100)]%</span>", 1)
|
||||
|
||||
if(co2_concentration > 0.01)
|
||||
user.show_message("\red CO2: [round(co2_concentration*100)]%", 1)
|
||||
user.show_message("<span class='warning'> CO2: [round(co2_concentration*100)]%</span>", 1)
|
||||
else
|
||||
user.show_message("\blue CO2: [round(co2_concentration*100)]%", 1)
|
||||
user.show_message("<span class='info'> CO2: [round(co2_concentration*100)]%</span>", 1)
|
||||
|
||||
if(plasma_concentration > 0.01)
|
||||
user.show_message("\red Plasma: [round(plasma_concentration*100)]%", 1)
|
||||
user.show_message("<span class='info'> Plasma: [round(plasma_concentration*100)]%</span>", 1)
|
||||
|
||||
if(unknown_concentration > 0.01)
|
||||
user.show_message("\red Unknown: [round(unknown_concentration*100)]%", 1)
|
||||
user.show_message("<span class='warning'> Unknown: [round(unknown_concentration*100)]%</span>", 1)
|
||||
|
||||
user.show_message("\blue Temperature: [round(environment.temperature-T0C)]°C", 1)
|
||||
user.show_message("<span class='info'> Temperature: [round(environment.temperature-T0C)]°C</span>", 1)
|
||||
|
||||
src.add_fingerprint(user)
|
||||
return
|
||||
@@ -262,17 +267,17 @@ MASS SPECTROMETER
|
||||
if (user.stat)
|
||||
return
|
||||
if (crit_fail)
|
||||
user << "\red This device has critically failed and is no longer functional!"
|
||||
user << "<span class='warning'> This device has critically failed and is no longer functional!</span>"
|
||||
return
|
||||
if (!(istype(user, /mob/living/carbon/human) || ticker) && ticker.mode.name != "monkey")
|
||||
user << "\red You don't have the dexterity to do this!"
|
||||
user << "<span class='warning'> You don't have the dexterity to do this!</span>"
|
||||
return
|
||||
if(reagents.total_volume)
|
||||
var/list/blood_traces = list()
|
||||
for(var/datum/reagent/R in reagents.reagent_list)
|
||||
if(R.id != "blood")
|
||||
reagents.clear_reagents()
|
||||
user << "\red The sample was contaminated! Please insert another sample"
|
||||
user.show_message("<span class='warning'> The sample was contaminated! Please insert another sample.</span>", 1)
|
||||
return
|
||||
else
|
||||
blood_traces = params2list(R.data["trace_chem"])
|
||||
@@ -317,31 +322,31 @@ MASS SPECTROMETER
|
||||
|
||||
/obj/item/device/slime_scanner/attack(mob/living/M as mob, mob/living/user as mob)
|
||||
if (!isslime(M))
|
||||
user << "<B>This device can only scan slimes!</B>"
|
||||
user.show_message("<span class='warning'>This device can only scan slimes!</span>", 1)
|
||||
return
|
||||
var/mob/living/carbon/slime/T = M
|
||||
user.show_message("Slime scan results:")
|
||||
user.show_message(text("[T.colour] [] slime", T.is_adult ? "adult" : "baby"))
|
||||
user.show_message(text("Nutrition: [T.nutrition]/[]", T.get_max_nutrition()))
|
||||
user.show_message("Slime scan results:", 1)
|
||||
user.show_message(text("[T.colour] [] slime", T.is_adult ? "adult" : "baby"), 1)
|
||||
user.show_message(text("Nutrition: [T.nutrition]/[]", T.get_max_nutrition()), 1)
|
||||
if (T.nutrition < T.get_starve_nutrition())
|
||||
user.show_message("<span class='alert'>Warning: slime is starving!</span>")
|
||||
user.show_message("<span class='warning'>Warning: slime is starving!</span>", 1)
|
||||
else if (T.nutrition < T.get_hunger_nutrition())
|
||||
user.show_message("<span class='warning'>Warning: slime is hungry</span>")
|
||||
user.show_message("Electric change strength: [T.powerlevel]")
|
||||
user.show_message("Health: [T.health]")
|
||||
user.show_message("<span class='warning'>Warning: slime is hungry</span>", 1)
|
||||
user.show_message("Electric change strength: [T.powerlevel]", 1)
|
||||
user.show_message("Health: [T.health]", 1)
|
||||
if (T.slime_mutation[4] == T.colour)
|
||||
user.show_message("This slime does not evolve any further")
|
||||
user.show_message("This slime does not evolve any further.", 1)
|
||||
else
|
||||
if (T.slime_mutation[3] == T.slime_mutation[4])
|
||||
if (T.slime_mutation[2] == T.slime_mutation[1])
|
||||
user.show_message(text("Possible mutation: []", T.slime_mutation[3]))
|
||||
user.show_message("Genetic destability: [T.mutation_chance/2]% chance of mutation on splitting")
|
||||
user.show_message("Possible mutation: [T.slime_mutation[3]]", 1)
|
||||
user.show_message("Genetic destability: [T.mutation_chance/2]% chance of mutation on splitting", 1)
|
||||
else
|
||||
user.show_message(text("Possible mutations: [], [], [] (x2)", T.slime_mutation[1], T.slime_mutation[2], T.slime_mutation[3]))
|
||||
user.show_message("Genetic destability: [T.mutation_chance]% chance of mutation on splitting")
|
||||
user.show_message("Possible mutations: [T.slime_mutation[1]], [T.slime_mutation[2]], [T.slime_mutation[3]] (x2)", 1)
|
||||
user.show_message("Genetic destability: [T.mutation_chance]% chance of mutation on splitting", 1)
|
||||
else
|
||||
user.show_message(text("Possible mutations: [], [], [], []", T.slime_mutation[1], T.slime_mutation[2], T.slime_mutation[3], T.slime_mutation[4]))
|
||||
user.show_message("Genetic destability: [T.mutation_chance]% chance of mutation on splitting")
|
||||
user.show_message("Possible mutations: [T.slime_mutation[1]], [T.slime_mutation[2]], [T.slime_mutation[3]], [T.slime_mutation[4]]", 1)
|
||||
user.show_message("Genetic destability: [T.mutation_chance]% chance of mutation on splitting", 1)
|
||||
if (T.cores > 1)
|
||||
user.show_message("Anomalious slime core amount detected")
|
||||
user.show_message("Growth progress: [T.amount_grown]/10")
|
||||
user.show_message("Anomalious slime core amount detected", 1)
|
||||
user.show_message("Growth progress: [T.amount_grown]/10", 1)
|
||||
|
||||
@@ -104,14 +104,18 @@
|
||||
/obj/item/robot_parts/robot_suit/attackby(obj/item/W as obj, mob/user as mob)
|
||||
..()
|
||||
if(istype(W, /obj/item/stack/sheet/metal) && !l_arm && !r_arm && !l_leg && !r_leg && !chest && !head)
|
||||
var/obj/item/weapon/ed209_assembly/B = new /obj/item/weapon/ed209_assembly
|
||||
B.loc = get_turf(src)
|
||||
user << "You armed the robot frame"
|
||||
W:use(1)
|
||||
if (user.get_inactive_hand()==src)
|
||||
user.unEquip(src)
|
||||
user.put_in_inactive_hand(B)
|
||||
qdel(src)
|
||||
var/obj/item/stack/sheet/metal/M = W
|
||||
if (M.use(1))
|
||||
var/obj/item/weapon/ed209_assembly/B = new /obj/item/weapon/ed209_assembly
|
||||
B.loc = get_turf(src)
|
||||
user << "<span class='notice'>You armed the robot frame.</span>"
|
||||
if (user.get_inactive_hand()==src)
|
||||
user.unEquip(src)
|
||||
user.put_in_inactive_hand(B)
|
||||
qdel(src)
|
||||
else
|
||||
user << "<span class='warning'>You need one sheet of metal to start building ED-209.</span>"
|
||||
return
|
||||
if(istype(W, /obj/item/robot_parts/l_leg))
|
||||
if(src.l_leg) return
|
||||
user.drop_item()
|
||||
@@ -313,13 +317,14 @@
|
||||
user << "\blue You insert the cell!"
|
||||
if(istype(W, /obj/item/stack/cable_coil))
|
||||
if(src.wires)
|
||||
user << "\blue You have already inserted wire!"
|
||||
user << "<span class='warning'>You have already inserted wire.</span>"
|
||||
return
|
||||
else
|
||||
var/obj/item/stack/cable_coil/coil = W
|
||||
coil.use(1)
|
||||
var/obj/item/stack/cable_coil/coil = W
|
||||
if (coil.use(1))
|
||||
src.wires = 1.0
|
||||
user << "\blue You insert the wire!"
|
||||
user << "<span class='notice'>You insert the wire.</span>"
|
||||
else
|
||||
user << "<span class='warning'>You need one length of coil to wire it.</span>"
|
||||
return
|
||||
|
||||
/obj/item/robot_parts/head/attackby(obj/item/W as obj, mob/user as mob)
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
if (istype(W, /obj/item/weapon/weldingtool))
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
|
||||
if(amount < 2)
|
||||
if(get_amount() < 2)
|
||||
user << "\red You need at least two rods to do this."
|
||||
return
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
else
|
||||
return 1
|
||||
else
|
||||
if(amount < 2)
|
||||
if(get_amount() < 2)
|
||||
user << "\blue You need at least two rods to do this."
|
||||
return
|
||||
usr << "\blue Assembling grille..."
|
||||
@@ -68,3 +68,5 @@
|
||||
|
||||
/obj/item/stack/rods/cyborg/
|
||||
m_amt = 0
|
||||
is_cyborg = 1
|
||||
cost = 250
|
||||
@@ -16,6 +16,10 @@
|
||||
g_amt = MINERAL_MATERIAL_AMOUNT
|
||||
origin_tech = "materials=1"
|
||||
|
||||
/obj/item/stack/sheet/glass/cyborg
|
||||
g_amt = 0
|
||||
is_cyborg = 1
|
||||
cost = 500
|
||||
|
||||
/obj/item/stack/sheet/glass/attack_self(mob/user as mob)
|
||||
construct_window(user)
|
||||
@@ -23,28 +27,32 @@
|
||||
/obj/item/stack/sheet/glass/attackby(obj/item/W, mob/user)
|
||||
..()
|
||||
add_fingerprint(user)
|
||||
if(istype(W,/obj/item/stack/cable_coil))
|
||||
if(istype(W, /obj/item/stack/cable_coil))
|
||||
var/obj/item/stack/cable_coil/CC = W
|
||||
if(CC.amount < 5)
|
||||
user << "\b There is not enough wire in this coil. You need 5 lengths."
|
||||
if (get_amount() < 1 || CC.get_amount() < 5)
|
||||
user << "<span class='warning>You need five lengths of coil and one sheet of glass to make wired glass.</span>"
|
||||
return
|
||||
CC.use(5)
|
||||
user << "\blue You attach wire to the [name]."
|
||||
use(1)
|
||||
user << "<span class='notice'>You attach wire to the [name].</span>"
|
||||
var/obj/item/stack/light_w/new_tile = new(user.loc)
|
||||
new_tile.add_fingerprint(user)
|
||||
src.use(1)
|
||||
else if( istype(W, /obj/item/stack/rods) )
|
||||
var/obj/item/stack/rods/V = W
|
||||
var/obj/item/stack/sheet/rglass/RG = new (user.loc)
|
||||
RG.add_fingerprint(user)
|
||||
RG.add_to_stacks(user)
|
||||
V.use(1)
|
||||
var/obj/item/stack/sheet/glass/G = src
|
||||
src = null
|
||||
var/replace = (user.get_inactive_hand()==G)
|
||||
G.use(1)
|
||||
if (!G && !RG && replace)
|
||||
user.put_in_hands(RG)
|
||||
else if(istype(W, /obj/item/stack/rods))
|
||||
var/obj/item/stack/rods/V = W
|
||||
if (V.get_amount() >= 1 && src.get_amount() >= 1)
|
||||
var/obj/item/stack/sheet/rglass/RG = new (user.loc)
|
||||
RG.add_fingerprint(user)
|
||||
RG.add_to_stacks(user)
|
||||
var/obj/item/stack/sheet/glass/G = src
|
||||
src = null
|
||||
var/replace = (user.get_inactive_hand()==G)
|
||||
V.use(1)
|
||||
G.use(1)
|
||||
if (!G && replace)
|
||||
user.put_in_hands(RG)
|
||||
else
|
||||
user << "<span class='warning'>You need one rod and one sheet of glass to make reinforced glass.</span>"
|
||||
return
|
||||
else
|
||||
return ..()
|
||||
|
||||
@@ -55,7 +63,7 @@
|
||||
user << "\red You don't have the dexterity to do this!"
|
||||
return 0
|
||||
var/title = "Sheet-Glass"
|
||||
title += " ([src.amount] sheet\s left)"
|
||||
title += " ([src.get_amount()] sheet\s left)"
|
||||
switch(alert(title, "Would you like full tile glass or one direction?", "One Direction", "Full Window", "Cancel", null))
|
||||
if("One Direction")
|
||||
if(!src) return 1
|
||||
@@ -95,7 +103,7 @@
|
||||
if("Full Window")
|
||||
if(!src) return 1
|
||||
if(src.loc != user) return 1
|
||||
if(src.amount < 2)
|
||||
if(src.get_amount() < 2)
|
||||
user << "\red You need more glass to do that."
|
||||
return 1
|
||||
if(locate(/obj/structure/window) in user.loc)
|
||||
@@ -121,16 +129,29 @@
|
||||
singular_name = "reinforced glass sheet"
|
||||
icon_state = "sheet-rglass"
|
||||
g_amt = MINERAL_MATERIAL_AMOUNT
|
||||
m_amt = 1000
|
||||
m_amt = MINERAL_MATERIAL_AMOUNT / 2
|
||||
origin_tech = "materials=2"
|
||||
|
||||
/obj/item/stack/sheet/rglass/cyborg
|
||||
name = "reinforced glass"
|
||||
desc = "Glass which seems to have rods or something stuck in them."
|
||||
singular_name = "reinforced glass sheet"
|
||||
icon_state = "sheet-rglass"
|
||||
g_amt = 0
|
||||
m_amt = 0
|
||||
var/datum/robot_energy_storage/metsource
|
||||
var/datum/robot_energy_storage/glasource
|
||||
var/metcost = 250
|
||||
var/glacost = 500
|
||||
|
||||
/obj/item/stack/sheet/rglass/cyborg/get_amount()
|
||||
return min(round(metsource.energy / metcost), round(glasource.energy / glacost))
|
||||
|
||||
/obj/item/stack/sheet/rglass/cyborg/use(var/amount) // Requires special checks, because it uses two storages
|
||||
metsource.use_charge(amount * metcost)
|
||||
glasource.use_charge(amount * glacost)
|
||||
return
|
||||
|
||||
/obj/item/stack/sheet/rglass/cyborg/add(var/amount)
|
||||
metsource.add_charge(amount * metcost)
|
||||
glasource.add_charge(amount * glacost)
|
||||
return
|
||||
|
||||
/obj/item/stack/sheet/rglass/attack_self(mob/user as mob)
|
||||
construct_window(user)
|
||||
@@ -142,7 +163,7 @@
|
||||
user << "\red You don't have the dexterity to do this!"
|
||||
return 0
|
||||
var/title = "Sheet Reinf. Glass"
|
||||
title += " ([src.amount] sheet\s left)"
|
||||
title += " ([src.get_amount()] sheet\s left)"
|
||||
switch(input(title, "Would you like full tile glass a one direction glass pane or a windoor?") in list("One Direction", "Full Window", "Windoor", "Cancel"))
|
||||
if("One Direction")
|
||||
if(!src) return 1
|
||||
@@ -182,7 +203,7 @@
|
||||
if("Full Window")
|
||||
if(!src) return 1
|
||||
if(src.loc != user) return 1
|
||||
if(src.amount < 2)
|
||||
if(src.get_amount() < 2)
|
||||
user << "<span class='warning'>You need more glass to do that.</span>"
|
||||
return 1
|
||||
if(locate(/obj/structure/window) in user.loc)
|
||||
@@ -208,7 +229,7 @@
|
||||
user << "<span class='warning'>There is already a windoor in that location.</span>"
|
||||
return 1
|
||||
|
||||
if(src.amount < 5)
|
||||
if(src.get_amount() < 5)
|
||||
user << "<span class='warning'>You need more glass to do that.</span>"
|
||||
return 1
|
||||
|
||||
|
||||
@@ -24,15 +24,13 @@
|
||||
user.unEquip(src, 1)
|
||||
qdel(src)
|
||||
|
||||
if(istype(O,/obj/item/stack/sheet/metal))
|
||||
if(istype(O, /obj/item/stack/sheet/metal))
|
||||
var/obj/item/stack/sheet/metal/M = O
|
||||
M.amount--
|
||||
if(M.amount <= 0)
|
||||
user.unEquip(M, 1)
|
||||
qdel(M)
|
||||
amount--
|
||||
var/obj/item/stack/tile/light/L = new (user.loc)
|
||||
L.add_fingerprint(user)
|
||||
if(amount <= 0)
|
||||
user.unEquip(src, 1)
|
||||
qdel(src)
|
||||
if (M.use(1))
|
||||
use(1)
|
||||
var/obj/item/stack/tile/light/L = new (user.loc)
|
||||
user << "<span class='notice'>You make a light tile.</span>"
|
||||
L.add_fingerprint(user)
|
||||
else
|
||||
user << "<span class='warning'>You need one metal sheet to finish the light tile.</span>"
|
||||
return
|
||||
|
||||
@@ -55,6 +55,8 @@ var/global/list/datum/stack_recipe/metal_recipes = list ( \
|
||||
|
||||
/obj/item/stack/sheet/metal/cyborg
|
||||
m_amt = 0
|
||||
is_cyborg = 1
|
||||
cost = 500
|
||||
|
||||
/obj/item/stack/sheet/metal/New(var/loc, var/amount=null)
|
||||
recipes = metal_recipes
|
||||
|
||||
@@ -14,14 +14,19 @@
|
||||
var/singular_name
|
||||
var/amount = 1
|
||||
var/max_amount //also see stack recipes initialisation, param "max_res_amount" must be equal to this max_amount
|
||||
var/is_cyborg = 0 // It's 1 if module is used by a cyborg, and uses its storage
|
||||
var/datum/robot_energy_storage/source
|
||||
var/cost = 1 // How much energy from storage it costs
|
||||
|
||||
/obj/item/stack/New(var/loc, var/amount=null)
|
||||
..()
|
||||
if (amount)
|
||||
src.amount=amount
|
||||
src.amount = amount
|
||||
return
|
||||
|
||||
/obj/item/stack/Destroy()
|
||||
if (is_cyborg)
|
||||
return // Not supposed to be destroyed
|
||||
if (usr && usr.machine==src)
|
||||
usr << browse(null, "window=stack")
|
||||
..()
|
||||
@@ -29,27 +34,39 @@
|
||||
/obj/item/stack/examine()
|
||||
set src in view(1)
|
||||
..()
|
||||
if(src.singular_name)
|
||||
if(src.amount>1)
|
||||
usr << "There are [src.amount] [src.singular_name]\s in the stack."
|
||||
if (is_cyborg)
|
||||
if(src.singular_name)
|
||||
usr << "There is enough energy for [src.get_amount()] [src.singular_name]\s."
|
||||
else
|
||||
usr << "There is [src.amount] [src.singular_name] in the stack."
|
||||
else if(src.amount>1)
|
||||
usr << "There are [src.amount] in the stack."
|
||||
usr << "There is enough energy for [src.get_amount()]."
|
||||
return
|
||||
if(src.singular_name)
|
||||
if(src.get_amount()>1)
|
||||
usr << "There are [src.get_amount()] [src.singular_name]\s in the stack."
|
||||
else
|
||||
usr << "There is [src.get_amount()] [src.singular_name] in the stack."
|
||||
else if(src.get_amount()>1)
|
||||
usr << "There are [src.get_amount()] in the stack."
|
||||
else
|
||||
usr << "There is [src.amount] in the stack."
|
||||
usr << "There is [src.get_amount()] in the stack."
|
||||
return
|
||||
|
||||
/obj/item/stack/proc/get_amount()
|
||||
if (is_cyborg)
|
||||
return round(source.energy / cost)
|
||||
else
|
||||
return (amount)
|
||||
|
||||
/obj/item/stack/attack_self(mob/user as mob)
|
||||
interact(user)
|
||||
|
||||
/obj/item/stack/interact(mob/user as mob)
|
||||
if (!recipes)
|
||||
return
|
||||
if (!src || amount<=0)
|
||||
if (!src || get_amount() <= 0)
|
||||
user << browse(null, "window=stack")
|
||||
user.set_machine(src) //for correct work of onclose
|
||||
var/t1 = text("<HTML><HEAD><title>Constructions from []</title></HEAD><body><TT>Amount Left: []<br>", src, src.amount)
|
||||
var/t1 = text("<HTML><HEAD><title>Constructions from []</title></HEAD><body><TT>Amount Left: []<br>", src, src.get_amount())
|
||||
for(var/i=1;i<=recipes.len,i++)
|
||||
var/datum/stack_recipe/R = recipes[i]
|
||||
if (isnull(R))
|
||||
@@ -57,7 +74,7 @@
|
||||
continue
|
||||
if (i>1 && !isnull(recipes[i-1]))
|
||||
t1+="<br>"
|
||||
var/max_multiplier = round(src.amount / R.req_amount)
|
||||
var/max_multiplier = round(src.get_amount() / R.req_amount)
|
||||
var/title as text
|
||||
var/can_build = 1
|
||||
can_build = can_build && (max_multiplier>0)
|
||||
@@ -97,12 +114,12 @@
|
||||
if ((usr.restrained() || usr.stat || usr.get_active_hand() != src))
|
||||
return
|
||||
if (href_list["make"])
|
||||
if (src.amount < 1) qdel(src) //Never should happen
|
||||
if (src.get_amount() < 1) qdel(src) //Never should happen
|
||||
|
||||
var/datum/stack_recipe/R = recipes[text2num(href_list["make"])]
|
||||
var/multiplier = text2num(href_list["multiplier"])
|
||||
if (!multiplier) multiplier = 1
|
||||
if (src.amount < R.req_amount*multiplier)
|
||||
if (src.get_amount() < R.req_amount*multiplier)
|
||||
if (R.req_amount*multiplier>1)
|
||||
usr << "\red You haven't got enough [src] to build \the [R.req_amount*multiplier] [R.title]\s!"
|
||||
else
|
||||
@@ -118,22 +135,17 @@
|
||||
usr << "\blue Building [R.title] ..."
|
||||
if (!do_after(usr, R.time))
|
||||
return
|
||||
if (src.amount < R.req_amount*multiplier)
|
||||
if (src.get_amount() < R.req_amount*multiplier)
|
||||
return
|
||||
var/atom/O = new R.result_type( usr.loc )
|
||||
O.dir = usr.dir
|
||||
if (R.max_res_amount>1)
|
||||
if (R.max_res_amount > 1)
|
||||
var/obj/item/stack/new_item = O
|
||||
new_item.amount = R.res_amount*multiplier
|
||||
//new_item.add_to_stacks(usr)
|
||||
src.amount-=R.req_amount*multiplier
|
||||
if (src.amount<=0)
|
||||
var/oldsrc = src
|
||||
src = null //dont kill proc after del()
|
||||
usr.unEquip(oldsrc, 1)
|
||||
qdel(oldsrc)
|
||||
if (istype(O,/obj/item))
|
||||
usr.put_in_hands(O)
|
||||
new_item.add_to_stacks(usr)
|
||||
use(R.req_amount * multiplier)
|
||||
if (istype(O,/obj/item))
|
||||
usr.put_in_hands(O)
|
||||
O.add_fingerprint(usr)
|
||||
//BubbleWrap - so newly formed boxes are empty
|
||||
if ( istype(O, /obj/item/weapon/storage) )
|
||||
@@ -146,15 +158,23 @@
|
||||
return
|
||||
return
|
||||
|
||||
/obj/item/stack/proc/use(var/amount)
|
||||
src.amount-=amount
|
||||
if (src.amount<=0)
|
||||
var/oldsrc = src
|
||||
src = null //dont kill proc after del()
|
||||
/obj/item/stack/proc/use(var/used) // return 0 = borked; return 1 = had enough
|
||||
if (is_cyborg)
|
||||
return source.use_charge(used * cost)
|
||||
if (amount < used)
|
||||
return 0
|
||||
amount -= used
|
||||
if (amount <= 0)
|
||||
if(usr)
|
||||
usr.unEquip(oldsrc, 1)
|
||||
qdel(oldsrc)
|
||||
return
|
||||
usr.unEquip(src, 1)
|
||||
qdel(src)
|
||||
return 1
|
||||
|
||||
/obj/item/stack/proc/add(var/amount)
|
||||
if (is_cyborg)
|
||||
source.add_charge(amount * cost)
|
||||
else
|
||||
src.amount += amount
|
||||
|
||||
/obj/item/stack/proc/add_to_stacks(mob/usr as mob)
|
||||
var/obj/item/stack/oldsrc = src
|
||||
@@ -189,19 +209,28 @@
|
||||
..()
|
||||
if (istype(W, src.type))
|
||||
var/obj/item/stack/S = W
|
||||
if (S.amount >= max_amount)
|
||||
return 1
|
||||
var/to_transfer as num
|
||||
if (user.get_inactive_hand()==src)
|
||||
to_transfer = 1
|
||||
if (S.is_cyborg)
|
||||
var/to_transfer = min(src.amount, round((S.source.max_energy - S.source.energy) / S.cost))
|
||||
S.add(to_transfer)
|
||||
if (S && usr.machine==S)
|
||||
spawn(0) S.interact(usr)
|
||||
src.use(to_transfer)
|
||||
if (src && usr.machine==src)
|
||||
spawn(0) src.interact(usr)
|
||||
else
|
||||
to_transfer = min(src.amount, S.max_amount-S.amount)
|
||||
S.amount+=to_transfer
|
||||
if (S && usr.machine==S)
|
||||
spawn(0) S.interact(usr)
|
||||
src.use(to_transfer)
|
||||
if (src && usr.machine==src)
|
||||
spawn(0) src.interact(usr)
|
||||
if (S.amount >= max_amount)
|
||||
return 1
|
||||
var/to_transfer as num
|
||||
if (user.get_inactive_hand()==src)
|
||||
to_transfer = 1
|
||||
else
|
||||
to_transfer = min(src.amount, S.max_amount-S.amount)
|
||||
S.amount+=to_transfer
|
||||
if (S && usr.machine==S)
|
||||
spawn(0) S.interact(usr)
|
||||
src.use(to_transfer)
|
||||
if (src && usr.machine==src)
|
||||
spawn(0) src.interact(usr)
|
||||
else return ..()
|
||||
|
||||
/obj/item/stack/proc/copy_evidences(obj/item/stack/from as obj)
|
||||
|
||||
@@ -15,7 +15,8 @@
|
||||
/obj/item/stack/tile/plasteel/cyborg
|
||||
desc = "The ground you walk on" //Not the usual floor tile desc as that refers to throwing, Cyborgs can't do that - RR
|
||||
m_amt = 0 // All other Borg versions of items have no Metal or Glass - RR
|
||||
max_amount = 50
|
||||
is_cyborg = 1
|
||||
cost = 125
|
||||
|
||||
/obj/item/stack/tile/plasteel/New(var/loc, var/amount=null)
|
||||
..()
|
||||
@@ -28,7 +29,7 @@
|
||||
if (istype(W, /obj/item/weapon/weldingtool))
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
|
||||
if(amount < 4)
|
||||
if(get_amount() < 4)
|
||||
user << "\red You need at least four tiles to do this."
|
||||
return
|
||||
|
||||
|
||||
@@ -279,8 +279,8 @@ AI MODULES
|
||||
/********************* Custom *********************/
|
||||
|
||||
/obj/item/weapon/aiModule/core/full/custom
|
||||
name = "Custom Core AI Module"
|
||||
desc = "A core AI module that is adjusted to fit each station's needs."
|
||||
name = "Default Core AI Module"
|
||||
desc = "A core AI module custom-made for each station by Nanotrasen."
|
||||
origin_tech = "programming=3;materials=4" //Should be the same as asimov, considering that this is the "default" lawset.
|
||||
|
||||
/obj/item/weapon/aiModule/core/full/custom/New()
|
||||
|
||||
@@ -30,29 +30,44 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
var/turf/location = get_turf(src)
|
||||
smoketime--
|
||||
if(smoketime < 1)
|
||||
matchburnout()
|
||||
return
|
||||
if(location)
|
||||
location.hotspot_expose(700, 5)
|
||||
return
|
||||
|
||||
/obj/item/weapon/match/fire_act()
|
||||
matchignite()
|
||||
|
||||
/obj/item/weapon/match/proc/matchignite()
|
||||
if(lit == 0)
|
||||
lit = 1
|
||||
icon_state = "match_lit"
|
||||
damtype = "fire"
|
||||
force = 3
|
||||
hitsound = 'sound/items/welder.ogg'
|
||||
item_state = "cigon"
|
||||
name = "lit match"
|
||||
desc = "A match. This one is lit."
|
||||
attack_verb = list("burnt","singed")
|
||||
processing_objects.Add(src)
|
||||
update_icon()
|
||||
return
|
||||
|
||||
/obj/item/weapon/match/proc/matchburnout()
|
||||
if(lit == 1)
|
||||
lit = -1
|
||||
damtype = "brute"
|
||||
force = 0
|
||||
force = initial(force)
|
||||
icon_state = "match_burnt"
|
||||
item_state = "cigoff"
|
||||
name = "burnt match"
|
||||
desc = "A match. This one has seen better days."
|
||||
attack_verb = null
|
||||
processing_objects.Remove(src)
|
||||
return
|
||||
if(location)
|
||||
location.hotspot_expose(700, 5)
|
||||
return
|
||||
|
||||
/obj/item/weapon/match/dropped(mob/user as mob)
|
||||
if(lit == 1)
|
||||
lit = -1
|
||||
damtype = "brute"
|
||||
icon_state = "match_burnt"
|
||||
item_state = "cigoff"
|
||||
name = "burnt match"
|
||||
desc = "A match. This one has seen better days."
|
||||
attack_verb = null
|
||||
matchburnout()
|
||||
return ..()
|
||||
|
||||
//////////////////
|
||||
@@ -78,7 +93,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
/obj/item/clothing/mask/cigarette/New()
|
||||
..()
|
||||
flags |= NOREACT // so it doesn't react until you light it
|
||||
create_reagents(chem_volume) // making the cigarrete a chemical holder with a maximum volume of 15
|
||||
create_reagents(chem_volume) // making the cigarette a chemical holder with a maximum volume of 15
|
||||
|
||||
/obj/item/clothing/mask/cigarette/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
..()
|
||||
@@ -120,7 +135,6 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
light("<span class='notice'>[user] lights their [name] with [W].</span>")
|
||||
return
|
||||
|
||||
|
||||
/obj/item/clothing/mask/cigarette/afterattack(obj/item/weapon/reagent_containers/glass/glass, mob/user as mob, proximity)
|
||||
if(!proximity) return
|
||||
if(istype(glass)) //you can dip cigarettes into beakers
|
||||
@@ -134,15 +148,14 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
user << "<span class='notice'>[src] is full.</span>"
|
||||
|
||||
|
||||
/obj/item/clothing/mask/cigarette/proc/light(var/flavor_text = "[usr] lights the [name].")
|
||||
/obj/item/clothing/mask/cigarette/proc/light(var/flavor_text = null)
|
||||
if(!src.lit)
|
||||
src.lit = 1
|
||||
name = "lit [name]"
|
||||
if(!istype(src, /obj/item/clothing/mask/cigarette/pipe)) //can't burn people with pipes
|
||||
attack_verb = list("burnt", "singed")
|
||||
hitsound = 'sound/items/welder.ogg'
|
||||
damtype = "fire"
|
||||
force = 4
|
||||
attack_verb = list("burnt", "singed")
|
||||
hitsound = 'sound/items/welder.ogg'
|
||||
damtype = "fire"
|
||||
force = 4
|
||||
if(reagents.get_reagent_amount("plasma")) // the plasma explodes when exposed to fire
|
||||
var/datum/effect/effect/system/reagents_explosion/e = new()
|
||||
e.set_up(round(reagents.get_reagent_amount("plasma") / 2.5, 1), get_turf(src), 0, 0)
|
||||
@@ -165,8 +178,9 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
reagents.handle_reactions()
|
||||
icon_state = icon_on
|
||||
item_state = icon_on
|
||||
var/turf/T = get_turf(src)
|
||||
T.visible_message(flavor_text)
|
||||
if(flavor_text)
|
||||
var/turf/T = get_turf(src)
|
||||
T.visible_message(flavor_text)
|
||||
processing_objects.Add(src)
|
||||
|
||||
//can't think of any other way to update the overlays :<
|
||||
@@ -176,6 +190,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
M.update_inv_l_hand(0)
|
||||
M.update_inv_r_hand(0)
|
||||
|
||||
|
||||
/obj/item/clothing/mask/cigarette/proc/handle_reagents()
|
||||
if(iscarbon(loc))
|
||||
var/mob/living/carbon/C = loc
|
||||
@@ -183,10 +198,9 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
if(prob(15)) // so it's not an instarape in case of acid
|
||||
reagents.reaction(C, INGEST)
|
||||
reagents.trans_to(C, REAGENTS_METABOLISM)
|
||||
else
|
||||
reagents.remove_any(REAGENTS_METABOLISM)
|
||||
else
|
||||
reagents.remove_any(REAGENTS_METABOLISM)
|
||||
return
|
||||
reagents.remove_any(REAGENTS_METABOLISM)
|
||||
|
||||
|
||||
/obj/item/clothing/mask/cigarette/process()
|
||||
var/turf/location = get_turf(src)
|
||||
@@ -231,6 +245,9 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/clothing/mask/cigarette/fire_act()
|
||||
light()
|
||||
|
||||
/obj/item/clothing/mask/cigarette/rollie
|
||||
name = "rollie"
|
||||
desc = "A roll of dried plant matter wrapped in thin paper."
|
||||
@@ -536,27 +553,3 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
user << "<span class='warning'>You need to dry this first.</span>"
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/item/weapon/rollingpaperpack
|
||||
name = "rolling paper pack"
|
||||
desc = "A pack of NanoTrasen brand rolling papers."
|
||||
icon = 'icons/obj/cigarettes.dmi'
|
||||
icon_state = "cig_paper_pack"
|
||||
w_class = 1
|
||||
var/papers = 25
|
||||
|
||||
/obj/item/weapon/rollingpaperpack/attack_self(mob/user)
|
||||
if(papers > 1)
|
||||
var/obj/item/weapon/rollingpaper/P = new /obj/item/weapon/rollingpaper(user.loc)
|
||||
user.put_in_inactive_hand(P)
|
||||
user << "You take a paper out of the pack."
|
||||
papers --
|
||||
else
|
||||
var/obj/item/weapon/rollingpaper/P = new /obj/item/weapon/rollingpaper(user.loc)
|
||||
user.put_in_inactive_hand(P)
|
||||
user << "You take the last paper out of the pack, and throw the pack away."
|
||||
qdel(src)
|
||||
|
||||
/obj/item/weapon/rollingpaperpack/examine()
|
||||
..()
|
||||
usr << "There are [src.papers] left"
|
||||
@@ -93,10 +93,13 @@
|
||||
|
||||
else if(stage == EMPTY && istype(I, /obj/item/stack/cable_coil))
|
||||
var/obj/item/stack/cable_coil/C = I
|
||||
C.use(1)
|
||||
det_time = 50 // In case the cable_coil was removed and readded.
|
||||
stage_change(WIRED)
|
||||
user << "<span class='notice'>You rig the [initial(name)] assembly.</span>"
|
||||
if (C.use(1))
|
||||
det_time = 50 // In case the cable_coil was removed and readded.
|
||||
stage_change(WIRED)
|
||||
user << "<span class='notice'>You rig the [initial(name)] assembly.</span>"
|
||||
else
|
||||
user << "<span class='warning'>You need one length of coil to wire the assembly.</span>"
|
||||
return
|
||||
|
||||
else if(stage == READY && istype(I, /obj/item/weapon/wirecutters))
|
||||
stage_change(WIRED)
|
||||
|
||||
@@ -54,20 +54,23 @@
|
||||
if(istype(I, /obj/item/stack/cable_coil))
|
||||
if(assembled == 1)
|
||||
var/obj/item/stack/cable_coil/C = I
|
||||
times = list("5" = 10, "-1" = 20, "[rand(30,80)]" = 50, "[rand(65,180)]" = 20) // "Premature, Dud, Short Fuse, Long Fuse"=[weighting value]
|
||||
C.use(1)
|
||||
assembled = 2
|
||||
user << "<span class='notice'>You wire the igniter to detonate the fuel.</span>"
|
||||
desc = "A weak, improvised incendiary device."
|
||||
overlays += image('icons/obj/grenade.dmi', icon_state = "improvised_grenade_wired")
|
||||
name = "improvised firebomb"
|
||||
active = 0
|
||||
det_time = text2num(pickweight(times))
|
||||
if(det_time < 0) //checking for 'duds'
|
||||
range = 1
|
||||
det_time = rand(30,80)
|
||||
if (C.use(1))
|
||||
times = list("5" = 10, "-1" = 20, "[rand(30,80)]" = 50, "[rand(65,180)]" = 20) // "Premature, Dud, Short Fuse, Long Fuse"=[weighting value]
|
||||
assembled = 2
|
||||
user << "<span class='notice'>You wire the igniter to detonate the fuel.</span>"
|
||||
desc = "A weak, improvised incendiary device."
|
||||
overlays += image('icons/obj/grenade.dmi', icon_state = "improvised_grenade_wired")
|
||||
name = "improvised firebomb"
|
||||
active = 0
|
||||
det_time = text2num(pickweight(times))
|
||||
if(det_time < 0) //checking for 'duds'
|
||||
range = 1
|
||||
det_time = rand(30,80)
|
||||
else
|
||||
range = pick(2,2,2,3,3,3,4)
|
||||
else
|
||||
range = pick(2,2,2,3,3,3,4)
|
||||
user <<"span class='warning'>You need one length of cable to add an igniter.</span>"
|
||||
return
|
||||
|
||||
/obj/item/weapon/grenade/iedcasing/attack_self(mob/user as mob) //
|
||||
if(!active)
|
||||
|
||||
@@ -88,15 +88,15 @@
|
||||
..()
|
||||
if(istype(I, /obj/item/stack/rods))
|
||||
var/obj/item/stack/rods/R = I
|
||||
var/obj/item/weapon/wirerod/W = new /obj/item/weapon/wirerod
|
||||
R.use(1)
|
||||
|
||||
user.unEquip(src)
|
||||
|
||||
user.put_in_hands(W)
|
||||
user << "<span class='notice'>You wrap the cable restraint around the top of the rod.</span>"
|
||||
|
||||
qdel(src)
|
||||
if (R.use(1))
|
||||
var/obj/item/weapon/wirerod/W = new /obj/item/weapon/wirerod
|
||||
user.unEquip(src)
|
||||
user.put_in_hands(W)
|
||||
user << "<span class='notice'>You wrap the cable restraint around the top of the rod.</span>"
|
||||
qdel(src)
|
||||
else
|
||||
user << "<span class='warning'>You need one rod to make a wired rod.</span>"
|
||||
return
|
||||
|
||||
/obj/item/weapon/handcuffs/cyborg/attack(mob/living/carbon/C, mob/user)
|
||||
if(isrobot(user))
|
||||
|
||||
@@ -470,25 +470,15 @@
|
||||
w_class = 1
|
||||
slot_flags = SLOT_BELT
|
||||
|
||||
New()
|
||||
..()
|
||||
for(var/i=1; i <= storage_slots; i++)
|
||||
new /obj/item/weapon/match(src)
|
||||
/obj/item/weapon/storage/box/matches/New()
|
||||
..()
|
||||
for(var/i=1; i <= storage_slots; i++)
|
||||
new /obj/item/weapon/match(src)
|
||||
|
||||
attackby(obj/item/weapon/match/W as obj, mob/user as mob)
|
||||
if(istype(W, /obj/item/weapon/match) && W.lit == 0)
|
||||
W.lit = 1
|
||||
W.icon_state = "match_lit"
|
||||
W.damtype = "fire"
|
||||
W.force = 3
|
||||
W.hitsound = 'sound/items/welder.ogg'
|
||||
W.item_state = "cigon"
|
||||
W.name = "lit match"
|
||||
W.desc = "A match. This one is lit."
|
||||
W.attack_verb = list("burnt","singed")
|
||||
processing_objects.Add(W)
|
||||
W.update_icon()
|
||||
return
|
||||
/obj/item/weapon/storage/box/matches/attackby(obj/item/weapon/match/W as obj, mob/user as mob)
|
||||
if(istype(W, /obj/item/weapon/match))
|
||||
W.matchignite()
|
||||
return
|
||||
|
||||
/obj/item/weapon/storage/box/lights
|
||||
name = "box of replacement bulbs"
|
||||
@@ -525,4 +515,4 @@
|
||||
for(var/i = 0; i < 14; i++)
|
||||
new /obj/item/weapon/light/tube(src)
|
||||
for(var/i = 0; i < 7; i++)
|
||||
new /obj/item/weapon/light/bulb(src)
|
||||
new /obj/item/weapon/light/bulb(src)
|
||||
|
||||
@@ -192,3 +192,28 @@
|
||||
desc = "A packet of six imported DromedaryCo cancer sticks. A label on the packaging reads, \"Wouldn't a slow death make a change?\""
|
||||
icon_state = "Dpacket"
|
||||
item_state = "Dpacket"
|
||||
|
||||
|
||||
/obj/item/weapon/storage/fancy/rollingpapers
|
||||
name = "rolling paper pack"
|
||||
desc = "A pack of NanoTrasen brand rolling papers."
|
||||
w_class = 1
|
||||
icon = 'icons/obj/cigarettes.dmi'
|
||||
icon_state = "cig_paper_pack"
|
||||
storage_slots = 10
|
||||
icon_type = "rolling papers"
|
||||
can_hold = list(/obj/item/weapon/rollingpaper)
|
||||
|
||||
/obj/item/weapon/storage/fancy/rollingpapers/update_icon()
|
||||
if(!contents.len)
|
||||
icon_state = "[initial(icon_state)]0"
|
||||
else
|
||||
icon_state = initial(icon_state)
|
||||
|
||||
desc = "There are [contents.len] papers\s left!"
|
||||
return
|
||||
|
||||
/obj/item/weapon/storage/fancy/rollingpapers/New()
|
||||
..()
|
||||
for(var/i = 1 to storage_slots)
|
||||
new /obj/item/weapon/rollingpaper(src)
|
||||
|
||||
@@ -17,15 +17,15 @@
|
||||
new /obj/item/stack/sheet/metal( user.loc )
|
||||
//SN src = null
|
||||
qdel(src)
|
||||
if (istype(W, /obj/item/stack/rods))
|
||||
var/obj/item/stack/rods/R = W
|
||||
if (R.amount >= 4)
|
||||
if (istype(W, /obj/item/stack/rods))
|
||||
var/obj/item/stack/rods/V = W
|
||||
if (V.use(4))
|
||||
new /obj/item/weapon/table_parts/reinforced( user.loc )
|
||||
user << "<span class='notice'>You reinforce the [name].</span>"
|
||||
R.use(4)
|
||||
qdel(src)
|
||||
else if (R.amount < 4)
|
||||
user << "<span class='notice'>You need at least 4 rods to do that.</span>"
|
||||
else
|
||||
user << "<span class='warning'>You need four rods to reinforce table parts.</span>"
|
||||
return
|
||||
|
||||
/obj/item/weapon/table_parts/attack_self(mob/user as mob)
|
||||
user << "<span class='notice'>Constructing table..</span>"
|
||||
@@ -93,4 +93,4 @@
|
||||
R.add_fingerprint(user)
|
||||
user.drop_item()
|
||||
qdel(src)
|
||||
return
|
||||
return
|
||||
|
||||
@@ -205,13 +205,15 @@
|
||||
air_contents.react()
|
||||
pressure = air_contents.return_pressure()
|
||||
var/range = (pressure-TANK_FRAGMENT_PRESSURE)/TANK_FRAGMENT_SCALE
|
||||
range = min(range, MAX_EX_LIGHT_RANGE)
|
||||
var/turf/epicenter = get_turf(loc)
|
||||
|
||||
//world << "\blue Exploding Pressure: [pressure] kPa, intensity: [range]"
|
||||
|
||||
explosion(epicenter, round(range*0.25), round(range*0.5), round(range), round(range*1.5))
|
||||
qdel(src)
|
||||
if(istype(src.loc,/obj/item/device/transfer_valve))
|
||||
qdel(src.loc)
|
||||
else
|
||||
qdel(src)
|
||||
|
||||
else if(pressure > TANK_RUPTURE_PRESSURE)
|
||||
//world << "\blue[x],[y] tank is rupturing: [pressure] kPa, integrity [integrity]"
|
||||
@@ -237,4 +239,4 @@
|
||||
integrity--
|
||||
|
||||
else if(integrity < 3)
|
||||
integrity++
|
||||
integrity++
|
||||
|
||||
@@ -361,13 +361,17 @@
|
||||
/obj/item/weapon/weldingtool/proc/flamethrower_rods(obj/item/I, mob/user)
|
||||
if(!status)
|
||||
var/obj/item/stack/rods/R = I
|
||||
R.use(1)
|
||||
var/obj/item/weapon/flamethrower/F = new /obj/item/weapon/flamethrower(user.loc)
|
||||
user.unEquip(src)
|
||||
loc = F
|
||||
F.weldtool = src
|
||||
add_fingerprint(user)
|
||||
user.put_in_hands(F)
|
||||
if (R.use(1))
|
||||
var/obj/item/weapon/flamethrower/F = new /obj/item/weapon/flamethrower(user.loc)
|
||||
user.unEquip(src)
|
||||
loc = F
|
||||
F.weldtool = src
|
||||
add_fingerprint(user)
|
||||
user << "<span class='notice'>You add a rod to a welder, starting to build a flamethrower.</span>"
|
||||
user.put_in_hands(F)
|
||||
else
|
||||
user << "<span class='warning'>You need one rod to start building a flamethrower.</span>"
|
||||
return
|
||||
|
||||
/obj/item/weapon/weldingtool/largetank
|
||||
name = "industrial welding tool"
|
||||
|
||||
@@ -338,10 +338,12 @@
|
||||
if(rigged)
|
||||
user << "<span class='notice'>[src] is already rigged!</span>"
|
||||
return
|
||||
user << "<span class='notice'>You rig [src].</span>"
|
||||
user.drop_item()
|
||||
qdel(W)
|
||||
rigged = 1
|
||||
var/obj/item/stack/cable_coil/C = W
|
||||
if (C.use(5))
|
||||
user << "<span class='notice'>You rig [src].</span>"
|
||||
rigged = 1
|
||||
else
|
||||
user << "<span class='warning'>You need 5 lengths of cable to rig [src].</span>"
|
||||
return
|
||||
else if(istype(W, /obj/item/device/radio/electropack))
|
||||
if(rigged)
|
||||
|
||||
@@ -318,8 +318,10 @@ obj/structure/door_assembly
|
||||
/obj/structure/door_assembly/attackby(obj/item/W as obj, mob/user as mob)
|
||||
if(istype(W, /obj/item/weapon/pen))
|
||||
var/t = copytext(stripped_input(user, "Enter the name for the door.", src.name, src.created_name),1,MAX_NAME_LEN)
|
||||
if(!t) return
|
||||
if(!in_range(src, usr) && src.loc != usr) return
|
||||
if(!t)
|
||||
return
|
||||
if(!in_range(src, usr) && src.loc != usr)
|
||||
return
|
||||
created_name = t
|
||||
return
|
||||
|
||||
@@ -343,7 +345,8 @@ obj/structure/door_assembly
|
||||
|
||||
|
||||
icontype = input(user, "Please select a paintjob for this airlock.") in optionlist
|
||||
if((!in_range(src, usr) && src.loc != usr) || !WT.use(user)) return
|
||||
if((!in_range(src, usr) && src.loc != usr) || !WT.use(user))
|
||||
return
|
||||
var/has_solid = 0
|
||||
var/has_glass = 0
|
||||
switch(icontype)
|
||||
@@ -414,7 +417,7 @@ obj/structure/door_assembly
|
||||
|
||||
if(mineral && mineral != "glass")
|
||||
mineral = null //I know this is stupid, but until we change glass to a boolean it's how this code works.
|
||||
user << "\blue You change the paintjob on the airlock assembly."
|
||||
user << "<span class='notice'> You change the paintjob on the airlock assembly.</span>"
|
||||
|
||||
else if(istype(W, /obj/item/weapon/weldingtool) && !anchored )
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
@@ -423,8 +426,9 @@ obj/structure/door_assembly
|
||||
playsound(src.loc, 'sound/items/Welder2.ogg', 50, 1)
|
||||
|
||||
if(do_after(user, 40))
|
||||
if(!src || !WT.isOn()) return
|
||||
user << "\blue You've dissasembled the airlock assembly."
|
||||
if( !WT.isOn() )
|
||||
return
|
||||
user << "<span class='notice'> You've disassembled the airlock assembly.</span>"
|
||||
new /obj/item/stack/sheet/metal(get_turf(src), 4)
|
||||
if (mineral)
|
||||
if (mineral == "glass")
|
||||
@@ -435,7 +439,7 @@ obj/structure/door_assembly
|
||||
new M(get_turf(src))
|
||||
qdel(src)
|
||||
else
|
||||
user << "\blue You need more welding fuel to dissassemble the airlock assembly."
|
||||
user << "<span class='warning'> You need more welding fuel to dissassemble the airlock assembly.</span>"
|
||||
return
|
||||
|
||||
else if(istype(W, /obj/item/weapon/wrench) && !anchored )
|
||||
@@ -443,8 +447,9 @@ obj/structure/door_assembly
|
||||
user.visible_message("[user] secures the airlock assembly to the floor.", "You start to secure the airlock assembly to the floor.")
|
||||
|
||||
if(do_after(user, 40))
|
||||
if(!src) return
|
||||
user << "\blue You've secured the airlock assembly."
|
||||
if( src.anchored )
|
||||
return
|
||||
user << "<span class='notice'> You've secured the airlock assembly.</span>"
|
||||
src.name = "secured airlock assembly"
|
||||
src.anchored = 1
|
||||
|
||||
@@ -452,19 +457,23 @@ obj/structure/door_assembly
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1)
|
||||
user.visible_message("[user] unsecures the airlock assembly from the floor.", "You start to unsecure the airlock assembly from the floor.")
|
||||
if(do_after(user, 40))
|
||||
if(!src) return
|
||||
user << "\blue You've unsecured the airlock assembly."
|
||||
if( !src.anchored )
|
||||
return
|
||||
user << "<span class='notice'> You've unsecured the airlock assembly.</span>"
|
||||
src.name = "airlock assembly"
|
||||
src.anchored = 0
|
||||
|
||||
else if(istype(W, /obj/item/stack/cable_coil) && state == 0 && anchored )
|
||||
var/obj/item/stack/cable_coil/coil = W
|
||||
var/obj/item/stack/cable_coil/C = W
|
||||
if (C.get_amount() < 1)
|
||||
user << "<span class='warning'>You need one length of cable to wire the airlock assembly.</span>"
|
||||
return
|
||||
user.visible_message("[user] wires the airlock assembly.", "You start to wire the airlock assembly.")
|
||||
if(do_after(user, 40))
|
||||
if(!src) return
|
||||
coil.use(1)
|
||||
if(do_after(user, 40))
|
||||
if(C.get_amount() < 1 || state != 0) return
|
||||
C.use(1)
|
||||
src.state = 1
|
||||
user << "\blue You've wired the airlock assembly."
|
||||
user << "<span class='notice'>You've wired the airlock assembly.</span>"
|
||||
src.name = "wired airlock assembly"
|
||||
|
||||
else if(istype(W, /obj/item/weapon/wirecutters) && state == 1 )
|
||||
@@ -472,8 +481,9 @@ obj/structure/door_assembly
|
||||
user.visible_message("[user] cuts the wires from the airlock assembly.", "You start to cut the wires from airlock assembly.")
|
||||
|
||||
if(do_after(user, 40))
|
||||
if(!src) return
|
||||
user << "\blue You've cut the wires from the airlock assembly."
|
||||
if( src.state != 1 )
|
||||
return
|
||||
user << "<span class='notice'> You've cut the wires from the airlock assembly.</span>"
|
||||
new/obj/item/stack/cable_coil(get_turf(user), 1)
|
||||
src.state = 0
|
||||
src.name = "secured airlock assembly"
|
||||
@@ -485,8 +495,9 @@ obj/structure/door_assembly
|
||||
W.loc = src
|
||||
|
||||
if(do_after(user, 40))
|
||||
if(!src) return
|
||||
user << "\blue You've installed the airlock electronics."
|
||||
if( src.state != 1 )
|
||||
return
|
||||
user << "<span class='notice'> You've installed the airlock electronics.</span>"
|
||||
src.state = 2
|
||||
src.name = "near finished airlock assembly"
|
||||
src.electronics = W
|
||||
@@ -500,8 +511,9 @@ obj/structure/door_assembly
|
||||
user.visible_message("[user] removes the electronics from the airlock assembly.", "You start to remove the electronics from the airlock assembly.")
|
||||
|
||||
if(do_after(user, 40))
|
||||
if(!src) return
|
||||
user << "\blue You've removed the airlock electronics."
|
||||
if( src.state != 2 )
|
||||
return
|
||||
user << "<span class='notice'> You've removed the airlock electronics.</span>"
|
||||
src.state = 1
|
||||
src.name = "wired airlock assembly"
|
||||
var/obj/item/weapon/airlock_electronics/ae
|
||||
@@ -514,12 +526,13 @@ obj/structure/door_assembly
|
||||
else if(istype(W, /obj/item/stack/sheet) && !mineral)
|
||||
var/obj/item/stack/sheet/G = W
|
||||
if(G)
|
||||
if(G.amount>=1)
|
||||
if(G.get_amount() >= 1)
|
||||
if(G.type == /obj/item/stack/sheet/rglass)
|
||||
playsound(src.loc, 'sound/items/Crowbar.ogg', 100, 1)
|
||||
user.visible_message("[user] adds [G.name] to the airlock assembly.", "You start to install [G.name] into the airlock assembly.")
|
||||
if(do_after(user, 40))
|
||||
user << "\blue You've installed reinforced glass windows into the airlock assembly."
|
||||
if(do_after(user, 40))
|
||||
if(G.get_amount() < 1 || mineral) return
|
||||
user << "<span class='notice'>You've installed reinforced glass windows into the airlock assembly.</span>"
|
||||
G.use(1)
|
||||
mineral = "glass"
|
||||
name = "near finished window airlock assembly"
|
||||
@@ -537,11 +550,12 @@ obj/structure/door_assembly
|
||||
glass_base_icon_state = "door_as_g[icontext]"
|
||||
else if(istype(G, /obj/item/stack/sheet/mineral))
|
||||
var/M = G.sheettype
|
||||
if(G.amount>=2)
|
||||
if(G.get_amount() >= 2)
|
||||
playsound(src.loc, 'sound/items/Crowbar.ogg', 100, 1)
|
||||
user.visible_message("[user] adds [G.name] to the airlock assembly.", "You start to install [G.name] into the airlock assembly.")
|
||||
if(do_after(user, 40))
|
||||
user << "\blue You've installed [M] plating into the airlock assembly."
|
||||
if(do_after(user, 40))
|
||||
if(G.get_amount() < 2 || mineral) return
|
||||
user << "<span class='notice'>You've installed [M] plating into the airlock assembly.</span>"
|
||||
G.use(2)
|
||||
mineral = "[M]"
|
||||
name = "near finished [M] airlock assembly"
|
||||
@@ -552,11 +566,10 @@ obj/structure/door_assembly
|
||||
|
||||
else if(istype(W, /obj/item/weapon/screwdriver) && state == 2 )
|
||||
playsound(src.loc, 'sound/items/Screwdriver.ogg', 100, 1)
|
||||
user << "\blue You start finishing the airlock."
|
||||
user.visible_message("[user] finishes the airlock.", "You start finishing the airlock.")
|
||||
|
||||
if(do_after(user, 40))
|
||||
if(!src) return
|
||||
user << "\blue You've finished the airlock."
|
||||
user << "<span class='notice'> You've finished the airlock.</span>"
|
||||
var/obj/machinery/door/airlock/door
|
||||
if(mineral == "glass")
|
||||
door = new src.glass_type( src.loc )
|
||||
@@ -580,4 +593,4 @@ obj/structure/door_assembly
|
||||
icon_state = "[base_icon_state][state]"
|
||||
//This updates the icon_state. They are named as "door_as1_eng" where the 1 in that example
|
||||
//represents what state it's in. So the most generic algorithm for the correct updating of
|
||||
//this is simply to change the number.
|
||||
//this is simply to change the number.
|
||||
|
||||
@@ -73,25 +73,29 @@
|
||||
|
||||
if(/obj/item/stack/sheet/metal, /obj/item/stack/sheet/metal/cyborg)
|
||||
if(!anchored)
|
||||
if(S.amount < 2)
|
||||
user << "<span class='warning'>You need at least two sheets to create a false wall.</span>"
|
||||
if (S.use(2))
|
||||
user << "<span class='notice'>You create a false wall! Push on it to open or close the passage.</span>"
|
||||
var/obj/structure/falsewall/F = new (loc)
|
||||
transfer_fingerprints_to(F)
|
||||
qdel(src)
|
||||
else
|
||||
user << "<span class='warning'>You need two sheets of metal to create a false wall.</span>"
|
||||
return
|
||||
S.use(2)
|
||||
user << "<span class='notice'>You create a false wall! Push on it to open or close the passage.</span>"
|
||||
var/obj/structure/falsewall/F = new (loc)
|
||||
transfer_fingerprints_to(F)
|
||||
qdel(src)
|
||||
else
|
||||
if(S.amount < 2) return ..()
|
||||
if(S.get_amount() < 2)
|
||||
user << "<span class='warning'>You need two sheets of metal to finish a wall.</span>"
|
||||
return
|
||||
user << "<span class='notice'>Now adding plating...</span>"
|
||||
if (do_after(user,40))
|
||||
if(!src || !S || S.amount < 2) return
|
||||
if (do_after(user, 40))
|
||||
if(loc == null || S.get_amount() < 2)
|
||||
return
|
||||
S.use(2)
|
||||
user << "<span class='notice'>You added the plating!</span>"
|
||||
var/turf/Tsrc = get_turf(src)
|
||||
Tsrc.ChangeTurf(/turf/simulated/wall)
|
||||
for(var/turf/simulated/wall/X in Tsrc.loc)
|
||||
if(X) transfer_fingerprints_to(X)
|
||||
if(X)
|
||||
transfer_fingerprints_to(X)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
|
||||
@@ -119,7 +119,11 @@
|
||||
return
|
||||
|
||||
//window placing begin
|
||||
else if( istype(W,/obj/item/stack/sheet/rglass) || istype(W,/obj/item/stack/sheet/glass) )
|
||||
else if(istype(W, /obj/item/stack/sheet/rglass) || istype(W, /obj/item/stack/sheet/glass))
|
||||
var/obj/item/stack/ST = W
|
||||
if (ST.get_amount() < 1)
|
||||
user << "<span class='warning'>You need at least one sheet of glass for that.</span>"
|
||||
return
|
||||
var/dir_to_set = 1
|
||||
if(loc == user.loc)
|
||||
dir_to_set = user.dir
|
||||
@@ -150,7 +154,7 @@
|
||||
user << "<span class='notice'>There is already a window facing this way there.</span>"
|
||||
return
|
||||
var/obj/structure/window/WD
|
||||
if(istype(W,/obj/item/stack/sheet/rglass))
|
||||
if(istype(W, /obj/item/stack/sheet/rglass))
|
||||
WD = new/obj/structure/window(loc,1) //reinforced window
|
||||
else
|
||||
WD = new/obj/structure/window(loc,0) //normal window
|
||||
@@ -158,7 +162,6 @@
|
||||
WD.ini_dir = dir_to_set
|
||||
WD.anchored = 0
|
||||
WD.state = 0
|
||||
var/obj/item/stack/ST = W
|
||||
ST.use(1)
|
||||
user << "<span class='notice'>You place the [WD] on [src].</span>"
|
||||
return
|
||||
|
||||
@@ -199,13 +199,13 @@ turf/simulated/floor/proc/update_icon()
|
||||
break_tile()
|
||||
|
||||
/turf/simulated/floor/is_plasteel_floor()
|
||||
if(istype(floor_tile,/obj/item/stack/tile/plasteel))
|
||||
if(istype(floor_tile, /obj/item/stack/tile/plasteel))
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
|
||||
/turf/simulated/floor/is_light_floor()
|
||||
if(istype(floor_tile,/obj/item/stack/tile/light))
|
||||
if(istype(floor_tile, /obj/item/stack/tile/light))
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
@@ -324,7 +324,7 @@ turf/simulated/floor/proc/update_icon()
|
||||
intact = 1
|
||||
SetLuminosity(0)
|
||||
if(T)
|
||||
if(istype(T,/obj/item/stack/tile/plasteel))
|
||||
if(istype(T, /obj/item/stack/tile/plasteel))
|
||||
floor_tile = T
|
||||
if (icon_regular_floor)
|
||||
icon_state = icon_regular_floor
|
||||
@@ -463,24 +463,30 @@ turf/simulated/floor/proc/update_icon()
|
||||
if(istype(C, /obj/item/stack/rods))
|
||||
var/obj/item/stack/rods/R = C
|
||||
if (is_plating())
|
||||
if (R.amount >= 2)
|
||||
user << "\blue Reinforcing the floor..."
|
||||
if(do_after(user, 30) && R && R.amount >= 2 && is_plating())
|
||||
ChangeTurf(/turf/simulated/floor/engine)
|
||||
playsound(src, 'sound/items/Deconstruct.ogg', 80, 1)
|
||||
R.use(2)
|
||||
return
|
||||
if (R.get_amount() < 2)
|
||||
user << "<span class='warning'>You need two rods to make a reinforced floor.</span>"
|
||||
return
|
||||
else
|
||||
user << "\red You need more rods."
|
||||
user << "<span class='notice'>Reinforcing the floor...</span>"
|
||||
if(do_after(user, 30))
|
||||
if (R.get_amount() >= 2 && is_plating())
|
||||
ChangeTurf(/turf/simulated/floor/engine)
|
||||
playsound(src, 'sound/items/Deconstruct.ogg', 80, 1)
|
||||
R.use(2)
|
||||
user << "<span class='notice'>You have reinforced the floor.</span>"
|
||||
return
|
||||
else
|
||||
user << "\red You must remove the plating first."
|
||||
user << "<span class='warning'>You must remove the plating first.</span>"
|
||||
return
|
||||
|
||||
if(istype(C, /obj/item/stack/tile))
|
||||
if(is_plating())
|
||||
if(!broken && !burnt)
|
||||
var/obj/item/stack/tile/T = C
|
||||
floor_tile = new T.type
|
||||
if(istype(T, /obj/item/stack/tile/plasteel/cyborg))
|
||||
floor_tile = new /obj/item/stack/tile/plasteel
|
||||
else
|
||||
floor_tile = new T.type
|
||||
intact = 1
|
||||
if(istype(T,/obj/item/stack/tile/light))
|
||||
var/obj/item/stack/tile/light/L = T
|
||||
@@ -514,7 +520,7 @@ turf/simulated/floor/proc/update_icon()
|
||||
return
|
||||
coil.turf_place(src, user)
|
||||
else
|
||||
user << "\red You must remove the plating first."
|
||||
user << "<span class='warning'>You must remove the plating first.</span>"
|
||||
|
||||
if(istype(C, /obj/item/weapon/shovel))
|
||||
if(is_grass_floor())
|
||||
|
||||
@@ -75,13 +75,16 @@
|
||||
return
|
||||
|
||||
//REPAIRING (replacing the outer grille for cosmetic damage)
|
||||
else if( istype(W, /obj/item/stack/rods) )
|
||||
else if(istype(W, /obj/item/stack/rods))
|
||||
var/obj/item/stack/rods/O = W
|
||||
src.d_state = 0
|
||||
src.icon_state = "r_wall"
|
||||
relativewall_neighbours() //call smoothwall stuff
|
||||
user << "<span class='notice'>You replace the outer grille.</span>"
|
||||
O.use(1)
|
||||
if (O.use(1))
|
||||
src.d_state = 0
|
||||
src.icon_state = "r_wall"
|
||||
relativewall_neighbours() //call smoothwall stuff
|
||||
user << "<span class='notice'>You replace the outer grille.</span>"
|
||||
else
|
||||
user << "<span class='warning'>You need one rod to repair the wall.</span>"
|
||||
return
|
||||
return
|
||||
|
||||
if(2)
|
||||
@@ -211,20 +214,23 @@
|
||||
dismantle_wall()
|
||||
|
||||
//REPAIRING
|
||||
else if( istype(W, /obj/item/stack/sheet/metal) && d_state )
|
||||
else if(istype(W, /obj/item/stack/sheet/metal) && d_state)
|
||||
var/obj/item/stack/sheet/metal/MS = W
|
||||
|
||||
if (MS.get_amount() < 1)
|
||||
user << "<span class='warning'>You need one sheet of metal to repair the wall.</span>"
|
||||
return
|
||||
|
||||
user << "<span class='notice'>You begin patching-up the wall with \a [MS].</span>"
|
||||
|
||||
sleep( max(20*d_state,100) ) //time taken to repair is proportional to the damage! (max 10 seconds)
|
||||
if( !istype(src, /turf/simulated/wall/r_wall) || !user || !MS || !T ) return
|
||||
|
||||
if( user.loc == T && user.get_active_hand() == MS && d_state )
|
||||
if (do_after(user, max(20*d_state,100)))//time taken to repair is proportional to the damage! (max 10 seconds)
|
||||
if(loc == null || MS.get_amount() < 1)
|
||||
return
|
||||
MS.use(1)
|
||||
src.d_state = 0
|
||||
src.icon_state = "r_wall"
|
||||
relativewall_neighbours() //call smoothwall stuff
|
||||
user << "<span class='notice'>You repair the last of the damage.</span>"
|
||||
MS.use(1)
|
||||
|
||||
|
||||
//APC
|
||||
|
||||
@@ -18,27 +18,35 @@
|
||||
/turf/space/attackby(obj/item/C as obj, mob/user as mob)
|
||||
|
||||
if (istype(C, /obj/item/stack/rods))
|
||||
var/obj/item/stack/rods/R = C
|
||||
var/obj/structure/lattice/L = locate(/obj/structure/lattice, src)
|
||||
if(L)
|
||||
user << "<span class='warning'>There is already a lattice.</span>"
|
||||
return
|
||||
if (R.use(1))
|
||||
user << "<span class='notice'>Constructing support lattice...</span>"
|
||||
playsound(src, 'sound/weapons/Genhit.ogg', 50, 1)
|
||||
ReplaceWithLattice()
|
||||
else
|
||||
user << "<span class='warning'>You need one rod to build lattice.</span>"
|
||||
return
|
||||
var/obj/item/stack/rods/R = C
|
||||
user << "\blue Constructing support lattice ..."
|
||||
playsound(src, 'sound/weapons/Genhit.ogg', 50, 1)
|
||||
ReplaceWithLattice()
|
||||
R.use(1)
|
||||
return
|
||||
|
||||
if (istype(C, /obj/item/stack/tile/plasteel))
|
||||
var/obj/structure/lattice/L = locate(/obj/structure/lattice, src)
|
||||
if(L)
|
||||
var/obj/item/stack/tile/plasteel/S = C
|
||||
qdel(L)
|
||||
playsound(src, 'sound/weapons/Genhit.ogg', 50, 1)
|
||||
S.build(src)
|
||||
S.use(1)
|
||||
if (S.use(1))
|
||||
qdel(L)
|
||||
playsound(src, 'sound/weapons/Genhit.ogg', 50, 1)
|
||||
user << "<span class='notice'>You build a floor.</span>"
|
||||
S.build(src)
|
||||
else
|
||||
user << "<span class='warning'>You need one floor tile to build a floor.</span>"
|
||||
return
|
||||
return
|
||||
else
|
||||
user << "\red The plating is going to need some support."
|
||||
user << "<span class='danger'>The plating is going to need some support. Place metal rods first.</span>"
|
||||
return
|
||||
|
||||
|
||||
|
||||
@@ -434,7 +434,6 @@ var/global/floorIsLava = 0
|
||||
dat += {"
|
||||
<B>'Random' Events</B><BR>
|
||||
<BR>
|
||||
<A href='?src=\ref[src];secretsfun=gravity'>Trigger a gravity-failure event</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=wave'>Spawn a wave of meteors (aka lagocolyptic shower)</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=blackhole'>Spawn a vortex anomaly</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=gravanomalies'>Spawn a gravitational anomaly</A><BR>
|
||||
|
||||
@@ -1584,13 +1584,6 @@
|
||||
usr.client.triple_ai()
|
||||
feedback_inc("admin_secrets_fun_used",1)
|
||||
feedback_add_details("admin_secrets_fun_used","TriAI")
|
||||
if("gravity")
|
||||
alert("WIP - event unavailable")
|
||||
/* E = new /datum/round_event/weightless()
|
||||
log_admin("[key_name(usr)] triggered a gravity-failure event.", 1)
|
||||
message_admins("\blue [key_name_admin(usr)] triggered a gravity-failure event.", 1)
|
||||
feedback_inc("admin_secrets_fun_used",1)
|
||||
feedback_add_details("admin_secrets_fun_used","Grav") */
|
||||
if("power")
|
||||
feedback_inc("admin_secrets_fun_used",1)
|
||||
feedback_add_details("admin_secrets_fun_used","P")
|
||||
|
||||
@@ -619,7 +619,7 @@ var/global/list/g_fancy_list_of_safe_types = null
|
||||
//log_admin("[key_name(src)] has alienized [M.key].")
|
||||
var/list/dresspacks = list(
|
||||
"naked",
|
||||
"assistant grey",
|
||||
"as job...",
|
||||
"standard space gear",
|
||||
"tournament standard red",
|
||||
"tournament standard green",
|
||||
@@ -647,6 +647,12 @@ var/global/list/g_fancy_list_of_safe_types = null
|
||||
var/dresscode = input("Select dress for [M]", "Robust quick dress shop") as null|anything in dresspacks
|
||||
if (isnull(dresscode))
|
||||
return
|
||||
|
||||
var/datum/job/jobdatum
|
||||
if (dresscode == "as job...")
|
||||
var/jobname = input("Select job", "Robust quick dress shop") as null|anything in get_all_jobs()
|
||||
jobdatum = job_master.GetJob(jobname)
|
||||
|
||||
feedback_add_details("admin_verb","SEQ") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
for (var/obj/item/I in M)
|
||||
if (istype(I, /obj/item/weapon/implant))
|
||||
@@ -656,25 +662,10 @@ var/global/list/g_fancy_list_of_safe_types = null
|
||||
if ("naked")
|
||||
//do nothing
|
||||
|
||||
if ("assistant grey")
|
||||
var/obj/item/weapon/storage/backpack/BPK = new/obj/item/weapon/storage/backpack(M)
|
||||
new /obj/item/weapon/storage/box/survival(BPK)
|
||||
M.equip_to_slot_or_del(BPK, slot_back,1)
|
||||
M.equip_to_slot_or_del(new /obj/item/device/radio/headset(M), slot_ears)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/under/color/grey(M), slot_w_uniform)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/sneakers/black(M), slot_shoes)
|
||||
|
||||
var/obj/item/weapon/card/id/W = new(M)
|
||||
W.assignment = "Assistant"
|
||||
W.registered_name = M.real_name
|
||||
W.update_label()
|
||||
M.equip_to_slot_or_del(W, slot_wear_id)
|
||||
var/obj/item/device/pda/P = new(M)
|
||||
P.owner = M.real_name
|
||||
P.ownjob = "Assistant"
|
||||
P.update_label()
|
||||
M.equip_to_slot_or_del(P, slot_belt)
|
||||
|
||||
if ("as job...")
|
||||
if(jobdatum)
|
||||
dresscode = "[jobdatum.title]"
|
||||
jobdatum.equip(M)
|
||||
|
||||
if ("standard space gear")
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/sneakers/black(M), slot_shoes)
|
||||
@@ -687,6 +678,7 @@ var/global/list/g_fancy_list_of_safe_types = null
|
||||
J.toggle()
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/mask/breath(M), slot_wear_mask)
|
||||
J.Topic(null, list("stat" = 1))
|
||||
|
||||
if ("tournament standard red","tournament standard green") //we think stunning weapon is too overpowered to use it on tournaments. --rastaf0
|
||||
if (dresscode=="tournament standard red")
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/under/color/red(M), slot_w_uniform)
|
||||
@@ -1137,3 +1129,15 @@ var/global/list/g_fancy_list_of_safe_types = null
|
||||
usr << list2text(clients,",")
|
||||
if("Joined Clients")
|
||||
usr << list2text(joined_player_list,",")
|
||||
|
||||
/client/proc/cmd_display_del_log()
|
||||
set category = "Debug"
|
||||
set name = "Display del() Log"
|
||||
set desc = "Displays a list of things that have failed to GC this round"
|
||||
|
||||
var/dat = "<B>List of things that failed to GC this round</B><BR><BR>"
|
||||
|
||||
for(var/path in garbage.logging)
|
||||
dat += "[path] - [garbage.logging[path]] times<BR>"
|
||||
|
||||
usr << browse(dat, "window=dellog")
|
||||
|
||||
@@ -148,6 +148,7 @@ var/intercom_range_display_status = 0
|
||||
src.verbs += /client/proc/print_pointers
|
||||
src.verbs += /client/proc/count_movable_instances
|
||||
src.verbs += /client/proc/SDQL2_query
|
||||
src.verbs += /client/proc/cmd_display_del_log
|
||||
//src.verbs += /client/proc/cmd_admin_rejuvenate
|
||||
|
||||
feedback_add_details("admin_verb","mDV") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
@@ -89,20 +89,20 @@
|
||||
user.see_in_dark = 8
|
||||
user.see_invisible = SEE_INVISIBLE_LEVEL_TWO
|
||||
user << "\blue The walls suddenly disappear."
|
||||
user.dna.mutantrace = "shadow"
|
||||
user.update_body()
|
||||
user.dna.species = new /datum/species/shadow()
|
||||
user.regenerate_icons()
|
||||
if("Wealth")
|
||||
user << "<B>Your wish is granted, but at a terrible cost...</B>"
|
||||
user << "The Wish Granter punishes you for your selfishness, claiming your soul and warping your body to match the darkness in your heart."
|
||||
new /obj/structure/closet/syndicate/resources/everything(loc)
|
||||
user.dna.mutantrace = "shadow"
|
||||
user.update_body()
|
||||
user.dna.species = new /datum/species/shadow()
|
||||
user.regenerate_icons()
|
||||
if("Immortality")
|
||||
user << "<B>Your wish is granted, but at a terrible cost...</B>"
|
||||
user << "The Wish Granter punishes you for your selfishness, claiming your soul and warping your body to match the darkness in your heart."
|
||||
user.verbs += /mob/living/carbon/proc/immortality
|
||||
user.dna.mutantrace = "shadow"
|
||||
user.update_body()
|
||||
user.dna.species = new /datum/species/shadow()
|
||||
user.regenerate_icons()
|
||||
if("To Kill")
|
||||
user << "<B>Your wish is granted, but at a terrible cost...</B>"
|
||||
user << "The Wish Granter punishes you for your wickedness, claiming your soul and warping your body to match the darkness in your heart."
|
||||
@@ -116,8 +116,8 @@
|
||||
for(var/datum/objective/OBJ in user.mind.objectives)
|
||||
user << "<B>Objective #[obj_count]</B>: [OBJ.explanation_text]"
|
||||
obj_count++
|
||||
user.dna.mutantrace = "shadow"
|
||||
user.update_body()
|
||||
user.dna.species = new /datum/species/shadow()
|
||||
user.regenerate_icons()
|
||||
if("Peace")
|
||||
user << "<B>Whatever alien sentience that the Wish Granter possesses is satisfied with your wish. There is a distant wailing as the last of the Faithless begin to die, then silence.</B>"
|
||||
user << "You feel as if you just narrowly avoided a terrible fate..."
|
||||
|
||||
@@ -53,7 +53,8 @@ datum/preferences
|
||||
var/facial_hair_color = "000" //Facial hair color
|
||||
var/skin_tone = "caucasian1" //Skin color
|
||||
var/eye_color = "000" //Eye color
|
||||
var/mutant_race = "human" //Mutant race
|
||||
var/datum/species/pref_species = new /datum/species/human() //Mutant race
|
||||
var/mutant_color = "FFF" //Mutant race skin color
|
||||
|
||||
//Mob preview
|
||||
var/icon/preview_icon_front = null
|
||||
@@ -165,16 +166,17 @@ datum/preferences
|
||||
dat += "<table width='100%'><tr><td width='24%' valign='top'>"
|
||||
|
||||
if(config.mutant_races)
|
||||
dat += "<b>Mutant Race:</b><BR><a href='?_src_=prefs;preference=mutant_race;task=input'>[mutant_race]</a><BR>"
|
||||
dat += "<b>Species:</b><BR><a href='?_src_=prefs;preference=species;task=input'>[pref_species.name]</a><BR>"
|
||||
else
|
||||
dat += "<b>Mutant Race:</b> Human<BR>"
|
||||
dat += "<b>Species:</b> Human<BR>"
|
||||
|
||||
dat += "<b>Blood Type:</b> [blood_type]<BR>"
|
||||
dat += "<b>Skin Tone:</b><BR><a href='?_src_=prefs;preference=s_tone;task=input'>[skin_tone]</a><BR>"
|
||||
dat += "<b>Underwear:</b><BR><a href ='?_src_=prefs;preference=underwear;task=input'>[underwear]</a><BR>"
|
||||
dat += "<b>Backpack:</b><BR><a href ='?_src_=prefs;preference=bag;task=input'>[backbaglist[backbag]]</a><BR>"
|
||||
|
||||
|
||||
dat += "</td><td valign='top' width='28%'>"
|
||||
dat += "</td><td valign='top' width='21%'>"
|
||||
|
||||
dat += "<h3>Hair Style</h3>"
|
||||
|
||||
@@ -182,7 +184,7 @@ datum/preferences
|
||||
dat += "<span style='border:1px solid #161616; background-color: #[hair_color];'> </span> <a href='?_src_=prefs;preference=hair;task=input'>Change</a><BR>"
|
||||
|
||||
|
||||
dat += "</td><td valign='top' width='28%'>"
|
||||
dat += "</td><td valign='top' width='21%'>"
|
||||
|
||||
dat += "<h3>Facial Hair Style</h3>"
|
||||
|
||||
@@ -190,12 +192,17 @@ datum/preferences
|
||||
dat += "<span style='border: 1px solid #161616; background-color: #[facial_hair_color];'> </span> <a href='?_src_=prefs;preference=facial;task=input'>Change</a><BR>"
|
||||
|
||||
|
||||
dat += "</td><td valign='top'>"
|
||||
dat += "</td><td valign='top' width='21%'>"
|
||||
|
||||
dat += "<h3>Eye Color</h3>"
|
||||
|
||||
dat += "<span style='border: 1px solid #161616; background-color: #[eye_color];'> </span> <a href='?_src_=prefs;preference=eyes;task=input'>Change</a><BR>"
|
||||
|
||||
dat += "</td><td valign='top' width='21%'>"
|
||||
|
||||
dat += "<h3>Alien Color</h3>" // even if choosing your mutantrace is off, this is here in case you gain one during a round
|
||||
|
||||
dat += "<span style='border: 1px solid #161616; background-color: #[mutant_color];'> </span> <a href='?_src_=prefs;preference=mutant_color;task=input'>Change</a><BR>"
|
||||
|
||||
dat += "</td></tr></table>"
|
||||
|
||||
@@ -618,10 +625,27 @@ datum/preferences
|
||||
if(new_eyes)
|
||||
eye_color = sanitize_hexcolor(new_eyes)
|
||||
|
||||
if("mutant_race")
|
||||
var/new_mutant_race = input(user, "Choose your character's mutant race:", "Character Preference") as null|anything in mutant_races
|
||||
if(new_mutant_race)
|
||||
mutant_race = new_mutant_race
|
||||
if("species")
|
||||
|
||||
var/result = input(user, "Select a species", "Species Selection") as null|anything in roundstart_species
|
||||
|
||||
if(result)
|
||||
var/newtype = roundstart_species[result]
|
||||
pref_species = new newtype()
|
||||
if(!config.mutant_colors)
|
||||
mutant_color = pref_species.default_color
|
||||
|
||||
if("mutant_color")
|
||||
if(!config.mutant_colors)
|
||||
user << "<span class='danger'>Alien colors are disabled.</span>"
|
||||
return
|
||||
var/new_mutantcolor = input(user, "Choose your character's alien skin color:", "Character Preference") as color|null
|
||||
if(new_mutantcolor)
|
||||
var/temp_hsv = RGBtoHSV(new_mutantcolor)
|
||||
if(ReadHSV(temp_hsv)[3] >= ReadHSV("#7F7F7F")[3]) // mutantcolors must be bright
|
||||
mutant_color = sanitize_hexcolor(new_mutantcolor)
|
||||
else
|
||||
user << "<span class='danger'>Invalid color. Your color is not bright enough.</span>"
|
||||
|
||||
if("s_tone")
|
||||
var/new_s_tone = input(user, "Choose your character's skin-tone:", "Character Preference") as null|anything in skin_tones
|
||||
@@ -685,8 +709,10 @@ datum/preferences
|
||||
|
||||
if("ghost_sight")
|
||||
toggles ^= CHAT_GHOSTSIGHT
|
||||
|
||||
if("pull_requests")
|
||||
toggles ^= CHAT_PULLR
|
||||
|
||||
if("save")
|
||||
save_preferences()
|
||||
save_character()
|
||||
@@ -722,10 +748,15 @@ datum/preferences
|
||||
|
||||
character.real_name = real_name
|
||||
character.name = character.real_name
|
||||
|
||||
if(character.dna)
|
||||
character.dna.real_name = character.real_name
|
||||
if(mutant_race != "human" && config.mutant_races)
|
||||
character.dna.mutantrace = mutant_race
|
||||
if(pref_species != /datum/species/human && config.mutant_races)
|
||||
character.dna.species = new pref_species.type()
|
||||
else
|
||||
character.dna.species = new /datum/species/human()
|
||||
character.dna.mutant_color = mutant_color
|
||||
character.update_mutcolor()
|
||||
|
||||
character.gender = gender
|
||||
character.age = age
|
||||
|
||||
@@ -73,6 +73,8 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
if(11) underwear = "Ladies Kinky"
|
||||
if(12) underwear = "Tankini"
|
||||
if(13) underwear = "Nude"
|
||||
if(!(pref_species in species_list))
|
||||
pref_species = new /datum/species/human()
|
||||
return
|
||||
|
||||
/datum/preferences/proc/load_path(ckey,filename="preferences.sav")
|
||||
@@ -151,6 +153,9 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
if(needs_update == -2) //fatal, can't load any data
|
||||
return 0
|
||||
|
||||
if(!S["species"] || !config.mutant_races)
|
||||
S["species"] << new /datum/species/human()
|
||||
|
||||
//Character
|
||||
S["OOC_Notes"] >> metadata
|
||||
S["real_name"] >> real_name
|
||||
@@ -165,7 +170,8 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
S["facial_style_name"] >> facial_hair_style
|
||||
S["underwear"] >> underwear
|
||||
S["backbag"] >> backbag
|
||||
S["mutant_race"] >> mutant_race
|
||||
S["species"] >> pref_species
|
||||
S["mutant_color"] >> mutant_color
|
||||
|
||||
//Jobs
|
||||
S["userandomjob"] >> userandomjob
|
||||
@@ -186,6 +192,8 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
//Sanitize
|
||||
metadata = sanitize_text(metadata, initial(metadata))
|
||||
real_name = reject_bad_name(real_name)
|
||||
if(!(pref_species in species_list))
|
||||
pref_species = new /datum/species/human()
|
||||
if(!real_name) real_name = random_name(gender)
|
||||
be_random_name = sanitize_integer(be_random_name, 0, 1, initial(be_random_name))
|
||||
gender = sanitize_gender(gender)
|
||||
@@ -203,7 +211,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
eye_color = sanitize_hexcolor(eye_color, 3, 0)
|
||||
skin_tone = sanitize_inlist(skin_tone, skin_tones)
|
||||
backbag = sanitize_integer(backbag, 1, backbaglist.len, initial(backbag))
|
||||
mutant_race = sanitize_text(mutant_race, initial(mutant_race))
|
||||
mutant_color = sanitize_hexcolor(mutant_color, 3, 0)
|
||||
|
||||
userandomjob = sanitize_integer(userandomjob, 0, 1, initial(userandomjob))
|
||||
job_civilian_high = sanitize_integer(job_civilian_high, 0, 65535, initial(job_civilian_high))
|
||||
@@ -240,7 +248,8 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
S["facial_style_name"] << facial_hair_style
|
||||
S["underwear"] << underwear
|
||||
S["backbag"] << backbag
|
||||
S["mutant_race"] << mutant_race
|
||||
S["species"] << pref_species
|
||||
S["mutant_color"] << mutant_color
|
||||
|
||||
//Jobs
|
||||
S["userandomjob"] << userandomjob
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
desc = "Because you really needed another excuse to punch your crewmates."
|
||||
icon_state = "boxing"
|
||||
item_state = "boxing"
|
||||
species_exception = list(/datum/species/golem, /datum/species/golem/adamantine) // now you too can be a golem boxing champion
|
||||
|
||||
/obj/item/clothing/gloves/boxing/green
|
||||
icon_state = "boxinggreen"
|
||||
|
||||
@@ -9,9 +9,9 @@
|
||||
/datum/round_event/spooky/start()
|
||||
for(var/mob/living/carbon/human/H in mob_list)
|
||||
if(H.dna)
|
||||
hardset_dna(H, null, null, null, "skeleton")
|
||||
hardset_dna(H, null, null, null, null, /datum/species/skeleton)
|
||||
for(var/mob/living/simple_animal/corgi/Ian/Ian in mob_list)
|
||||
Ian.place_on_head(new /obj/item/weapon/bedsheet(Ian))
|
||||
|
||||
/datum/round_event/spooky/announce()
|
||||
priority_announce(pick("RATTLE ME BONES!","THE RIDE NEVER ENDS!", "A SKELETON POPS OUT!", "SPOOKY SCARY SKELETONS!", "CREWMEMBERS BEWARE, YOU'RE IN FOR A SCARE!") , "THE CALL IS COMING FROM INSIDE THE HOUSE")
|
||||
priority_announce(pick("RATTLE ME BONES!","THE RIDE NEVER ENDS!", "A SKELETON POPS OUT!", "SPOOKY SCARY SKELETONS!", "CREWMEMBERS BEWARE, YOU'RE IN FOR A SCARE!") , "THE CALL IS COMING FROM INSIDE THE HOUSE")
|
||||
|
||||
@@ -144,15 +144,17 @@
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/potato/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
..()
|
||||
if(istype(W, /obj/item/stack/cable_coil))
|
||||
if(W:amount >= 5)
|
||||
W:amount -= 5
|
||||
if(!W:amount) qdel(W)
|
||||
var/obj/item/stack/cable_coil/C
|
||||
if (C.use(5))
|
||||
user << "<span class='notice'>You add some cable to the potato and slide it inside the battery encasing.</span>"
|
||||
var/obj/item/weapon/stock_parts/cell/potato/pocell = new /obj/item/weapon/stock_parts/cell/potato(user.loc)
|
||||
pocell.maxcharge = src.potency * 10
|
||||
pocell.charge = pocell.maxcharge
|
||||
qdel(src)
|
||||
return
|
||||
else
|
||||
user << "<span class='warning'>You need five lengths of cable to make a potato battery.</span>"
|
||||
return
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/grapes
|
||||
seed = "/obj/item/seeds/grapeseed"
|
||||
|
||||
@@ -909,7 +909,7 @@ obj/machinery/hydroponics/attackby(var/obj/item/O as obj, var/mob/user as mob)
|
||||
podman.gender = ghost.gender
|
||||
|
||||
//dna stuff
|
||||
hardset_dna(podman, ui, se, null, !prob(potency) ? "plant" : null) //makes sure podman has dna and sets the dna's ui/se/mutantrace/real_name etc variables
|
||||
hardset_dna(podman, ui, se, null, null, null, !prob(potency) ? /datum/species/plant/pod : null, "#59CE00") //makes sure podman has dna and sets the dna's ui/se/mutantrace/real_name etc variables
|
||||
|
||||
else //else, one packet of seeds. maybe two
|
||||
var/seed_count = 1
|
||||
|
||||
@@ -25,28 +25,28 @@
|
||||
var/turf/T = get_step(src,input_dir)
|
||||
if(T)
|
||||
for(var/obj/item/stack/sheet/O in T)
|
||||
if (istype(O,/obj/item/stack/sheet/mineral/gold))
|
||||
if (istype(O, /obj/item/stack/sheet/mineral/gold))
|
||||
amt_gold += 100 * O.amount
|
||||
O.loc = null
|
||||
if (istype(O,/obj/item/stack/sheet/mineral/silver))
|
||||
if (istype(O, /obj/item/stack/sheet/mineral/silver))
|
||||
amt_silver += 100 * O.amount
|
||||
O.loc = null
|
||||
if (istype(O,/obj/item/stack/sheet/mineral/diamond))
|
||||
if (istype(O, /obj/item/stack/sheet/mineral/diamond))
|
||||
amt_diamond += 100 * O.amount
|
||||
O.loc = null
|
||||
if (istype(O,/obj/item/stack/sheet/mineral/plasma))
|
||||
if (istype(O, /obj/item/stack/sheet/mineral/plasma))
|
||||
amt_plasma += 100 * O.amount
|
||||
O.loc = null
|
||||
if (istype(O,/obj/item/stack/sheet/mineral/uranium))
|
||||
if (istype(O, /obj/item/stack/sheet/mineral/uranium))
|
||||
amt_uranium += 100 * O.amount
|
||||
O.loc = null
|
||||
if (istype(O,/obj/item/stack/sheet/metal))
|
||||
if (istype(O, /obj/item/stack/sheet/metal))
|
||||
amt_iron += 100 * O.amount
|
||||
O.loc = null
|
||||
if (istype(O,/obj/item/stack/sheet/mineral/clown))
|
||||
if (istype(O, /obj/item/stack/sheet/mineral/clown))
|
||||
amt_clown += 100 * O.amount
|
||||
O.loc = null
|
||||
if (istype(O,/obj/item/stack/sheet/mineral/adamantine))
|
||||
if (istype(O, /obj/item/stack/sheet/mineral/adamantine))
|
||||
amt_adamantine += 100 * O.amount
|
||||
O.loc = null //Commented out for now. -Durandan
|
||||
return
|
||||
|
||||
@@ -224,21 +224,20 @@
|
||||
|
||||
|
||||
/obj/item/weapon/coin/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(istype(W,/obj/item/stack/cable_coil) )
|
||||
if(istype(W, /obj/item/stack/cable_coil))
|
||||
var/obj/item/stack/cable_coil/CC = W
|
||||
if(string_attached)
|
||||
user << "\blue There already is a string attached to this coin."
|
||||
user << "<span class='notice'>There already is a string attached to this coin.</span>"
|
||||
return
|
||||
|
||||
if(CC.amount <= 0)
|
||||
user << "\blue This cable coil appears to be empty."
|
||||
qdel(CC)
|
||||
if (CC.use(1))
|
||||
overlays += image('icons/obj/economy.dmi',"coin_string_overlay")
|
||||
string_attached = 1
|
||||
user << "<span class='notice'>You attach a string to the coin.</span>"
|
||||
else
|
||||
user << "<span class='warning'>You need one length of cable to attach a string to the coin.</span>"
|
||||
return
|
||||
|
||||
overlays += image('icons/obj/economy.dmi',"coin_string_overlay")
|
||||
string_attached = 1
|
||||
user << "\blue You attach a string to the coin."
|
||||
CC.use(1)
|
||||
else if(istype(W,/obj/item/weapon/wirecutters))
|
||||
if(!string_attached)
|
||||
..()
|
||||
|
||||
@@ -94,7 +94,7 @@
|
||||
if(shielded)
|
||||
damage /= 4
|
||||
|
||||
show_message("\red The blob attacks!")
|
||||
show_message("<span class='userdanger'>The blob attacks!</span>")
|
||||
adjustFireLoss(damage)
|
||||
return
|
||||
|
||||
@@ -120,9 +120,8 @@
|
||||
return
|
||||
if (health > 0)
|
||||
playsound(loc, 'sound/weapons/bite.ogg', 50, 1, -1)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("<span class='danger'>[M.name] bites [src]!</span>"), 1)
|
||||
visible_message("<span class='danger'>[M.name] bites [src]!</span>", \
|
||||
"<span class='userdanger'>[M.name] bites [src]!</span>")
|
||||
adjustBruteLoss(rand(1, 3))
|
||||
updatehealth()
|
||||
return
|
||||
@@ -137,10 +136,8 @@
|
||||
|
||||
if (health > -100)
|
||||
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red <B>The [M.name] glomps []!</B>", src), 1)
|
||||
|
||||
visible_message("<span class='danger'>The [M.name] glomps [src]!</span>", \
|
||||
"<span class='userdanger'>The [M.name] glomps [src]!</span>")
|
||||
var/damage = rand(1, 3)
|
||||
|
||||
if(M.is_adult)
|
||||
@@ -167,9 +164,8 @@
|
||||
if(M.powerlevel < 0)
|
||||
M.powerlevel = 0
|
||||
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red <B>The [M.name] has shocked []!</B>", src), 1)
|
||||
visible_message("<span class='danger'>The [M.name] has shocked [src]!</span>", \
|
||||
"<span class='userdanger'>The [M.name] has shocked [src]!</span>")
|
||||
|
||||
Weaken(power)
|
||||
if (stuttering < power)
|
||||
@@ -194,8 +190,8 @@
|
||||
else
|
||||
if(M.attack_sound)
|
||||
playsound(loc, M.attack_sound, 50, 1, 1)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message("\red <B>[M]</B> [M.attacktext] [src]!", 1)
|
||||
visible_message("<span class='danger'>[M] [M.attacktext] [src]!</span>", \
|
||||
"<span class='userdanger'>[M] [M.attacktext] [src]!</span>")
|
||||
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
|
||||
adjustBruteLoss(damage)
|
||||
updatehealth()
|
||||
@@ -229,9 +225,7 @@
|
||||
LAssailant = M
|
||||
|
||||
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red [] has grabbed [] passively!", M, src), 1)
|
||||
visible_message("<span class='warning'>[M] has grabbed [src] passively!</span>")
|
||||
|
||||
if ("harm")
|
||||
var/damage = rand(1, 9)
|
||||
@@ -244,42 +238,35 @@
|
||||
sleep(3)
|
||||
step_away(src,M,15)
|
||||
playsound(loc, "punch", 25, 1, -1)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red <B>[] has punched []!</B>", M, src), 1)
|
||||
visible_message("<span class='danger'>[M] has punched [src]!</span>", \
|
||||
"<span class='userdanger'>[M] has punched [src]!</span>")
|
||||
if ((stat != DEAD) && (damage > 9||prob(5)))//Regular humans have a very small chance of weakening an alien.
|
||||
Weaken(1,5)
|
||||
for(var/mob/O in viewers(M, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red <B>[] has weakened []!</B>", M, src), 1, "\red You hear someone fall.", 2)
|
||||
visible_message("<span class='danger'>[M] has weakened [src]!</span>", \
|
||||
"<span class='userdanger'>[M] has weakened [src]!</span>", \
|
||||
"<span class='danger'>You hear someone fall.</span>")
|
||||
adjustBruteLoss(damage)
|
||||
updatehealth()
|
||||
else
|
||||
playsound(loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red <B>[] has attempted to punch []!</B>", M, src), 1)
|
||||
visible_message("<span class='danger'>[M] has attempted to punch [src]!</span>")
|
||||
|
||||
if ("disarm")
|
||||
if (!lying)
|
||||
if (prob(5))//Very small chance to push an alien down.
|
||||
Weaken(2)
|
||||
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red <B>[] has pushed down []!</B>", M, src), 1)
|
||||
visible_message("<span class='danger'>[M] has pushed down [src]!</span>", \
|
||||
"<span class='userdanger'>[M] has pushed down [src]!</span>")
|
||||
else
|
||||
if (prob(50))
|
||||
drop_item()
|
||||
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red <B>[] has disarmed []!</B>", M, src), 1)
|
||||
visible_message("<span class='danger'>[M] has disarmed [src]!</span>", \
|
||||
"<span class='userdanger'>[M] has disarmed [src]!</span>")
|
||||
else
|
||||
playsound(loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red <B>[] has attempted to disarm []!</B>", M, src), 1)
|
||||
visible_message("<span class='danger'>[M] has attempted to disarm [src]!</span>")
|
||||
return
|
||||
|
||||
/*Code for aliens attacking aliens. Because aliens act on a hivemind, I don't see them as very aggressive with each other.
|
||||
@@ -306,21 +293,19 @@ In all, this is a lot like the monkey code. /N
|
||||
AdjustParalysis(-3)
|
||||
AdjustStunned(-3)
|
||||
AdjustWeakened(-3)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\blue [M.name] nuzzles [] trying to wake it up!", src), 1)
|
||||
visible_message("<span class='notice'>[M.name] nuzzles [src] trying to wake it up!</span>")
|
||||
|
||||
else
|
||||
if (health > 0)
|
||||
playsound(loc, 'sound/weapons/bite.ogg', 50, 1, -1)
|
||||
var/damage = rand(1, 3)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("<span class='danger'>[M.name] bites []!</span>", src), 1)
|
||||
visible_message("<span class='danger'>[M.name] bites [src]!!</span>", \
|
||||
"<span class='userdanger'>[M.name] bites [src]!!</span>")
|
||||
|
||||
adjustBruteLoss(damage)
|
||||
updatehealth()
|
||||
else
|
||||
M << "\green <B>[name] is too injured for that.</B>"
|
||||
M << "<span class='warning'>[name] is too injured for that.</span>"
|
||||
return
|
||||
|
||||
|
||||
|
||||
@@ -101,7 +101,7 @@
|
||||
|
||||
//paralysis += 1
|
||||
|
||||
show_message("\red The blob attacks you!")
|
||||
show_message("<span class='userdanger'>The blob attacks you!</span>")
|
||||
|
||||
adjustFireLoss(damage)
|
||||
|
||||
@@ -117,8 +117,8 @@
|
||||
if(M.melee_damage_upper == 0)
|
||||
M.emote("[M.friendly] [src]")
|
||||
else
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message("\red <B>[M]</B> [M.attacktext] [src]!", 1)
|
||||
visible_message("<span class='danger'>[M] [M.attacktext] [src]!</span>", \
|
||||
"<span class='userdanger'>[M] [M.attacktext] [src]!</span>")
|
||||
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
|
||||
adjustBruteLoss(damage)
|
||||
add_logs(M, src, "attacked", admin=0)
|
||||
@@ -146,9 +146,8 @@
|
||||
return
|
||||
if (health > 0)
|
||||
playsound(loc, 'sound/weapons/bite.ogg', 50, 1, -1)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("<span class='danger'>[M.name] bites [src]!</span>"), 1)
|
||||
visible_message("<span class='danger'>[M.name] bites [src]!</span>", \
|
||||
"<span class='userdanger'>[M.name] bites [src]!</span>")
|
||||
adjustBruteLoss(rand(1, 3))
|
||||
updatehealth()
|
||||
return
|
||||
@@ -163,9 +162,8 @@
|
||||
|
||||
if (health > -100)
|
||||
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red <B>The [M.name] glomps []!</B>", src), 1)
|
||||
visible_message("<span class='danger'>The [M.name] glomps [src]!</span>", \
|
||||
"<span class='userdanger'>The [M.name] glomps [src]!</span>")
|
||||
|
||||
var/damage = rand(1, 3)
|
||||
|
||||
@@ -209,9 +207,7 @@
|
||||
LAssailant = M
|
||||
|
||||
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red [] has grabbed [] passively!", M, src), 1)
|
||||
visible_message("<span class='warning'>[M] has grabbed [src] passively!</span>")
|
||||
|
||||
else
|
||||
var/damage = rand(1, 9)
|
||||
@@ -224,21 +220,19 @@
|
||||
sleep(3)
|
||||
step_away(src,M,15)
|
||||
playsound(loc, "punch", 25, 1, -1)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red <B>[] has kicked []!</B>", M, src), 1)
|
||||
visible_message("<span class='danger'>[M] has kicked [src]!</span>", \
|
||||
"<span class='userdanger'>[M] has kicked [src]!</span>")
|
||||
if ((stat != DEAD) && (damage > 4.9))
|
||||
Weaken(rand(5,10))
|
||||
for(var/mob/O in viewers(M, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red <B>[] has weakened []!</B>", M, src), 1, "\red You hear someone fall.", 2)
|
||||
visible_message("<span class='danger'>[M] has weakened [src]!</span>", \
|
||||
"<span class='userdanger'>[M] has weakened [src]!</span>", \
|
||||
"<span class='danger'>You hear someone fall.</span>")
|
||||
adjustBruteLoss(damage)
|
||||
updatehealth()
|
||||
else
|
||||
playsound(loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red <B>[] has attempted to kick []!</B>", M, src), 1)
|
||||
visible_message("<span class='danger'>[M] has attempted to kick [src]!</span>", \
|
||||
"<span class='userdanger'>[M] has attempted to kick [src]!</span>")
|
||||
return
|
||||
|
||||
/mob/living/carbon/alien/larva/attack_alien(mob/living/carbon/alien/humanoid/M as mob)
|
||||
@@ -260,21 +254,18 @@
|
||||
AdjustParalysis(-3)
|
||||
AdjustStunned(-3)
|
||||
AdjustWeakened(-3)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\blue [M.name] nuzzles [] trying to wake it up!", src), 1)
|
||||
visible_message("<span class='notice'>[M.name] nuzzles [src] trying to wake it up!</span>")
|
||||
|
||||
else
|
||||
if (health > 0)
|
||||
playsound(loc, 'sound/weapons/bite.ogg', 50, 1, -1)
|
||||
var/damage = rand(1, 3)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("<span class='danger'>[M.name] bites []!</span>", src), 1)
|
||||
visible_message("<span class='danger'>[M.name] bites [src]!</span>", \
|
||||
"<span class='userdanger'>[M.name] bites [src]!</span>")
|
||||
adjustBruteLoss(damage)
|
||||
updatehealth()
|
||||
else
|
||||
M << "\green <B>[name] is too injured for that.</B>"
|
||||
M << "<span class='warning'>[name] is too injured for that.</span>"
|
||||
return
|
||||
|
||||
/mob/living/carbon/alien/larva/restrained()
|
||||
|
||||
@@ -205,7 +205,7 @@
|
||||
src << "<span class='info'>You're completely exhausted.</span>"
|
||||
else
|
||||
src << "<span class='info'>You feel fatigued.</span>"
|
||||
if(dna && (dna.mutantrace == "skeleton") && !H.w_uniform && !H.wear_suit)
|
||||
if(dna && (dna.species == /datum/species/skeleton) && !H.w_uniform && !H.wear_suit)
|
||||
H.play_xylophone()
|
||||
else
|
||||
if(ishuman(src))
|
||||
@@ -452,13 +452,6 @@
|
||||
..()
|
||||
|
||||
|
||||
/mob/living/carbon/proc/is_mutantrace(var/mrace)
|
||||
if(mrace)
|
||||
if(src.dna && src.dna.mutantrace == mrace)
|
||||
return 1
|
||||
else
|
||||
return src.dna && src.dna.mutantrace ? 1 : 0
|
||||
|
||||
/mob/living/carbon/getTrail()
|
||||
if(getBruteLoss() < 300)
|
||||
if(prob(50))
|
||||
|
||||
@@ -8,7 +8,10 @@
|
||||
..()
|
||||
|
||||
/mob/living/carbon/human/spawn_gibs()
|
||||
hgibs(loc, viruses, dna)
|
||||
if(dna)
|
||||
hgibs(loc, viruses, dna)
|
||||
else
|
||||
hgibs(loc, viruses, null)
|
||||
|
||||
/mob/living/carbon/human/spawn_dust()
|
||||
new /obj/effect/decal/remains/human(loc)
|
||||
@@ -31,6 +34,9 @@
|
||||
update_canmove()
|
||||
if(client) blind.layer = 0
|
||||
|
||||
if(dna)
|
||||
dna.species.spec_death(gibbed,src)
|
||||
|
||||
tod = worldtime2text() //weasellos time of death patch
|
||||
if(mind) mind.store_memory("Time of death: [tod]", 0)
|
||||
if(ticker && ticker.mode)
|
||||
@@ -40,11 +46,9 @@
|
||||
return ..(gibbed)
|
||||
|
||||
/mob/living/carbon/human/proc/makeSkeleton()
|
||||
if(!check_dna_integrity(src) || (dna.mutantrace == "skeleton")) return
|
||||
dna.mutantrace = "skeleton"
|
||||
if(!check_dna_integrity(src)) return
|
||||
status_flags |= DISFIGURED
|
||||
update_hair()
|
||||
update_body()
|
||||
dna.species = new /datum/species/skeleton(src)
|
||||
return 1
|
||||
|
||||
/mob/living/carbon/proc/ChangeToHusk()
|
||||
|
||||
@@ -253,7 +253,7 @@
|
||||
msg += "[t_He] [t_has] a vacant, braindead stare...\n"
|
||||
|
||||
if(digitalcamo)
|
||||
msg += "[t_He] [t_is] repulsively uncanny!\n"
|
||||
msg += "[t_He] [t_is] moving [t_his] body in an unnatural and blatantly inhuman manner.\n"
|
||||
|
||||
|
||||
if(istype(usr, /mob/living/carbon/human))
|
||||
|
||||
@@ -51,12 +51,12 @@
|
||||
for(var/mob/M in range(tmob, 1))
|
||||
if( ((M.pulling == tmob && ( tmob.restrained() && !( M.restrained() ) && M.stat == 0)) || locate(/obj/item/weapon/grab, tmob.grabbed_by.len)) )
|
||||
if ( !(world.time % 5) )
|
||||
src << "\red [tmob] is restrained, you cannot push past"
|
||||
src << "<span class='warning'>[tmob] is restrained, you cannot push past.</span>"
|
||||
now_pushing = 0
|
||||
return
|
||||
if( tmob.pulling == M && ( M.restrained() && !( tmob.restrained() ) && tmob.stat == 0) )
|
||||
if ( !(world.time % 5) )
|
||||
src << "\red [tmob] is restraining [M], you cannot push past"
|
||||
src << "<span class='warning'>[tmob] is restraining [M], you cannot push past.</span>"
|
||||
now_pushing = 0
|
||||
return
|
||||
|
||||
@@ -198,7 +198,7 @@
|
||||
|
||||
/mob/living/carbon/human/blob_act()
|
||||
if(stat == 2) return
|
||||
show_message("\red The blob attacks you!")
|
||||
show_message("<span class='userdanger'> The blob attacks you!</span>")
|
||||
var/dam_zone = pick("chest", "l_hand", "r_hand", "l_leg", "r_leg")
|
||||
var/obj/item/organ/limb/affecting = get_organ(ran_zone(dam_zone))
|
||||
apply_damage(rand(20,30), BRUTE, affecting, run_armor_check(affecting, "melee"))
|
||||
@@ -211,8 +211,8 @@
|
||||
else
|
||||
if(M.attack_sound)
|
||||
playsound(loc, M.attack_sound, 50, 1, 1)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message("\red <B>[M]</B> [M.attacktext] [src]!", 1)
|
||||
visible_message("<span class='danger'>[M] [M.attacktext] [src]!</span>", \
|
||||
"<span class='userdanger'>[M] [M.attacktext]!</span>")
|
||||
add_logs(M, src, "attacked", admin=0)
|
||||
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
|
||||
var/dam_zone = pick("chest", "l_hand", "r_hand", "l_leg", "r_leg")
|
||||
@@ -227,9 +227,8 @@
|
||||
|
||||
if (health > -100)
|
||||
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red <B>The [M.name] glomps []!</B>", src), 1)
|
||||
visible_message("<span class='danger'>The [M.name] glomps [src]!</span>", \
|
||||
"<span class='userdanger'>The [M.name] glomps [src]!</span>")
|
||||
|
||||
var/damage = rand(1, 3)
|
||||
|
||||
@@ -262,10 +261,8 @@
|
||||
M.powerlevel -= 3
|
||||
if(M.powerlevel < 0)
|
||||
M.powerlevel = 0
|
||||
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red <B>The [M.name] has shocked []!</B>", src), 1)
|
||||
visible_message("<span class='danger'>The [M.name] has shocked [src]!</span>", \
|
||||
"<span class='userdanger'>The [M.name] has shocked [src]!</span>")
|
||||
|
||||
Weaken(power)
|
||||
if (stuttering < power)
|
||||
@@ -344,7 +341,7 @@
|
||||
dat += "<BR><font color=grey><B>Uniform:</B> Obscured by [wear_suit]</font>"
|
||||
else
|
||||
dat += "<BR><B>Uniform:</B> <A href='?src=\ref[src];item=[slot_w_uniform]'> [(w_uniform && !(w_uniform.flags&ABSTRACT)) ? w_uniform : "<font color=grey>Empty</font>"]</A>"
|
||||
if(w_uniform)
|
||||
if(w_uniform || dna.species.nojumpsuit)
|
||||
dat += "<BR>[TAB]↳<B>Belt:</B> <A href='?src=\ref[src];item=[slot_belt]'> [(belt && !(belt.flags&ABSTRACT)) ? belt : "<font color=grey>Empty</font>"]</A>"
|
||||
if(has_breathable_mask && istype(belt, /obj/item/weapon/tank))
|
||||
dat += "<BR>[TAB][TAB]↳<A href='?src=\ref[src];internal=[slot_belt]'>[internal ? "Disable Internals" : "Set Internals"]</A>"
|
||||
@@ -352,12 +349,31 @@
|
||||
dat += " <A href='?src=\ref[src];pockets=right'>[(r_store && !(r_store.flags&ABSTRACT)) ? "Right (Full)" : "<font color=grey>Right (Empty)</font>"]</A>"
|
||||
dat += "<BR>[TAB]↳<B>ID:</B> <A href='?src=\ref[src];item=[slot_wear_id]'>[(wear_id && !(wear_id.flags&ABSTRACT)) ? wear_id : "<font color=grey>Empty</font>"]</A>"
|
||||
|
||||
if(dna)
|
||||
if(dna.species.nojumpsuit)
|
||||
dat += "<BR><B>ID:</B> <A href='?src=\ref[src];item=[slot_wear_id]'>[(wear_id && !(wear_id.flags&ABSTRACT)) ? wear_id : "Nothing"]</A>"
|
||||
else if(w_uniform)
|
||||
dat += "<BR><B>ID:</B> <A href='?src=\ref[src];item=[slot_wear_id]'>[(wear_id && !(wear_id.flags&ABSTRACT)) ? wear_id : "Nothing"]</A>"
|
||||
else if(w_uniform)
|
||||
dat += "<BR><B>ID:</B> <A href='?src=\ref[src];item=[slot_wear_id]'>[(wear_id && !(wear_id.flags&ABSTRACT)) ? wear_id : "Nothing"]</A>"
|
||||
|
||||
dat += "<BR>"
|
||||
|
||||
if(handcuffed)
|
||||
dat += "<BR><B>Handcuffed:</B> <A href='?src=\ref[src];item=[slot_handcuffed]'>Remove</A>"
|
||||
if(legcuffed)
|
||||
dat += "<BR><B>Legcuffed:</B> <A href='?src=\ref[src];item=[slot_legcuffed]'>Remove</A>"
|
||||
dat += "<BR><A href='?src=\ref[src];item=[slot_legcuffed]'>Legcuffed</A>"
|
||||
|
||||
if(dna)
|
||||
if(dna.species.nojumpsuit)
|
||||
dat += "<BR><BR><A href='?src=\ref[src];pockets=left'>Left Pocket ([(l_store && !(l_store.flags&ABSTRACT)) ? "Full" : "Empty"])</A>"
|
||||
dat += " - <A href='?src=\ref[src];pockets=right'>Right Pocket ([(r_store && !(r_store.flags&ABSTRACT)) ? "Full" : "Empty"])</A>"
|
||||
else if(w_uniform)
|
||||
dat += "<BR><BR><A href='?src=\ref[src];pockets=left'>Left Pocket ([(l_store && !(l_store.flags&ABSTRACT)) ? "Full" : "Empty"])</A>"
|
||||
dat += " - <A href='?src=\ref[src];pockets=right'>Right Pocket ([(r_store && !(r_store.flags&ABSTRACT)) ? "Full" : "Empty"])</A>"
|
||||
else if(w_uniform)
|
||||
dat += "<BR><BR><A href='?src=\ref[src];pockets=left'>Left Pocket ([(l_store && !(l_store.flags&ABSTRACT)) ? "Full" : "Empty"])</A>"
|
||||
dat += " - <A href='?src=\ref[src];pockets=right'>Right Pocket ([(r_store && !(r_store.flags&ABSTRACT)) ? "Full" : "Empty"])</A>"
|
||||
|
||||
dat += {"
|
||||
<BR>
|
||||
@@ -467,7 +483,7 @@
|
||||
H.handle_regular_hud_updates()
|
||||
|
||||
if(!modified)
|
||||
usr << "\red Unable to locate a data core entry for this person."
|
||||
usr << "<span class='warning'>Unable to locate a data core entry for this person.</span>"
|
||||
|
||||
/mob/living/carbon/human/proc/play_xylophone()
|
||||
if(!src.xylophone)
|
||||
@@ -516,4 +532,4 @@
|
||||
if(obscured.len > 0)
|
||||
return obscured
|
||||
else
|
||||
return null
|
||||
return null
|
||||
|
||||
@@ -2,163 +2,9 @@
|
||||
if(..()) //to allow surgery to return properly.
|
||||
return
|
||||
|
||||
if((M != src) && check_shields(0, M.name))
|
||||
add_logs(M, src, "attempted to touch")
|
||||
visible_message("<span class='warning'>[M] attempted to touch [src]!</span>")
|
||||
return 0
|
||||
if(dna)
|
||||
dna.species.spec_attack_hand(M, src)
|
||||
|
||||
switch(M.a_intent)
|
||||
if("help")
|
||||
if(health >= 0)
|
||||
help_shake_act(M)
|
||||
if(src != M)
|
||||
add_logs(M, src, "shaked")
|
||||
return 1
|
||||
|
||||
//CPR
|
||||
if((M.head && (M.head.flags & HEADCOVERSMOUTH)) || (M.wear_mask && (M.wear_mask.flags & MASKCOVERSMOUTH)))
|
||||
M << "<span class='notice'>Remove your mask!</span>"
|
||||
return 0
|
||||
if((head && (head.flags & HEADCOVERSMOUTH)) || (wear_mask && (wear_mask.flags & MASKCOVERSMOUTH)))
|
||||
M << "<span class='notice'>Remove their mask!</span>"
|
||||
return 0
|
||||
|
||||
if(cpr_time < world.time + 30)
|
||||
add_logs(src, M, "CPRed")
|
||||
visible_message("<span class='notice'>[M] is trying to perform CPR on [src]!</span>")
|
||||
if(!do_mob(M, src))
|
||||
return 0
|
||||
if((health >= -99 && health <= 0))
|
||||
cpr_time = world.time
|
||||
var/suff = min(getOxyLoss(), 7)
|
||||
adjustOxyLoss(-suff)
|
||||
updatehealth()
|
||||
M.visible_message("[M] performs CPR on [src]!")
|
||||
src << "<span class='unconscious'>You feel a breath of fresh air enter your lungs. It feels good.</span>"
|
||||
|
||||
if("grab")
|
||||
if(M == src || anchored)
|
||||
return 0
|
||||
|
||||
add_logs(M, src, "grabbed", addition="passively")
|
||||
|
||||
if(w_uniform)
|
||||
w_uniform.add_fingerprint(M)
|
||||
|
||||
var/obj/item/weapon/grab/G = new /obj/item/weapon/grab(M, src)
|
||||
if(buckled)
|
||||
M << "<span class='notice'>You cannot grab [src], \he is buckled in!</span>"
|
||||
if(!G) //the grab will delete itself in New if affecting is anchored
|
||||
return
|
||||
M.put_in_active_hand(G)
|
||||
G.synch()
|
||||
LAssailant = M
|
||||
|
||||
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
|
||||
visible_message("<span class='warning'>[M] has grabbed [src] passively!</span>")
|
||||
return 1
|
||||
|
||||
if("harm")
|
||||
add_logs(M, src, "punched")
|
||||
|
||||
var/attack_verb = "punch"
|
||||
if(lying)
|
||||
attack_verb = "kick"
|
||||
else if(M.dna)
|
||||
switch(M.dna.mutantrace)
|
||||
if("lizard")
|
||||
attack_verb = "scratch"
|
||||
if("plant")
|
||||
attack_verb = "slash"
|
||||
|
||||
var/damage = rand(0, 9)
|
||||
if(!damage)
|
||||
switch(attack_verb)
|
||||
if("slash")
|
||||
playsound(loc, 'sound/weapons/slashmiss.ogg', 25, 1, -1)
|
||||
else
|
||||
playsound(loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
|
||||
|
||||
visible_message("<span class='warning'>[M] has attempted to [attack_verb] [src]!</span>")
|
||||
return 0
|
||||
|
||||
|
||||
var/obj/item/organ/limb/affecting = get_organ(ran_zone(M.zone_sel.selecting))
|
||||
var/armor_block = run_armor_check(affecting, "melee")
|
||||
|
||||
if(HULK in M.mutations)
|
||||
damage += 5
|
||||
|
||||
switch(attack_verb)
|
||||
if("slash")
|
||||
playsound(loc, 'sound/weapons/slice.ogg', 25, 1, -1)
|
||||
else
|
||||
playsound(loc, "punch", 25, 1, -1)
|
||||
|
||||
visible_message("<span class='danger'>[M] has [attack_verb]ed [src]!</span>", \
|
||||
"<span class='userdanger'>[M] has [attack_verb]ed [src]!</span>")
|
||||
|
||||
apply_damage(damage, BRUTE, affecting, armor_block)
|
||||
if((stat != DEAD) && damage >= 9)
|
||||
visible_message("<span class='danger'>[M] has weakened [src]!</span>", \
|
||||
"<span class='userdanger'>[M] has weakened [src]!</span>")
|
||||
apply_effect(4, WEAKEN, armor_block)
|
||||
forcesay(hit_appends)
|
||||
else if(lying)
|
||||
forcesay(hit_appends)
|
||||
|
||||
if("disarm")
|
||||
add_logs(M, src, "disarmed")
|
||||
|
||||
if(w_uniform)
|
||||
w_uniform.add_fingerprint(M)
|
||||
var/obj/item/organ/limb/affecting = get_organ(ran_zone(M.zone_sel.selecting))
|
||||
var/randn = rand(1, 100)
|
||||
if(randn <= 25)
|
||||
apply_effect(2, WEAKEN, run_armor_check(affecting, "melee"))
|
||||
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
|
||||
visible_message("<span class='danger'>[M] has pushed [src]!</span>",
|
||||
"<span class='userdanger'>[M] has pushed [src]!</span>")
|
||||
forcesay(hit_appends)
|
||||
return
|
||||
|
||||
var/talked = 0 // BubbleWrap
|
||||
|
||||
if(randn <= 60)
|
||||
//BubbleWrap: Disarming breaks a pull
|
||||
if(pulling)
|
||||
visible_message("<span class='warning'>[M] has broken [src]'s grip on [pulling]!</span>")
|
||||
talked = 1
|
||||
stop_pulling()
|
||||
|
||||
//BubbleWrap: Disarming also breaks a grab - this will also stop someone being choked, won't it?
|
||||
if(istype(l_hand, /obj/item/weapon/grab))
|
||||
var/obj/item/weapon/grab/lgrab = l_hand
|
||||
if(lgrab.affecting)
|
||||
visible_message("<span class='warning'>[M] has broken [src]'s grip on [lgrab.affecting]!</span>")
|
||||
talked = 1
|
||||
spawn(1)
|
||||
qdel(lgrab)
|
||||
if(istype(r_hand, /obj/item/weapon/grab))
|
||||
var/obj/item/weapon/grab/rgrab = r_hand
|
||||
if(rgrab.affecting)
|
||||
visible_message("<span class='warning'>[M] has broken [src]'s grip on [rgrab.affecting]!</span>")
|
||||
talked = 1
|
||||
spawn(1)
|
||||
qdel(rgrab)
|
||||
//End BubbleWrap
|
||||
|
||||
if(!talked) //BubbleWrap
|
||||
if(drop_item())
|
||||
visible_message("<span class='danger'>[M] has disarmed [src]!</span>", \
|
||||
"<span class='userdanger'>[M] has disarmed [src]!</span>")
|
||||
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
|
||||
return
|
||||
|
||||
|
||||
playsound(loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
|
||||
visible_message("<span class='danger'>[M] attempted to disarm [src]!</span>", \
|
||||
"<span class='userdanger'>[M] attemped to disarm [src]!</span>")
|
||||
return
|
||||
|
||||
/mob/living/carbon/human/proc/afterattack(atom/target as mob|obj|turf|area, mob/living/user as mob|obj, inrange, params)
|
||||
|
||||
@@ -102,6 +102,7 @@ mob/living/carbon/human/proc/hat_fall_prob()
|
||||
var/obj/item/organ/limb/picked = pick(parts)
|
||||
if(picked.take_damage(brute,burn))
|
||||
update_damage_overlays(0)
|
||||
|
||||
updatehealth()
|
||||
|
||||
|
||||
@@ -128,6 +129,7 @@ mob/living/carbon/human/proc/hat_fall_prob()
|
||||
// damage MANY external organs, in random order
|
||||
/mob/living/carbon/human/take_overall_damage(var/brute, var/burn)
|
||||
if(status_flags & GODMODE) return //godmode
|
||||
|
||||
var/list/obj/item/organ/limb/parts = get_damageable_organs()
|
||||
var/update = 0
|
||||
while(parts.len && (brute>0 || burn>0) )
|
||||
@@ -143,7 +145,9 @@ mob/living/carbon/human/proc/hat_fall_prob()
|
||||
burn -= (picked.burn_dam - burn_was)
|
||||
|
||||
parts -= picked
|
||||
|
||||
updatehealth()
|
||||
|
||||
if(update) update_damage_overlays(0)
|
||||
|
||||
|
||||
@@ -159,34 +163,38 @@ mob/living/carbon/human/proc/hat_fall_prob()
|
||||
|
||||
|
||||
/mob/living/carbon/human/apply_damage(var/damage = 0,var/damagetype = BRUTE, var/def_zone = null, var/blocked = 0)
|
||||
if((damagetype != BRUTE) && (damagetype != BURN))
|
||||
..(damage, damagetype, def_zone, blocked)
|
||||
return 1
|
||||
|
||||
blocked = (100-blocked)/100
|
||||
if(blocked <= 0) return 0
|
||||
|
||||
var/obj/item/organ/limb/organ = null
|
||||
if(isorgan(def_zone))
|
||||
organ = def_zone
|
||||
if(dna) // if you have a species, it will run the apply_damage code there instead
|
||||
dna.species.apply_damage(damage, damagetype, def_zone, blocked, src)
|
||||
else
|
||||
if(!def_zone) def_zone = ran_zone(def_zone)
|
||||
organ = get_organ(check_zone(def_zone))
|
||||
if(!organ) return 0
|
||||
if((damagetype != BRUTE) && (damagetype != BURN))
|
||||
..(damage, damagetype, def_zone, blocked)
|
||||
return 1
|
||||
|
||||
damage = (damage * blocked)
|
||||
else
|
||||
blocked = (100-blocked)/100
|
||||
if(blocked <= 0) return 0
|
||||
|
||||
switch(damagetype)
|
||||
if(BRUTE)
|
||||
damageoverlaytemp = 20
|
||||
if(organ.take_damage(damage, 0))
|
||||
update_damage_overlays(0)
|
||||
if(BURN)
|
||||
damageoverlaytemp = 20
|
||||
if(organ.take_damage(0, damage))
|
||||
update_damage_overlays(0)
|
||||
var/obj/item/organ/limb/organ = null
|
||||
if(isorgan(def_zone))
|
||||
organ = def_zone
|
||||
else
|
||||
if(!def_zone) def_zone = ran_zone(def_zone)
|
||||
organ = get_organ(check_zone(def_zone))
|
||||
if(!organ) return 0
|
||||
|
||||
// Will set our damageoverlay icon to the next level, which will then be set back to the normal level the next mob.Life().
|
||||
damage = (damage * blocked)
|
||||
|
||||
updatehealth()
|
||||
switch(damagetype)
|
||||
if(BRUTE)
|
||||
damageoverlaytemp = 20
|
||||
if(organ.take_damage(damage, 0))
|
||||
update_damage_overlays(0)
|
||||
if(BURN)
|
||||
damageoverlaytemp = 20
|
||||
if(organ.take_damage(0, damage))
|
||||
update_damage_overlays(0)
|
||||
|
||||
// Will set our damageoverlay icon to the next level, which will then be set back to the normal level the next mob.Life().
|
||||
|
||||
updatehealth()
|
||||
return 1
|
||||
|
||||
@@ -36,6 +36,11 @@ emp_act
|
||||
protection += C.armor[type]
|
||||
return protection
|
||||
|
||||
/mob/living/carbon/human/on_hit(proj_type)
|
||||
if(dna)
|
||||
dna.species.on_hit(proj_type, src)
|
||||
return
|
||||
|
||||
/mob/living/carbon/human/bullet_act(var/obj/item/projectile/P, var/def_zone)
|
||||
if(istype(P, /obj/item/projectile/energy) || istype(P, /obj/item/projectile/beam))
|
||||
if(check_reflect(def_zone)) // Checks if you've passed a reflection% check
|
||||
@@ -118,94 +123,93 @@ emp_act
|
||||
/mob/living/carbon/human/attacked_by(var/obj/item/I, var/mob/living/user, var/def_zone)
|
||||
if(!I || !user) return 0
|
||||
|
||||
var/obj/item/organ/limb/target_limb = get_organ(user.zone_sel.selecting)
|
||||
var/obj/item/organ/limb/affecting = get_organ(ran_zone(user.zone_sel.selecting))
|
||||
|
||||
var/hit_area = parse_zone(affecting.name)
|
||||
var/target_area = parse_zone(target_limb.name)
|
||||
|
||||
if((user != src) && check_shields(I.force, "the [I.name]"))
|
||||
return 0
|
||||
if(dna) // allows your species to affect the attacked_by code
|
||||
return dna.species.spec_attacked_by(I,user,def_zone,affecting,hit_area,src.a_intent,target_limb,target_area,src)
|
||||
|
||||
if(I.attack_verb && I.attack_verb.len)
|
||||
visible_message("<span class='danger'>[src] has been [pick(I.attack_verb)] in the [hit_area] with [I] by [user]!</span>", \
|
||||
"<span class='userdanger'>[src] has been [pick(I.attack_verb)] in the [hit_area] with [I] by [user]!</span>")
|
||||
else if(I.force)
|
||||
visible_message("<span class='danger'>[src] has been attacked in the [hit_area] with [I] by [user]!</span>", \
|
||||
"<span class='userdanger'>[src] has been attacked in the [hit_area] with [I] by [user]!</span>")
|
||||
else
|
||||
return 0
|
||||
if((user != src) && check_shields(I.force, "the [I.name]"))
|
||||
return 0
|
||||
|
||||
var/armor = run_armor_check(affecting, "melee", "<span class='warning'>Your armour has protected your [hit_area].</span>", "<span class='warning'>Your armour has softened a hit to your [hit_area].</span>")
|
||||
if(armor >= 100) 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)
|
||||
if(I.attack_verb && I.attack_verb.len)
|
||||
visible_message("<span class='danger'>[src] has been [pick(I.attack_verb)] in the [hit_area] with [I] by [user]!</span>", \
|
||||
"<span class='userdanger'>[src] has been [pick(I.attack_verb)] in the [hit_area] with [I] by [user]!</span>")
|
||||
else if(I.force)
|
||||
visible_message("<span class='danger'>[src] has been attacked in the [hit_area] with [I] by [user]!</span>", \
|
||||
"<span class='userdanger'>[src] has been attacked in the [hit_area] with [I] by [user]!</span>")
|
||||
else
|
||||
return 0
|
||||
|
||||
apply_damage(I.force, I.damtype, affecting, armor , I)
|
||||
var/armor = run_armor_check(affecting, "melee", "<span class='warning'>Your armour has protected your [hit_area].</span>", "<span class='warning'>Your armour has softened a hit to your [hit_area].</span>")
|
||||
if(armor >= 100) 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)
|
||||
|
||||
var/bloody = 0
|
||||
if(((I.damtype == BRUTE) && prob(25 + (I.force * 2))))
|
||||
if(affecting.status == ORGAN_ORGANIC)
|
||||
I.add_blood(src) //Make the weapon bloody, not the person.
|
||||
if(prob(I.force * 2)) //blood spatter!
|
||||
bloody = 1
|
||||
var/turf/location = loc
|
||||
if(istype(location, /turf/simulated))
|
||||
location.add_blood(src)
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(get_dist(H, src) <= 1) //people with TK won't get smeared with blood
|
||||
if(H.wear_suit)
|
||||
H.wear_suit.add_blood(src)
|
||||
H.update_inv_wear_suit(0) //updates mob overlays to show the new blood (no refresh)
|
||||
else if(H.w_uniform)
|
||||
H.w_uniform.add_blood(src)
|
||||
H.update_inv_w_uniform(0) //updates mob overlays to show the new blood (no refresh)
|
||||
if (H.gloves)
|
||||
var/obj/item/clothing/gloves/G = H.gloves
|
||||
G.add_blood(H)
|
||||
else
|
||||
H.add_blood(H)
|
||||
H.update_inv_gloves() //updates on-mob overlays for bloody hands and/or bloody gloves
|
||||
apply_damage(I.force, I.damtype, affecting, armor , I)
|
||||
|
||||
var/bloody = 0
|
||||
if(((I.damtype == BRUTE) && prob(25 + (I.force * 2))))
|
||||
if(affecting.status == ORGAN_ORGANIC)
|
||||
I.add_blood(src) //Make the weapon bloody, not the person.
|
||||
if(prob(I.force * 2)) //blood spatter!
|
||||
bloody = 1
|
||||
var/turf/location = loc
|
||||
if(istype(location, /turf/simulated))
|
||||
location.add_blood(src)
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(get_dist(H, src) <= 1) //people with TK won't get smeared with blood
|
||||
if(H.wear_suit)
|
||||
H.wear_suit.add_blood(src)
|
||||
H.update_inv_wear_suit(0) //updates mob overlays to show the new blood (no refresh)
|
||||
else if(H.w_uniform)
|
||||
H.w_uniform.add_blood(src)
|
||||
H.update_inv_w_uniform(0) //updates mob overlays to show the new blood (no refresh)
|
||||
if (H.gloves)
|
||||
var/obj/item/clothing/gloves/G = H.gloves
|
||||
G.add_blood(H)
|
||||
else
|
||||
H.add_blood(H)
|
||||
H.update_inv_gloves() //updates on-mob overlays for bloody hands and/or bloody gloves
|
||||
|
||||
switch(hit_area)
|
||||
if("head") //Harder to score a stun but if you do it lasts a bit longer
|
||||
if(stat == CONSCIOUS && prob(I.force))
|
||||
if(Iforce >= 5)
|
||||
switch(hit_area)
|
||||
if("head") //Harder to score a stun but if you do it lasts a bit longer
|
||||
if(stat == CONSCIOUS && prob(I.force))
|
||||
visible_message("<span class='danger'>[src] has been knocked unconscious!</span>", \
|
||||
"<span class='userdanger'>[src] has been knocked unconscious!</span>")
|
||||
apply_effect(20, PARALYZE, armor)
|
||||
if(src != user && I.damtype == BRUTE)
|
||||
ticker.mode.remove_revolutionary(mind)
|
||||
if(bloody) //Apply blood
|
||||
if(wear_mask)
|
||||
wear_mask.add_blood(src)
|
||||
update_inv_wear_mask(0)
|
||||
if(head)
|
||||
head.add_blood(src)
|
||||
update_inv_head(0)
|
||||
if(glasses && prob(33))
|
||||
glasses.add_blood(src)
|
||||
update_inv_glasses(0)
|
||||
|
||||
if(bloody) //Apply blood
|
||||
if(wear_mask)
|
||||
wear_mask.add_blood(src)
|
||||
update_inv_wear_mask(0)
|
||||
if(head)
|
||||
head.add_blood(src)
|
||||
update_inv_head(0)
|
||||
if(glasses && prob(33))
|
||||
glasses.add_blood(src)
|
||||
update_inv_glasses(0)
|
||||
|
||||
if("chest") //Easier to score a stun but lasts less time
|
||||
if(stat == CONSCIOUS && prob(I.force + 10))
|
||||
if(Iforce >= 5)
|
||||
if("chest") //Easier to score a stun but lasts less time
|
||||
if(stat == CONSCIOUS && prob(I.force + 10))
|
||||
visible_message("<span class='danger'>[src] has been knocked down!</span>", \
|
||||
"<span class='userdanger'>[src] has been knocked down!</span>")
|
||||
apply_effect(5, WEAKEN, armor)
|
||||
|
||||
if(bloody)
|
||||
if(wear_suit)
|
||||
wear_suit.add_blood(src)
|
||||
update_inv_wear_suit(0)
|
||||
if(w_uniform)
|
||||
w_uniform.add_blood(src)
|
||||
update_inv_w_uniform(0)
|
||||
|
||||
if(Iforce > 10 || Iforce >= 5 && prob(33))
|
||||
forcesay(hit_appends) //forcesay checks stat already.
|
||||
|
||||
if(bloody)
|
||||
if(wear_suit)
|
||||
wear_suit.add_blood(src)
|
||||
update_inv_wear_suit(0)
|
||||
if(w_uniform)
|
||||
w_uniform.add_blood(src)
|
||||
update_inv_w_uniform(0)
|
||||
|
||||
if(Iforce > 10 || Iforce >= 5 && prob(33))
|
||||
forcesay(hit_appends) //forcesay checks stat already
|
||||
|
||||
/mob/living/carbon/human/emp_act(severity)
|
||||
var/informed = 0
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
var/obj/item/l_store = null
|
||||
var/obj/item/s_store = null
|
||||
|
||||
var/base_icon_state = "caucasian1_m"
|
||||
var/icon/base_icon_state = "caucasian1_m"
|
||||
|
||||
var/list/organs = list() //Gets filled up in the constructor (human.dm, New() proc, line 24. I'm sick and tired of missing comments. -Agouri
|
||||
|
||||
|
||||
@@ -119,4 +119,11 @@
|
||||
return 1//Humans can use guns and such
|
||||
|
||||
/mob/living/carbon/human/InCritical()
|
||||
return (health <= config.health_threshold_crit && stat == UNCONSCIOUS)
|
||||
return (health <= config.health_threshold_crit && stat == UNCONSCIOUS)
|
||||
|
||||
/mob/living/carbon/human/reagent_check(datum/reagent/R)
|
||||
if(dna)
|
||||
var/bypass = dna.species.handle_chemicals(R,src)
|
||||
return bypass // if it returns 0, it will run the usual on_mob_life for that reagent. otherwise, it will stop after running handle_chemicals for the species.
|
||||
else
|
||||
return 0
|
||||
@@ -1,29 +1,6 @@
|
||||
/mob/living/carbon/human/movement_delay()
|
||||
if(!has_gravity(src))
|
||||
return -1 //It's hard to be slowed down in space by... anything
|
||||
else if(status_flags & GOTTAGOFAST)
|
||||
return -1
|
||||
|
||||
. = 0
|
||||
var/health_deficiency = (100 - health + staminaloss)
|
||||
if(health_deficiency >= 40)
|
||||
. += (health_deficiency / 25)
|
||||
|
||||
var/hungry = (500 - nutrition) / 5 //So overeat would be 100 and default level would be 80
|
||||
if(hungry >= 70)
|
||||
. += hungry / 50
|
||||
|
||||
if(wear_suit)
|
||||
. += wear_suit.slowdown
|
||||
if(shoes)
|
||||
. += shoes.slowdown
|
||||
if(back)
|
||||
. += back.slowdown
|
||||
|
||||
if(FAT in mutations)
|
||||
. += 1.5
|
||||
if(bodytemperature < 283.222)
|
||||
. += (283.222 - bodytemperature) / 10 * 1.75
|
||||
if(dna)
|
||||
. += dna.species.movement_delay(src)
|
||||
|
||||
. += ..()
|
||||
. += config.human_delay
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user