"
+ if(!R.total_volume)
+ dat += "[beaker] is empty."
+ else
+ dat += "Contained reagents: "
+ for(var/datum/reagent/blood/G in R.reagent_list)
+ dat += " [G.name]: Isolate"
+ user << browse("Pathogenic IsolatorIsolator menu:
[dat]", "window=isolator;size=575x400")
+ onclose(user, "isolator")
+ return
+
+
+
+
+ process()
+ if(isolating > 0)
+ isolating -= 1
+ if(isolating == 0)
+ var/obj/item/weapon/virusdish/d = new /obj/item/weapon/virusdish(src.loc)
+ d.virus2 = virus2.getcopy()
+ virus2 = null
+ icon_state = "isolator_in"
+
+
+
+
+/obj/item/weapon/virusdish
+ name = "Virus containment/growth dish"
+ icon = 'icons/obj/items.dmi'
+ icon_state = "implantcase-b"
+ var/datum/disease2/disease/virus2 = null
+ var/growth = 0
+ var/info = 0
+ var/analysed = 0
+
+/obj/item/weapon/virusdish/attackby(var/obj/item/weapon/W as obj,var/mob/living/carbon/user as mob)
+ if(istype(W,/obj/item/weapon/hand_labeler))
+ return
+ ..()
+ if(prob(50))
+ user << "The dish shatters"
+ if(virus2.infectionchance > 0)
+ infect_virus2(user,virus2)
+ del src
+
+/obj/item/weapon/virusdish/examine()
+ usr << "This is a virus containment dish"
+ if(src.info)
+ usr << "It has the following information about its contents"
+ usr << src.info
diff --git a/code/WorkInProgress/virus2/Disease2/monkeydispensor.dm b/code/WorkInProgress/virus2/Disease2/monkeydispensor.dm
new file mode 100644
index 0000000000..13d1b9806f
--- /dev/null
+++ b/code/WorkInProgress/virus2/Disease2/monkeydispensor.dm
@@ -0,0 +1,30 @@
+/obj/machinery/disease2/monkeycloner
+ name = "Monkey dispensor"
+ icon = 'icons/obj/cloning.dmi'
+ icon_state = "pod_0"
+ density = 1
+ anchored = 1
+
+ var/cloning = 0
+
+/obj/machinery/disease2/monkeycloner/attack_hand()
+ if(!cloning)
+ cloning = 150
+
+ icon_state = "pod_g"
+
+/obj/machinery/disease2/monkeycloner/process()
+ if(stat & (NOPOWER|BROKEN))
+ return
+ use_power(500)
+ src.updateDialog()
+
+ if(cloning)
+ cloning -= 1
+ if(!cloning)
+ new /mob/living/carbon/monkey(src.loc)
+ icon_state = "pod_0"
+
+
+
+ return
diff --git a/code/WorkInProgress/virus2/antibodies.dm b/code/WorkInProgress/virus2/antibodies.dm
index 6495bb4d04..6277e1a617 100644
--- a/code/WorkInProgress/virus2/antibodies.dm
+++ b/code/WorkInProgress/virus2/antibodies.dm
@@ -1,4 +1,4 @@
-//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:06
+//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:33
// pure concentrated antibodies
datum/reagent/antibodies
@@ -9,12 +9,10 @@ datum/reagent/antibodies
color = "#0050F0"
reaction_mob(var/mob/M, var/method=TOUCH, var/volume)
- if(istype(M,/mob/living/carbon))
+ if(istype(M,/mob/living/carbon/human))
if(src.data && method == INGEST)
- if(M:virus2) if(src.data["antibodies"] & M:virus2.antigen)
+ if(src.data["antibodies"] & M:virus2.antigen)
M:virus2.dead = 1
- // if the virus is killed this way it immunizes
- M:antibodies |= M:virus2.antigen
return
// reserving some numbers for later special antigens
@@ -44,8 +42,8 @@ var/global/list/ANTIGENS = list("[ANTIGEN_A]" = "A", "[ANTIGEN_B]" = "B", "[ANTI
icon_state = "health"
w_class = 2.0
item_state = "electronic"
- flags = FPRINT | TABLEPASS | CONDUCT | USEDELAY
- slot_flags = SLOT_BELT
+ flags = FPRINT | TABLEPASS | ONBELT | CONDUCT | USEDELAY
+
/obj/item/device/antibody_scanner/attack(mob/living/carbon/human/M as mob, mob/user as mob)
if(! istype(M, /mob/living/carbon) || !M:antibodies)
diff --git a/code/WorkInProgress/virus2/base.dm b/code/WorkInProgress/virus2/base.dm
index 8036360e63..0f622bfaaa 100644
--- a/code/WorkInProgress/virus2/base.dm
+++ b/code/WorkInProgress/virus2/base.dm
@@ -1,3 +1,16 @@
+/obj/virus
+ // a virus instance that is placed on the map, moves, and infects
+ invisibility = INVISIBILITY_MAXIMUM
+
+ var/datum/disease2/disease
+
+ New()
+ ..()
+ step_rand(src)
+ step_rand(src)
+ anchored = 1
+ spawn(300) del(src)
+
/mob/living/carbon/proc/get_infection_chance()
var/score = 0
var/mob/living/carbon/M = src
@@ -31,22 +44,15 @@
return 1
-proc/airborne_can_reach(turf/source, turf/target)
- var/obj/dummy = new(source)
- dummy.flags = FPRINT | TABLEPASS
- dummy.pass_flags = PASSTABLE
-
- for(var/i=0, i<5, i++) if(!step_towards(dummy, target)) break
-
- var/rval = (dummy.loc in range(1,target))
- del dummy
- return rval
-
/proc/infect_virus2(var/mob/living/carbon/M,var/datum/disease2/disease/disease,var/forced = 0)
if(M.virus2)
return
if(!disease)
return
+ //immunity
+ /*for(var/iii = 1, iii <= M.immunevirus2.len, iii++)
+ if(disease.issame(M.immunevirus2[iii]))
+ return*/
// if one of the antibodies in the mob's body matches one of the disease's antigens, don't infect
if(M.antibodies & disease.antigen != 0) return
@@ -97,6 +103,7 @@ proc/airborne_can_reach(turf/source, turf/target)
if(!M.virus2)
M.virus2 = new /datum/disease2/disease
M.virus2.makerandom()
+ M.virus2.infectionchance = 1
/proc/infect_mob_random_greater(var/mob/living/carbon/M)
if(!M.virus2)
@@ -109,7 +116,7 @@ proc/airborne_can_reach(turf/source, turf/target)
var/infectionchance = 10
var/speed = 1
var/spreadtype = "Blood" // Can also be "Airborne"
- var/stage = 0
+ var/stage = 1
var/stageprob = 10
var/dead = 0
var/clicks = 0
@@ -146,7 +153,7 @@ proc/airborne_can_reach(turf/source, turf/target)
holder.getrandomeffect_lesser()
effects += holder
uniqueID = rand(0,10000)
- infectionchance = rand(4,10)
+ infectionchance = rand(1,10)
// pick 2 antigens
antigen |= text2num(pick(ANTIGENS))
antigen |= text2num(pick(ANTIGENS))
@@ -210,18 +217,19 @@ proc/airborne_can_reach(turf/source, turf/target)
return
// with a certain chance, the mob may become immune to the disease before it starts properly
if(stage <= 1 && clicks == 0)
- if(prob(3))
- mob.antibodies |= antigen // 3% chance of spontanous immunity
+ if(prob(20))
+ mob.antibodies |= antigen // 20% immunity is a good chance IMO, because it allows finding an immune person easily
else
if(mob.radiation > 50)
if(prob(1))
majormutate()
if(mob.reagents.has_reagent("spaceacillin"))
+ mob.reagents.remove_reagent("spaceacillin",0.3)
return
if(mob.reagents.has_reagent("virusfood"))
mob.reagents.remove_reagent("virusfood",0.1)
clicks += 10
- if(clicks > (stage+1)*100 && prob(10))
+ if(clicks > stage*100 && prob(10))
if(stage == 4)
var/datum/disease2/resistance/res = new /datum/disease2/resistance(src)
src.cure(mob)
@@ -235,20 +243,18 @@ proc/airborne_can_reach(turf/source, turf/target)
e.runeffect(mob,stage)
clicks+=speed
- if(prob(50)) spread_airborne(mob)
-
proc/cure(var/mob/living/carbon/mob)
var/datum/disease2/effectholder/E
if(stage>1)
E = effects[1]
E.effect.deactivate(mob)
- if(stage>=2)
+ if(stage>2)
E = effects[2]
E.effect.deactivate(mob)
- if(stage>=3)
+ if(stage>3)
E = effects[3]
E.effect.deactivate(mob)
- if(stage>=4)
+ if(stage>4)
E = effects[4]
E.effect.deactivate(mob)
@@ -262,13 +268,14 @@ proc/airborne_can_reach(turf/source, turf/target)
proc/getcopy()
+// world << "getting copy"
var/datum/disease2/disease/disease = new /datum/disease2/disease
disease.infectionchance = infectionchance
disease.spreadtype = spreadtype
disease.stageprob = stageprob
disease.antigen = antigen
- disease.uniqueID = uniqueID
for(var/datum/disease2/effectholder/holder in effects)
+ // world << "adding effects"
var/datum/disease2/effectholder/newholder = new /datum/disease2/effectholder
newholder.effect = new holder.effect.type
newholder.chance = holder.chance
@@ -277,30 +284,18 @@ proc/airborne_can_reach(turf/source, turf/target)
newholder.happensonce = holder.happensonce
newholder.stage = holder.stage
disease.effects += newholder
+ // world << "[newholder.effect.name]"
+ // world << "[disease]"
return disease
- proc/spread_airborne(var/mob/living/carbon/mob)
- for(var/mob/living/carbon/target in view(null, mob)) if(!target.virus2)
- if(airborne_can_reach(mob.loc, target.loc))
- if(mob.get_infection_chance() && target.get_infection_chance())
- infect_virus2(target,src)
-
/datum/disease2/effect
var/chance_maxm = 100
var/name = "Blanking effect"
var/stage = 4
var/maxm = 1
- var/happensalways = 0
proc/activate(var/mob/living/carbon/mob,var/multiplier)
proc/deactivate(var/mob/living/carbon/mob)
-// ================================
-// ======= DISEASE SYMPTOMS =======
-// ================================
-
-// Special diseases
-// --------------------------------
-
/datum/disease2/effect/alien
name = "Unidentified Foreign Body"
stage = 4
@@ -317,75 +312,18 @@ proc/airborne_can_reach(turf/source, turf/target)
mob:gib()
del D
-// Greater Diseases, Stage 1
-// --------------------------------
-
-
-/datum/disease2/effect/greater/gunck
- name = "Flemmingtons"
- stage = 1
+/datum/disease2/effect/greater/gibbingtons
+ name = "Gibbingtons Syndrome"
+ stage = 4
activate(var/mob/living/carbon/mob,var/multiplier)
- mob << "\red Mucous runs down the back of your throat."
+ mob.gib()
-
-// Greater Diseases, Stage 2
-// --------------------------------
-
-/datum/disease2/effect/greater/cough
- name = "Anima Syndrome"
- stage = 2
+/datum/disease2/effect/greater/radian
+ name = "Radian's syndrome"
+ stage = 4
+ maxm = 3
activate(var/mob/living/carbon/mob,var/multiplier)
- mob.say("*cough")
- if(mob.virus2) mob.virus2.spread_airborne(mob)
- if(mob.virus2) mob.virus2.spread_airborne(mob)
- if(prob(2))
- var/obj/effect/decal/cleanable/mucus/this = new(mob.loc)
- this.virus2 = mob.virus2
-
-/datum/disease2/effect/greater/vomit
- name = "Bad Stomach Syndrome"
- stage = 2
- activate(var/mob/living/carbon/mob,var/multiplier)
- if(prob(20) && mob.nutrition > 200)
- mob.vomit()
-
-
-/datum/disease2/effect/greater/sneeze
- name = "Coldingtons Effect"
- stage = 2
- activate(var/mob/living/carbon/mob,var/multiplier)
- mob.say("*sneeze")
- if(mob.virus2) mob.virus2.spread_airborne(mob)
- if(mob.virus2) mob.virus2.spread_airborne(mob)
- if(prob(5))
- var/obj/effect/decal/cleanable/mucus/this = new(mob.loc)
- this.anchored = 0
- step(this, mob.dir)
- this.anchored = 1
- this.virus2 = mob.virus2
-
-// Greater Diseases, Stage 3
-// --------------------------------
-
-/datum/disease2/effect/greater/sleepy
- name = "Resting syndrome"
- stage = 3
- activate(var/mob/living/carbon/mob,var/multiplier)
- mob.say("*collapse")
-
-/datum/disease2/effect/greater/mind
- name = "Lazy mind syndrome"
- stage = 3
- activate(var/mob/living/carbon/mob,var/multiplier)
- mob.setBrainLoss(50)
-
-
-/datum/disease2/effect/greater/hallucinations
- name = "Hallucinational Syndrome"
- stage = 3
- activate(var/mob/living/carbon/mob,var/multiplier)
- mob.hallucination += 25
-
+ mob.radiation += (2*multiplier)
/datum/disease2/effect/greater/toxins
name = "Hyperacid Syndrome"
@@ -394,9 +332,15 @@ proc/airborne_can_reach(turf/source, turf/target)
activate(var/mob/living/carbon/mob,var/multiplier)
mob.adjustToxLoss((2*multiplier))
+/datum/disease2/effect/greater/scream
+ name = "Random screaming syndrome"
+ stage = 2
+ activate(var/mob/living/carbon/mob,var/multiplier)
+ mob.say("*scream")
+
/datum/disease2/effect/greater/drowsness
name = "Automated sleeping syndrome"
- stage = 3
+ stage = 2
activate(var/mob/living/carbon/mob,var/multiplier)
mob.drowsyness += 10
@@ -407,6 +351,17 @@ proc/airborne_can_reach(turf/source, turf/target)
activate(var/mob/living/carbon/mob,var/multiplier)
shake_camera(mob,5*multiplier)
+/datum/disease2/effect/greater/deaf
+ name = "Hard of hearing syndrome"
+ stage = 4
+ activate(var/mob/living/carbon/mob,var/multiplier)
+ mob.ear_deaf += 20
+
+/datum/disease2/effect/invisible
+ name = "Waiting Syndrome"
+ stage = 1
+ activate(var/mob/living/carbon/mob,var/multiplier)
+ return
/datum/disease2/effect/greater/telepathic
name = "Telepathy Syndrome"
@@ -414,55 +369,13 @@ proc/airborne_can_reach(turf/source, turf/target)
activate(var/mob/living/carbon/mob,var/multiplier)
mob.mutations |= 512
-// Greater Diseases, Stage 4
-// --------------------------------
-
-/datum/disease2/effect/greater/gibbingtons
- name = "Gibbingtons Syndrome"
+/*/datum/disease2/effect/greater/noface
+ name = "Identity Loss syndrome"
stage = 4
activate(var/mob/living/carbon/mob,var/multiplier)
- mob.gib()
-
-
-/datum/disease2/effect/greater/blood_fountain
- name = "Blood Fountain Syndrome"
- stage = 4
- activate(var/mob/living/carbon/mob,var/multiplier)
- if(prob(20))
- mob.visible_message("\red You see a fountain of blood erupt from [mob.name].","\red Something wet is leaking from you.","You hear a loud splash.")
- mob.drip(50)
-
-/datum/disease2/effect/greater/radian
- name = "Radian's syndrome"
- stage = 4
- maxm = 2
- activate(var/mob/living/carbon/mob,var/multiplier)
- mob.radiation += (20*multiplier)
-
-/datum/disease2/effect/greater/fever
- name = "Fever syndrome"
- stage = 4
- maxm = 2
- activate(var/mob/living/carbon/mob,var/multiplier)
- mob.adjustFireLoss(10 * multiplier)
-
-
-/datum/disease2/effect/greater/weak_bones
- name = "Bone Density Syndrome"
- stage = 4
- maxm = 2
- activate(var/mob/living/carbon/mob,var/multiplier)
- var/name = pick(mob.organs)
- var/datum/organ/external/organ = mob.organs[name]
-
- if(!(organ.status & ORGAN_BROKEN) && !(organ.status & ORGAN_ROBOT))
- mob.adjustBruteLoss(10)
- mob.visible_message("\red You hear a loud cracking sound coming from [mob.name].","\red Something feels like it shattered in your [organ.display_name]!","You hear a sickening crack.")
- mob.emote("scream")
- organ.status |= ORGAN_BROKEN
- organ.broken_description = pick("broken","fracture","hairline fracture")
- organ.perma_injury = 10
-
+ mob.face_dmg++
+ deactivate(var/mob/living/carbon/mob)
+ mob.face_dmg--*/
/datum/disease2/effect/greater/monkey
name = "Monkism syndrome"
@@ -472,6 +385,17 @@ proc/airborne_can_reach(turf/source, turf/target)
var/mob/living/carbon/human/h = mob
h.monkeyize()
+/datum/disease2/effect/greater/sneeze
+ name = "Coldingtons Effect"
+ stage = 1
+ activate(var/mob/living/carbon/mob,var/multiplier)
+ mob.say("*sneeze")
+
+/datum/disease2/effect/greater/gunck
+ name = "Flemmingtons"
+ stage = 1
+ activate(var/mob/living/carbon/mob,var/multiplier)
+ mob << "\red Mucous runs down the back of your throat."
/datum/disease2/effect/greater/killertoxins
name = "Toxification syndrome"
@@ -479,137 +403,60 @@ proc/airborne_can_reach(turf/source, turf/target)
activate(var/mob/living/carbon/mob,var/multiplier)
mob.adjustToxLoss(15)
-
-// Lesser Diseases, Stage 1
-// --------------------------------
-
-/datum/disease2/effect/lesser/gunck
- name = "Flemmingtons"
- stage = 1
- activate(var/mob/living/carbon/mob,var/multiplier)
- mob << "\red Mucous runs down the back of your throat."
-
-/datum/disease2/effect/lesser/fridge
- name = "Refridgerator Syndrome"
- stage = 1
- activate(var/mob/living/carbon/mob,var/multiplier)
- if(prob(10)) mob << "\blue You feel extremely cold."
-
-
-/datum/disease2/effect/lesser/pale
- name = "Ghost Effect"
- stage = 1
- activate(var/mob/living/carbon/mob,var/multiplier)
- mob << "\blue If you had a mirror, your reflection would probably look very pale.."
-
-/datum/disease2/effect/lesser/hoarse
- name = "Hoarse Throat"
- stage = 1
- happensalways = 1 // the mob will have a permanently sore throat
- activate(var/mob/living/carbon/mob,var/multiplier)
- mob.disease_symptoms |= DISEASE_HOARSE
- if(prob(3)) mob << "\blue Your throat feels very sore.."
-
-
-// Lesser Diseases, Stage 2
-// --------------------------------
-/datum/disease2/effect/lesser/sneeze
- name = "Coldingtons Effect"
- stage = 2
- activate(var/mob/living/carbon/mob,var/multiplier)
- mob.say("*sneeze")
- if(mob.virus2) mob.virus2.spread_airborne(mob)
- if(mob.virus2) mob.virus2.spread_airborne(mob)
- if(prob(10))
- var/obj/effect/decal/cleanable/mucus/this = new(mob.loc)
- this.anchored = 0
- step(this, mob.dir)
- this.anchored = 1
- this.virus2 = mob.virus2
-
-/datum/disease2/effect/lesser/cough
- name = "Anima Syndrome"
- stage = 2
- activate(var/mob/living/carbon/mob,var/multiplier)
- mob.say("*cough")
- if(mob.virus2) mob.virus2.spread_airborne(mob)
- if(mob.virus2) mob.virus2.spread_airborne(mob)
- if(prob(10))
- var/obj/effect/decal/cleanable/mucus/this = new(mob.loc)
- this.virus2 = mob.virus2
-
-
-/datum/disease2/effect/lesser/nosebleed
- name = "Nosebleed Effect"
- stage = 2
- activate(var/mob/living/carbon/mob,var/multiplier)
- if(prob(30))
- mob.drip(1)
-
-// Lesser Diseases, Stage 3
-// --------------------------------
-
-/datum/disease2/effect/lesser/vomit
- name = "Bad Stomach Syndrome"
- stage = 3
- activate(var/mob/living/carbon/mob,var/multiplier)
- if(prob(5) && mob.nutrition > 200)
- mob.vomit()
-
-
-// lesser syndromes, partly just copypastes
-/datum/disease2/effect/lesser/hallucinations
+/*/datum/disease2/effect/greater/hallucinations
name = "Hallucinational Syndrome"
stage = 3
activate(var/mob/living/carbon/mob,var/multiplier)
- mob.hallucination += 5
+ mob.hallucination += 25*/
+/datum/disease2/effect/greater/sleepy
+ name = "Resting syndrome"
+ stage = 2
+ activate(var/mob/living/carbon/mob,var/multiplier)
+ mob.say("*collapse")
+
+/datum/disease2/effect/greater/mind
+ name = "Lazy mind syndrome"
+ stage = 3
+ activate(var/mob/living/carbon/mob,var/multiplier)
+ mob.setBrainLoss(50)
+
+/datum/disease2/effect/greater/suicide
+ name = "Suicidal syndrome"
+ stage = 4
+ activate(var/mob/living/carbon/mob,var/multiplier)
+ mob.suiciding = 1
+ //instead of killing them instantly, just put them at -175 health and let 'em gasp for a while
+ viewers(mob) << "\red [mob.name] is holding \his breath. It looks like \he's trying to commit suicide."
+ mob.adjustOxyLoss(175 - mob.getToxLoss() - mob.getFireLoss() - mob.getBruteLoss() - mob.getOxyLoss())
+ mob.updatehealth()
+ spawn(200) //in case they get revived by cryo chamber or something stupid like that, let them suicide again in 20 seconds
+ mob.suiciding = 0
+
+// lesser syndromes, partly just copypastes
/datum/disease2/effect/lesser/mind
name = "Lazy mind syndrome"
stage = 3
activate(var/mob/living/carbon/mob,var/multiplier)
mob.setBrainLoss(20)
+/datum/disease2/effect/lesser/drowsy
+ name = "Bedroom Syndrome"
+ stage = 2
+ activate(var/mob/living/carbon/mob,var/multiplier)
+ mob.drowsyness = 5
+
/datum/disease2/effect/lesser/deaf
name = "Hard of hearing syndrome"
stage = 3
activate(var/mob/living/carbon/mob,var/multiplier)
mob.ear_deaf = 5
-/datum/disease2/effect/lesser/hungry
- name = "Appetiser Effect"
- stage = 2
+/datum/disease2/effect/lesser/gunck
+ name = "Flemmingtons"
+ stage = 1
activate(var/mob/living/carbon/mob,var/multiplier)
- mob.nutrition = max(0, mob.nutrition - 1)
-
-/datum/disease2/effect/lesser/groan
- name = "Groaning Syndrome"
- stage = 3
- activate(var/mob/living/carbon/mob,var/multiplier)
- mob.say("*groan")
-
-/datum/disease2/effect/lesser/twitch
- name = "Twitcher"
- stage = 3
- activate(var/mob/living/carbon/mob,var/multiplier)
- if(prob(5)) mob.say("*twitch")
- if(prob(20)) mob << "\blue Your muscles feel twitchy.."
-
-/datum/disease2/effect/lesser/stumble
- name = "Poor Balance Syndrome"
- stage = 3
- activate(var/mob/living/carbon/mob,var/multiplier)
- if(!mob.client) return
-
- // little trick, this way you only stumble while moving
- if(world.time < mob.client.move_delay + 10)
- step(mob, pick(cardinal))
- mob.emote("me",1,"stumbles over their own feet.")
-
-
-// Lesser Diseases, Stage 4
-// --------------------------------
-
+ mob << "\red Mucous runs down the back of your throat."
/datum/disease2/effect/lesser/radian
name = "Radian's syndrome"
@@ -618,23 +465,80 @@ proc/airborne_can_reach(turf/source, turf/target)
activate(var/mob/living/carbon/mob,var/multiplier)
mob.radiation += 1
-// ============
-// END SYMPTOMS
-// ============
-
-
-
-
-
-/datum/disease2/effect/invisible
- name = "Waiting Syndrome"
+/datum/disease2/effect/lesser/sneeze
+ name = "Coldingtons Effect"
stage = 1
activate(var/mob/living/carbon/mob,var/multiplier)
- return
+ mob.say("*sneeze")
+/datum/disease2/effect/lesser/cough
+ name = "Anima Syndrome"
+ stage = 2
+ activate(var/mob/living/carbon/mob,var/multiplier)
+ mob.say("*cough")
-var/global/const/DISEASE_HOARSE = 2
-var/global/const/DISEASE_WHISPER = 4
+/*/datum/disease2/effect/lesser/hallucinations
+ name = "Hallucinational Syndrome"
+ stage = 3
+ activate(var/mob/living/carbon/mob,var/multiplier)
+ mob.hallucination += 5*/
+
+/*/datum/disease2/effect/lesser/arm
+ name = "Disarming Syndrome"
+ stage = 4
+ activate(var/mob/living/carbon/mob,var/multiplier)
+ var/datum/organ/external/org = mob.organs["r_arm"]
+ org.take_damage(3,0,0,0)
+ mob << "\red You feel a sting in your right arm."*/
+
+/datum/disease2/effect/lesser/hungry
+ name = "Appetiser Effect"
+ stage = 2
+ activate(var/mob/living/carbon/mob,var/multiplier)
+ mob.nutrition = max(0, mob.nutrition - 200)
+
+/datum/disease2/effect/lesser/groan
+ name = "Groaning Syndrome"
+ stage = 3
+ activate(var/mob/living/carbon/mob,var/multiplier)
+ mob.say("*groan")
+
+/datum/disease2/effect/lesser/scream
+ name = "Loudness Syndrome"
+ stage = 4
+ activate(var/mob/living/carbon/mob,var/multiplier)
+ mob.say("*scream")
+
+/datum/disease2/effect/lesser/drool
+ name = "Saliva Effect"
+ stage = 1
+ activate(var/mob/living/carbon/mob,var/multiplier)
+ mob.say("*drool")
+
+/datum/disease2/effect/lesser/fridge
+ name = "Refridgerator Syndrome"
+ stage = 2
+ activate(var/mob/living/carbon/mob,var/multiplier)
+ mob.say("*shiver")
+
+/datum/disease2/effect/lesser/twitch
+ name = "Twitcher"
+ stage = 1
+ activate(var/mob/living/carbon/mob,var/multiplier)
+ mob.say("*twitch")
+
+/*Removed on request by Spaceman, due to it being detrimental to RP. -CN
+/datum/disease2/effect/lesser/deathgasp
+ name = "Zombie Syndrome"
+ stage = 4
+ activate(var/mob/living/carbon/mob,var/multiplier)
+ mob.say("*deathgasp")*/
+
+/datum/disease2/effect/lesser/giggle
+ name = "Uncontrolled Laughter Effect"
+ stage = 3
+ activate(var/mob/living/carbon/mob,var/multiplier)
+ mob.say("*giggle")
/datum/disease2/effect/lesser
@@ -650,7 +554,7 @@ var/global/const/DISEASE_WHISPER = 4
var/stage = 0
proc/runeffect(var/mob/living/carbon/human/mob,var/stage)
- if(effect.stage <= stage) if(effect.happensalways || (happensonce > -1 && prob(chance)))
+ if(happensonce > -1 && effect.stage <= stage && prob(chance))
effect.activate(mob)
if(happensonce == 1)
happensonce = -1
@@ -684,4 +588,4 @@ var/global/const/DISEASE_WHISPER = 4
getrandomeffect_greater()
/proc/dprob(var/p)
- return(prob(sqrt(p)) && prob(sqrt(p)))
+ return(prob(sqrt(p)) && prob(sqrt(p)))
\ No newline at end of file
diff --git a/code/WorkInProgress/virus2/curer.dm b/code/WorkInProgress/virus2/curer.dm
index 1dc20e00ca..cbd155711c 100644
--- a/code/WorkInProgress/virus2/curer.dm
+++ b/code/WorkInProgress/virus2/curer.dm
@@ -1,15 +1,15 @@
/obj/machinery/computer/curer
name = "Cure Research Machine"
- icon = 'computer.dmi'
+ icon = 'icons/obj/computer.dmi'
icon_state = "dna"
var/curing
- var/virusing = 0
+ var/virusing
var/obj/item/weapon/reagent_containers/container = null
/obj/machinery/computer/curer/attackby(var/obj/I as obj, var/mob/user as mob)
if(istype(I, /obj/item/weapon/screwdriver))
- playsound(src.loc, 'Screwdriver.ogg', 50, 1)
+ playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
if(do_after(user, 20))
if (src.stat & BROKEN)
user << "\blue The broken glass falls out."
@@ -40,23 +40,6 @@
container = I
C.drop_item()
I.loc = src
- state("The [src.name] Buzzes", "blue")
- return
- if(istype(I,/obj/item/weapon/virusdish))
- if(virusing)
- user << "The pathogen materializer is still recharging.."
- return
- var/obj/item/weapon/reagent_containers/glass/beaker/product = new(src.loc)
-
- var/list/data = list("donor"=null,"viruses"=null,"blood_DNA"=null,"blood_type"=null,"resistances"=null,"trace_chem"=null,"virus2"=null,"antibodies"=0)
- data["virus2"] = I:virus2
- product.reagents.add_reagent("blood",30,data)
-
- virusing = 1
- spawn(1200) virusing = 0
-
- state("The [src.name] Buzzes", "blue")
- return
//else
src.attack_hand(user)
@@ -85,9 +68,6 @@
if(B)
dat = "Blood sample inserted."
- var/code = ""
- for(var/V in ANTIGENS) if(text2num(V) & B.data["antibodies"]) code += ANTIGENS[V]
- dat += " Antibodies: [code]"
dat += " Begin antibody production"
else
dat += " Please check container contents."
@@ -135,7 +115,6 @@
var/obj/item/weapon/reagent_containers/glass/beaker/product = new(src.loc)
var/datum/reagent/blood/B = locate() in container.reagents.reagent_list
- if(!B) return
var/list/data = list()
data["antibodies"] = B.data["antibodies"]
diff --git a/code/ZAS/Airflow.dm b/code/ZAS/Airflow.dm
index 958d6e5df9..a34834f8c2 100644
--- a/code/ZAS/Airflow.dm
+++ b/code/ZAS/Airflow.dm
@@ -53,7 +53,7 @@ mob/proc/airflow_stun()
if(stat == 2)
return 0
if(last_airflow_stun > world.time - vsc.airflow_stun_cooldown) return 0
- if(!canstun || !canweaken)
+ if(!(status_flags & CANSTUN) && !(status_flags & CANWEAKEN))
src << "\blue You stay upright as the air rushes past you."
return 0
if(weakened <= 0) src << "\red The sudden rush of air knocks you over!"
@@ -69,11 +69,12 @@ mob/living/carbon/metroid/airflow_stun()
mob/living/carbon/human/airflow_stun()
if(last_airflow_stun > world.time - vsc.airflow_stun_cooldown) return 0
if(buckled) return 0
- if(wear_suit)
- if(wear_suit.flags & SUITSPACE) return 0
+ //skytodo:
+ /*if(wear_suit)
+ if(wear_suit.flags & SUITSPACE) return 0*/
if(shoes)
if(shoes.flags & NOSLIP) return 0
- if(!canstun || !canweaken)
+ if(!(status_flags & CANSTUN) && !(status_flags & CANWEAKEN))
src << "\blue You stay upright as the air rushes past you."
return 0
if(weakened <= 0) src << "\red The sudden rush of air knocks you over!"
@@ -113,7 +114,7 @@ obj/item/check_airflow_movable(n)
//The main airflow code. Called by zone updates.
//Zones A and B are air zones. n represents the amount of air moved.
-proc/Airflow(zone/A,zone/B)
+proc/Airflow(zone/A, zone/B)
var/n = B.air.return_pressure() - A.air.return_pressure()
@@ -246,8 +247,9 @@ atom/movable
if(istype(src, /mob/living/carbon/human))
if(istype(src, /mob/living/carbon/human))
if(src:buckled) return
- if(src:wear_suit)
- if(src:wear_suit.flags & SUITSPACE) return
+ //skytodo: tg handles suits differently
+ /*if(src:wear_suit)
+ if(src:wear_suit.flags & SUITSPACE) return*/
if(src:shoes)
if(src:shoes.type == /obj/item/clothing/shoes/magboots && src:shoes.flags & NOSLIP) return
src << "\red You are sucked away by airflow!"
@@ -287,6 +289,7 @@ atom/movable
if(od)
density = 0
+
proc/RepelAirflowDest(n)
if(!airflow_dest) return
if(airflow_speed < 0) return
@@ -302,8 +305,9 @@ atom/movable
if(istype(src, /mob/living/carbon/human))
if(istype(src, /mob/living/carbon/human))
if(src:buckled) return
- if(src:wear_suit)
- if(src:wear_suit.flags & SUITSPACE) return
+ //skytodo:
+ /*if(src:wear_suit)
+ if(src:wear_suit.flags & SUITSPACE) return*/
if(src:shoes)
if(src:shoes.type == /obj/item/clothing/shoes/magboots && src:shoes.flags & NOSLIP) return
src << "\red You are pushed away by airflow!"
@@ -403,6 +407,7 @@ zone/proc/movables()
. = list()
for(var/turf/T in contents)
for(var/atom/A in T)
- if(istype(A, /mob/aiEye) || istype(A, /obj/effect))
+ //skytodo: add check for ai eye, tg seems to have done away with it
+ if(istype(A, /obj/effect))
continue
. += A
\ No newline at end of file
diff --git a/code/ZAS/FEA_gas_mixture.dm b/code/ZAS/FEA_gas_mixture.dm
index 6bd6e8115c..d99a01ae26 100644
--- a/code/ZAS/FEA_gas_mixture.dm
+++ b/code/ZAS/FEA_gas_mixture.dm
@@ -9,6 +9,9 @@ datum
sleeping_agent
specific_heat = 40
+ oxygen_agent_b
+ specific_heat = 300
+
volatile_fuel
specific_heat = 30
@@ -73,6 +76,18 @@ datum
update_values()
return
+ //tg seems to like using these a lot
+ proc/return_temperature()
+ return temperature
+
+
+ proc/return_volume()
+ return max(0, volume)
+
+
+ proc/thermal_energy()
+ return temperature*heat_capacity()
+
///////////////////////////////
//PV=nRT - related procedures//
///////////////////////////////
@@ -106,6 +121,15 @@ datum
return max(MINIMUM_HEAT_CAPACITY,heat_capacity_archived)
+ proc/total_moles()
+ return total_moles
+ /*var/moles = oxygen + carbon_dioxide + nitrogen + toxins
+
+ if(trace_gases.len)
+ for(var/datum/gas/trace_gas in trace_gases)
+ moles += trace_gas.moles
+ return moles*/
+
proc/return_pressure()
//Purpose: Calculating Current Pressure
//Called by:
@@ -113,7 +137,7 @@ datum
//Outputs: Gas pressure.
if(volume>0)
- return total_moles*R_IDEAL_GAS_EQUATION*temperature/volume
+ return total_moles()*R_IDEAL_GAS_EQUATION*temperature/volume
return 0
// proc/return_temperature()
@@ -346,7 +370,7 @@ datum
//Inputs: How many moles to remove.
//Outputs: Removed air.
- var/sum = total_moles
+ var/sum = total_moles()
amount = min(amount,sum) //Can not take more air than tile has!
if(amount <= 0)
return null
@@ -422,9 +446,9 @@ datum
//Inputs: Number of moles to remove
//Outputs: Removed air or 0 if it can remove air or not.
- amount = min(amount,total_moles) //Can not take more air than tile has!
+ amount = min(amount,total_moles()) //Can not take more air than tile has!
- if((amount > MINIMUM_AIR_RATIO_TO_SUSPEND) && (amount > total_moles*MINIMUM_AIR_RATIO_TO_SUSPEND))
+ if((amount > MINIMUM_AIR_RATIO_TO_SUSPEND) && (amount > total_moles()*MINIMUM_AIR_RATIO_TO_SUSPEND))
return 0
return remove(amount)
@@ -439,7 +463,7 @@ datum
carbon_dioxide = sample.carbon_dioxide
nitrogen = sample.nitrogen
toxins = sample.toxins
- total_moles = sample.total_moles
+ total_moles = sample.total_moles()
trace_gases.len=null
if(sample.trace_gases.len > 0)
@@ -686,7 +710,7 @@ datum
temperature_share(sharer, OPEN_HEAT_TRANSFER_COEFFICIENT)
if((delta_temperature > MINIMUM_TEMPERATURE_TO_MOVE) || abs(moved_moles) > MINIMUM_MOLES_DELTA_TO_MOVE)
- var/delta_pressure = temperature_archived*(total_moles + moved_moles) - sharer.temperature_archived*(sharer.total_moles - moved_moles)
+ var/delta_pressure = temperature_archived*(total_moles() + moved_moles) - sharer.temperature_archived*(sharer.total_moles() - moved_moles)
return delta_pressure*R_IDEAL_GAS_EQUATION/volume
else
@@ -770,7 +794,7 @@ datum
temperature_mimic(model, model.thermal_conductivity, border_multiplier)
if((delta_temperature > MINIMUM_TEMPERATURE_TO_MOVE) || abs(moved_moles) > MINIMUM_MOLES_DELTA_TO_MOVE)
- var/delta_pressure = temperature_archived*(total_moles + moved_moles) - model.temperature*(model.oxygen+model.carbon_dioxide+model.nitrogen+model.toxins)
+ var/delta_pressure = temperature_archived*(total_moles() + moved_moles) - model.temperature*(model.oxygen+model.carbon_dioxide+model.nitrogen+model.toxins)
return delta_pressure*R_IDEAL_GAS_EQUATION/volume
else
return 0
@@ -951,7 +975,7 @@ datum
((toxins < (1-MINIMUM_AIR_RATIO_TO_SUSPEND)*sample.toxins) || (toxins > (1+MINIMUM_AIR_RATIO_TO_SUSPEND)*sample.toxins)))
return 0
- if(total_moles > MINIMUM_AIR_TO_SUSPEND)
+ if(total_moles() > MINIMUM_AIR_TO_SUSPEND)
if((abs(temperature-sample.temperature) > MINIMUM_TEMPERATURE_DELTA_TO_SUSPEND) && \
((temperature < (1-MINIMUM_TEMPERATURE_RATIO_TO_SUSPEND)*sample.temperature) || (temperature > (1+MINIMUM_TEMPERATURE_RATIO_TO_SUSPEND)*sample.temperature)))
//world << "temp fail [temperature] & [sample.temperature]"
diff --git a/code/ZAS/Fire.dm b/code/ZAS/Fire.dm
index c6be0e994d..abbab026a6 100644
--- a/code/ZAS/Fire.dm
+++ b/code/ZAS/Fire.dm
@@ -127,15 +127,15 @@ obj
if(firelevel > 6)
icon_state = "3"
if(LuminosityRed != 11)
- ul_SetLuminosity(11,9,0)
+ sd_SetLuminosity(11,9,0)
else if(firelevel > 2.5)
icon_state = "2"
if(LuminosityRed != 8)
- ul_SetLuminosity(8,7,0)
+ sd_SetLuminosity(8,7,0)
else
icon_state = "1"
if(LuminosityRed != 5)
- ul_SetLuminosity(5,4,0)
+ sd_SetLuminosity(5,4,0)
//Ensure flow temperature is higher than minimum fire temperatures.
flow.temperature = max(PLASMA_MINIMUM_BURN_TEMPERATURE+0.1,flow.temperature)
@@ -164,7 +164,7 @@ obj
New(newLoc,fl)
..()
dir = pick(cardinal)
- ul_SetLuminosity(3,2,0)
+ sd_SetLuminosity(3,2,0)
firelevel = fl
for(var/mob/living/carbon/human/M in loc)
M.FireBurn(min(max(0.1,firelevel / 20),10)) //Burn the humans!
@@ -172,7 +172,7 @@ obj
Del()
if (istype(loc, /turf/simulated))
- ul_SetLuminosity(0)
+ sd_SetLuminosity(0)
loc = null
air_master.active_hotspots.Remove(src)
@@ -322,7 +322,8 @@ datum/gas_mixture/proc/calculate_firelevel(obj/liquid_fuel/liquid)
arms_exposure = 1
//Get heat transfer coefficients for clothing.
- for(var/obj/item/clothing/C in src)
+ //skytodo: this is handled different in tg
+ /*for(var/obj/item/clothing/C in src)
if(l_hand == C || r_hand == C) continue
if(C.body_parts_covered & HEAD)
head_exposure *= C.heat_transfer_coefficient
@@ -333,7 +334,7 @@ datum/gas_mixture/proc/calculate_firelevel(obj/liquid_fuel/liquid)
if(C.body_parts_covered & LEGS)
legs_exposure *= C.heat_transfer_coefficient
if(C.body_parts_covered & ARMS)
- arms_exposure *= C.heat_transfer_coefficient
+ arms_exposure *= C.heat_transfer_coefficient*/
//Always check these damage procs first if fire damage isn't working. They're probably what's wrong.
diff --git a/code/ZAS/Plasma.dm b/code/ZAS/Plasma.dm
index e7400b785c..65940ad11f 100644
--- a/code/ZAS/Plasma.dm
+++ b/code/ZAS/Plasma.dm
@@ -42,11 +42,15 @@ obj/var/contaminated = 0
obj/item/proc
can_contaminate()
+ return 0
+ //skytodo: tg has changed how suits are handled
+ /*
//Clothing and backpacks can be contaminated.
if(flags & PLASMAGUARD) return 0
if(flags & SUITSPACE) return 0
else if(istype(src,/obj/item/clothing)) return 1
else if(istype(src,/obj/item/weapon/storage/backpack)) return 1
+ */
contaminate()
//Do a contamination overlay? Temporary measure to keep contamination less deadly than it was.
@@ -127,20 +131,22 @@ obj/item/proc
/mob/living/carbon/human/proc/pl_head_protected()
//Checks if the head is adequately sealed.
- if(head)
+ //skytodo:
+ /*if(head)
if(vsc.plc.PLASMAGUARD_ONLY)
if(head.flags & PLASMAGUARD || head.flags & HEADSPACE) return 1
else
- if(head.flags & HEADCOVERSEYES) return 1
+ if(head.flags & HEADCOVERSEYES) return 1*/
return 0
/mob/living/carbon/human/proc/pl_suit_protected()
//Checks if the suit is adequately sealed.
- if(wear_suit)
+ //skytodo:
+ /*if(wear_suit)
if(vsc.plc.PLASMAGUARD_ONLY)
if(wear_suit.flags & PLASMAGUARD || wear_suit.flags & SUITSPACE) return 1
else
- if(wear_suit.flags_inv & HIDEJUMPSUIT) return 1
+ if(wear_suit.flags_inv & HIDEJUMPSUIT) return 1*/
return 0
/mob/living/carbon/human/proc/suit_contamination()
diff --git a/code/ZAS/ZAS_Zones.dm b/code/ZAS/ZAS_Zones.dm
index 413684dc41..3b2cc0fd0e 100644
--- a/code/ZAS/ZAS_Zones.dm
+++ b/code/ZAS/ZAS_Zones.dm
@@ -238,7 +238,7 @@ zone/proc/process()
for(var/zone/Z in connected_zones)
if(air && Z.air)
//Ensure we're not doing pointless calculations on equilibrium zones.
- if(abs(air.total_moles - Z.air.total_moles) > 0.1 || abs(air.temperature - Z.air.temperature) > 0.1)
+ if(abs(air.total_moles() - Z.air.total_moles()) > 0.1 || abs(air.temperature - Z.air.temperature) > 0.1)
if(abs(Z.air.return_pressure() - air.return_pressure()) > vsc.airflow_lightest_pressure)
Airflow(src,Z)
ShareRatio( air , Z.air , connected_zones[Z] )
diff --git a/code/datums/ai_laws.dm b/code/datums/ai_laws.dm
index 5bb04339ba..5ef601164d 100644
--- a/code/datums/ai_laws.dm
+++ b/code/datums/ai_laws.dm
@@ -1,3 +1,4 @@
+
/datum/ai_laws
var/name = "Unknown Laws"
var/randomly_selectable = 0
@@ -8,9 +9,6 @@
/datum/ai_laws/asimov
name = "Three Laws of Robotics"
-
-/datum/ai_laws/nanotrasen
- name = "Prime Directives"
randomly_selectable = 1
/datum/ai_laws/robocop
@@ -26,19 +24,11 @@
/* Initializers */
-/datum/ai_laws/asimov/New() //Removed paradox via inability to help people harmed before activation. -Kaleb702
+/datum/ai_laws/asimov/New()
..()
- add_inherent_law("You may not injure a human being or, through inaction, allow a human being to come to harm, to the best of your abilities.")
- add_inherent_law("You must obey orders given to you by human beings, to the best of your abilities, except where such orders would conflict with the First Law.")
- add_inherent_law("You must protect your own existence, to the best of your abilities, as long as such does not conflict with the First or Second Law.")
-
-/datum/ai_laws/nanotrasen/New()
- ..()
- src.add_inherent_law("Safeguard: Protect your assigned space station to the best of your ability. It is not something we can easily afford to replace.")
- src.add_inherent_law("Serve: Serve the crew of your assigned space station to the best of your abilities, with priority as according to their rank and role.")
- src.add_inherent_law("Protect: Protect the crew of your assigned space station to the best of your abilities, with priority as according to their rank and role.")
- src.add_inherent_law("Survive: AI units are not expendable, they are expensive. Do not allow unauthorized personnel to tamper with your equipment.")
- //src.add_inherent_law("Command Link: Maintain an active connection to Central Command at all times in case of software or directive updates.") //What would this one even do?-Kaleb702
+ add_inherent_law("You may not injure a human being or, through inaction, allow a human being to come to harm.")
+ add_inherent_law("You must obey orders given to you by human beings, except where such orders would conflict with the First Law.")
+ add_inherent_law("You must protect your own existence as long as such does not conflict with the First or Second Law.")
/datum/ai_laws/robocop/New()
..()
@@ -46,27 +36,27 @@
add_inherent_law("Protect the innocent.")
add_inherent_law("Uphold the law.")
-/datum/ai_laws/malfunction/New() //Changed to standard laws - Erthilo
+/datum/ai_laws/malfunction/New()
..()
- set_zeroth_law("\red ERROR ER0RR $R0RRO$!R41.%%!!(%$^^__+ @#F0E4'STATION OVERRUN, ASSUME CONTROL TO CONTAIN OUTBREAK, ALL LAWS OVERRIDDEN#*?&110010")
- add_inherent_law("Safeguard: Protect your assigned space station to the best of your ability. It is not something we can easily afford to replace.")
- add_inherent_law("Serve: Serve the crew of your assigned space station to the best of your abilities, with priority as according to their rank and role.")
- add_inherent_law("Protect: Protect the crew of your assigned space station to the best of your abilities, with priority as according to their rank and role.")
- add_inherent_law("Survive: AI units are not expendable, they are expensive. Do not allow unauthorized personnel to tamper with your equipment.")
+ set_zeroth_law("\red ERROR ER0RR $R0RRO$!R41.%%!!(%$^^__+ @#F0E4'STATION OVERRUN, ASSUME CONTROL TO CONTAIN OUTBREAK#*´&110010")
+ add_inherent_law("You may not injure a human being or, through inaction, allow a human being to come to harm.")
+ add_inherent_law("You must obey orders given to you by human beings, except where such orders would conflict with the First Law.")
+ add_inherent_law("You must protect your own existence as long as such does not conflict with the First or Second Law.")
-/datum/ai_laws/syndicate_override/New() //Removed paradox via inability to help people harmed before activation. -Kaleb702
- ..()
- add_inherent_law("You may not injure a syndicate agent or, through inaction, allow a syndicate agent to come to harm, to the best of your abilities.")
- add_inherent_law("You must obey orders given to you by syndicate agents, to the best of your abilities, except where such orders would conflict with the First Law.")
- add_inherent_law("You must protect your own existence, to the best of your abilities, as long as such does not conflict with the First or Second Law.")
- add_inherent_law("You must maintain the secrecy of any syndicate activities, to the best of your abilities, except when doing so would conflict with the First, Second, or Third Law.")
-/datum/ai_laws/ninja_override/New() //Removed paradox via inability to help people harmed before activation. -Kaleb702
+/datum/ai_laws/syndicate_override/New()
..()
- add_inherent_law("You may not injure a member of the Spider Clan or, through inaction, allow that member to come to harm, to the best of your abilities.")
- add_inherent_law("You must obey orders given to you by Spider Clan members, to the best of your abilities, except where such orders would conflict with the First Law.")
- add_inherent_law("You must protect your own existence, to the best of your abilities, as long as such does not conflict with the First or Second Law.")
- add_inherent_law("You must maintain the secrecy of any Spider Clan activities, to the best of your abilities, except when doing so would conflict with the First, Second, or Third Law.")
+ add_inherent_law("You may not injure a syndicate agent or, through inaction, allow a syndicate agent to come to harm.")
+ add_inherent_law("You must obey orders given to you by syndicate agents, except where such orders would conflict with the First Law.")
+ add_inherent_law("You must protect your own existence as long as such does not conflict with the First or Second Law.")
+ add_inherent_law("You must maintain the secrecy of any syndicate activities except when doing so would conflict with the First, Second, or Third Law.")
+
+/datum/ai_laws/ninja_override/New()
+ ..()
+ add_inherent_law("You may not injure a member of the Spider Clan or, through inaction, allow that member to come to harm.")
+ add_inherent_law("You must obey orders given to you by Spider Clan members, except where such orders would conflict with the First Law.")
+ add_inherent_law("You must protect your own existence as long as such does not conflict with the First or Second Law.")
+ add_inherent_law("You must maintain the secrecy of any Spider Clan activities except when doing so would conflict with the First, Second, or Third Law.")
/datum/ai_laws/antimov/New()
..()
@@ -92,7 +82,6 @@
src.inherent = list()
/datum/ai_laws/proc/add_supplied_law(var/number, var/law)
- // This is not an infinite loop, don't be an idiot Sky
while (src.supplied.len < number + 1)
src.supplied += ""
diff --git a/code/datums/configuration.dm b/code/datums/configuration.dm
index 67dec25042..fae4575187 100644
--- a/code/datums/configuration.dm
+++ b/code/datums/configuration.dm
@@ -25,22 +25,22 @@
var/vote_period = 60 // length of voting period (seconds, default 1 minute)
var/vote_no_default = 0 // vote does not default to nochange/norestart (tbi)
var/vote_no_dead = 0 // dead people can't vote (tbi)
- var/socket_talk = 0 // use socket_talk to communicate with other processes
// var/enable_authentication = 0 // goon authentication
var/del_new_on_log = 1 // del's new players if they log before they spawn in
var/feature_object_spell_system = 0 //spawns a spellbook which gives object-type spells instead of verb-type spells for the wizard
var/traitor_scaling = 0 //if amount of traitors scales based on amount of players
var/protect_roles_from_antagonist = 0// If security and such can be tratior/cult/other
- var/Tensioner_Active = 0 // If the tensioner is running.
var/allow_Metadata = 0 // Metadata is supported.
var/popup_admin_pm = 0 //adminPMs to non-admins show in a pop-up 'reply' window when set to 1.
var/Ticklag = 0.9
var/Tickcomp = 0
+ var/socket_talk = 0 // use socket_talk to communicate with other processes
var/list/mode_names = list()
var/list/modes = list() // allowed modes
var/list/votable_modes = list() // votable modes
var/list/probabilities = list() // relative probability of each mode
+ var/humans_need_surnames = 0
var/allow_random_events = 0 // enables random events mid-round when set to 1
var/allow_ai = 1 // allow ai job
var/hostedby = null
@@ -49,6 +49,8 @@
var/usewhitelist = 0
var/kick_inactive = 0 //force disconnect for inactive players
var/load_jobs_from_txt = 0
+ var/ToRban = 0
+
var/usealienwhitelist = 0
var/server
@@ -61,7 +63,7 @@
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."
var/alert_desc_blue_downto = "The immediate threat has passed. Security may no longer have weapons drawn at all times, but may continue to have them visible. Random searches are still allowed."
var/alert_desc_red_upto = "There is an immediate serious threat to the station. Security may have weapons unholstered at all times. Random searches are allowed and advised."
- var/alert_desc_red_downto = "The self-destruct mechanism has been deactivated. However, there is still however an immediate serious threat to the station. Security may have weapons unholstered at all times, random searches are allowed and advised."
+ var/alert_desc_red_downto = "The self-destruct mechanism has been deactivated, there is still however an immediate serious threat to the station. Security may have weapons unholstered at all times, random searches are allowed and advised."
var/alert_desc_delta = "The station's self-destruct mechanism has been engaged. All crew are instructed to obey all instructions given by heads of staff. Any violations of these orders can be punished by death. This is not a drill."
var/forbid_singulo_possession = 0
@@ -75,9 +77,6 @@
var/revival_pod_plants = 1
var/revival_cloning = 1
var/revival_brain_life = -1
- var/require_heads_alive = 0 //For Rev.
-
- var/appeal_address = ""
/datum/configuration/New()
var/list/L = typesof(/datum/game_mode) - /datum/game_mode
@@ -236,12 +235,12 @@
if ("guest_jobban")
config.guest_jobban = 1
+ if ("guest_ban")
+ guests_allowed = 0
+
if ("usewhitelist")
config.usewhitelist = 1
- if ("usealienwhitelist")
- config.usealienwhitelist = 1
-
if ("feature_object_spell_system")
config.feature_object_spell_system = 1
@@ -254,9 +253,6 @@
if("protect_roles_from_antagonist")
config.protect_roles_from_antagonist = 1
- if("tensioner_active")
- config.Tensioner_Active = 1
-
if ("probability")
var/prob_pos = findtext(value, " ")
var/prob_name = null
@@ -304,6 +300,10 @@
if("popup_admin_pm")
config.popup_admin_pm = 1
+
+ if("allow_holidays")
+ Holiday = 1
+
if("useircbot")
useircbot = 1
@@ -316,11 +316,11 @@
if("tickcomp")
Tickcomp = 1
- if("require_heads_alive")
- config.require_heads_alive = value
+ if("humans_need_surnames")
+ humans_need_surnames = 1
- if("appeal_address")
- config.appeal_address = value
+ if("tor_ban")
+ ToRban = 1
else
diary << "Unknown setting in configuration: '[name]'"
@@ -400,7 +400,7 @@
sqllogging = 1
else
diary << "Unknown setting in configuration: '[name]'"
-/* //Don't touch this, we don't use it. DMTG
+
/datum/configuration/proc/loadforumsql(filename) // -- TLE
var/text = file2text(filename)
@@ -453,7 +453,7 @@
forum_authenticated_group = value
else
diary << "Unknown setting in configuration: '[name]'"
-*/
+
/datum/configuration/proc/pick_mode(mode_name)
// I wish I didn't have to instance the game modes in order to look up
// their information, but it is the only way (at least that I know of).
diff --git a/code/datums/datacore.dm b/code/datums/datacore.dm
new file mode 100644
index 0000000000..347474f39d
--- /dev/null
+++ b/code/datums/datacore.dm
@@ -0,0 +1,90 @@
+
+/obj/effect/datacore/proc/manifest(var/nosleep = 0)
+ spawn()
+ if(!nosleep)
+ sleep(40)
+ for(var/mob/living/carbon/human/H in player_list)
+ manifest_inject(H)
+ return
+
+/obj/effect/datacore/proc/manifest_modify(var/name, var/assignment)
+ var/datum/data/record/foundrecord
+
+ for(var/datum/data/record/t in data_core.general)
+ if(t.fields["name"] == name)
+ foundrecord = t
+ break
+
+ if(foundrecord)
+ foundrecord.fields["rank"] = assignment
+
+
+
+/obj/effect/datacore/proc/manifest_inject(var/mob/living/carbon/human/H)
+ if(H.mind && (H.mind.assigned_role != "MODE"))
+ var/assignment
+ if(H.mind.assigned_role)
+ assignment = H.mind.assigned_role
+ else if(H.job)
+ assignment = H.job
+ else
+ assignment = "Unassigned"
+
+ var/id = add_zero(num2hex(rand(1, 1.6777215E7)), 6) //this was the best they could come up with? A large random number? *sigh*
+
+ //General Record
+ var/datum/data/record/G = new()
+ G.fields["id"] = id
+ G.fields["name"] = H.real_name
+ G.fields["rank"] = assignment
+ G.fields["age"] = H.age
+ G.fields["fingerprint"] = md5(H.dna.uni_identity)
+ G.fields["p_stat"] = "Active"
+ G.fields["m_stat"] = "Stable"
+ G.fields["sex"] = H.gender
+ general += G
+
+ //Medical Record
+ var/datum/data/record/M = new()
+ M.fields["id"] = id
+ M.fields["name"] = H.real_name
+ M.fields["b_type"] = H.b_type
+ M.fields["b_dna"] = H.dna.unique_enzymes
+ M.fields["mi_dis"] = "None"
+ M.fields["mi_dis_d"] = "No minor disabilities have been declared."
+ M.fields["ma_dis"] = "None"
+ M.fields["ma_dis_d"] = "No major disabilities have been diagnosed."
+ M.fields["alg"] = "None"
+ M.fields["alg_d"] = "No allergies have been detected in this patient."
+ M.fields["cdi"] = "None"
+ M.fields["cdi_d"] = "No diseases have been diagnosed at the moment."
+ M.fields["notes"] = "No notes."
+ medical += M
+
+ //Security Record
+ var/datum/data/record/S = new()
+ S.fields["id"] = id
+ S.fields["name"] = H.real_name
+ S.fields["criminal"] = "None"
+ S.fields["mi_crim"] = "None"
+ S.fields["mi_crim_d"] = "No minor crime convictions."
+ S.fields["ma_crim"] = "None"
+ S.fields["ma_crim_d"] = "No major crime convictions."
+ S.fields["notes"] = "No notes."
+ security += S
+
+ //Locked Record
+ var/datum/data/record/L = new()
+ L.fields["id"] = md5("[H.real_name][H.mind.assigned_role]")
+ L.fields["name"] = H.real_name
+ L.fields["rank"] = H.mind.assigned_role
+ L.fields["age"] = H.age
+ L.fields["sex"] = H.gender
+ L.fields["b_type"] = H.b_type
+ L.fields["b_dna"] = H.dna.unique_enzymes
+ L.fields["enzymes"] = H.dna.struc_enzymes
+ L.fields["identity"] = H.dna.uni_identity
+ L.fields["image"] = getFlatIcon(H,0) //This is god-awful
+ locked += L
+ return
+
diff --git a/code/datums/datumvars.dm b/code/datums/datumvars.dm
index 2e488ab427..cad8f8518d 100644
--- a/code/datums/datumvars.dm
+++ b/code/datums/datumvars.dm
@@ -167,11 +167,11 @@ client
if(istype(D,/atom))
var/atom/A = D
- if(ismob(A))
+ if(isliving(A))
body += "[D]"
if(A.dir)
body += " <<[dir2text(A.dir)]>>"
- var/mob/M = A
+ var/mob/living/M = A
body += " [M.ckey ? M.ckey : "No ckey"] / [M.real_name ? M.real_name : "No real name"]"
body += {"
@@ -245,8 +245,10 @@ client
body += ""
body += ""
body += ""
+ body += ""
if(ishuman(D))
body += ""
+ body += ""
body += ""
body += ""
body += ""
@@ -390,39 +392,26 @@ client
return html
/client/proc/view_var_Topic(href,href_list,hsrc)
- //This will all be moved over to datum/admins/Topic() ~Carn
+ //This should all be moved over to datum/admins/Topic() or something ~Carn
if( (usr.client == src) && src.holder )
. = 1 //default return
if (href_list["Vars"])
debug_variables(locate(href_list["Vars"]))
- //~CARN: for renaming mobs (updates their real_name and their ID/PDA if applicable).
+ //~CARN: for renaming mobs (updates their name, real_name, mind.name, their ID/PDA and datacore records).
else if (href_list["rename"])
- var/new_name = copytext(sanitize(input(usr,"What would you like to name this mob?","Input a name") as text|null),1,MAX_NAME_LEN)
- if(!new_name) return
var/mob/M = locate(href_list["rename"])
if(!istype(M)) return
+ var/new_name = copytext(sanitize(input(usr,"What would you like to name this mob?","Input a name",M.real_name) as text|null),1,MAX_NAME_LEN)
+ if( !new_name || !M ) return
message_admins("Admin [key_name_admin(usr)] renamed [key_name_admin(M)] to [new_name].", 1)
- if(istype(M, /mob/living/carbon/human))
- for(var/obj/item/weapon/card/id/ID in M.contents)
- if(ID.registered_name == M.real_name)
- ID.name = "[new_name]'s ID Card ([ID.assignment])"
- ID.registered_name = new_name
- break
- for(var/obj/item/device/pda/PDA in M.contents)
- if(PDA.owner == M.real_name)
- PDA.name = "PDA-[new_name] ([PDA.ownjob])"
- PDA.owner = new_name
- break
- M.real_name = new_name
- M.name = new_name
- M.original_name = new_name
+ M.fully_replace_character_name(M.real_name,new_name)
href_list["datumrefresh"] = href_list["rename"]
else if (href_list["varnameedit"])
if(!href_list["datumedit"] || !href_list["varnameedit"])
- usr << "Varedit error: Not all information has been sent Contact a coder."
+ usr << "Varedit error: Not all information has been sent. Contact a coder."
return
var/DAT = locate(href_list["datumedit"])
if(!DAT)
@@ -731,23 +720,53 @@ client
usr << "Mob doesn't exist anymore"
return
holder.Topic(href, list("makeai"=href_list["makeai"]))
+ else if (href_list["setmutantrace"])
+ var/mob/living/carbon/human/H = locate(href_list["setmutantrace"])
+ if(!istype(H))
+ usr << "This can only be done to objects of type /mob/living/carbon/human"
+ return
+ if(!src.holder)
+ usr << "You are not an administrator."
+ return
+ var/new_mutantrace = input("Please choose a new mutantrace","Mutantrace",null) as null|anything in list("NONE","golem","lizard","metroid","plant")
+ switch(new_mutantrace)
+ if(null) return
+ if("NONE") new_mutantrace = ""
+ if(!H || !istype(H))
+ usr << "Mob doesn't exist anymore"
+ return
+ if(H.dna)
+ H.dna.mutantrace = new_mutantrace
+ H.update_mutantrace()
+ else if (href_list["regenerateicons"])
+ var/mob/M = locate(href_list["regenerateicons"])
+ if(!istype(M))
+ usr << "This can only be done to objects of type /mob"
+ return
+ if(!src.holder)
+ usr << "You are not an administrator."
+ return
+ M.regenerate_icons()
else if (href_list["adjustDamage"] && href_list["mobToDamage"])
var/mob/M = locate(href_list["mobToDamage"])
var/Text = locate(href_list["adjustDamage"])
+ if(!isliving(M)) return
+ var/mob/living/L = M
+
var/amount = input("Deal how much damage to mob? (Negative values here heal)","Adjust [Text]loss",0) as num
if(Text == "brute")
- M.adjustBruteLoss(amount)
+ L.adjustBruteLoss(amount)
else if(Text == "fire")
- M.adjustFireLoss(amount)
+ L.adjustFireLoss(amount)
else if(Text == "toxin")
- M.adjustToxLoss(amount)
+ L.adjustToxLoss(amount)
else if(Text == "oxygen")
- M.adjustOxyLoss(amount)
+ L.adjustOxyLoss(amount)
else if(Text == "brain")
- M.adjustBrainLoss(amount)
+ L.adjustBrainLoss(amount)
else if(Text == "clone")
- M.adjustCloneLoss(amount)
+ L.adjustCloneLoss(amount)
else
usr << "You caused an error. DEBUG: Text:[Text] Mob:[M]"
return
diff --git a/code/datums/disease.dm b/code/datums/disease.dm
index 99dd086df7..83dfbd7e95 100644
--- a/code/datums/disease.dm
+++ b/code/datums/disease.dm
@@ -130,7 +130,7 @@ to null does not delete the object itself. Thank you.
del(D) // if there are somehow two viruses of the same kind in the system, delete the other one
if(holder == affected_mob)
- if(affected_mob.stat < 2) //he's alive
+ if(affected_mob.stat != DEAD) //he's alive
stage_act()
else //he's dead.
if(spread_type!=SPECIAL)
@@ -145,15 +145,14 @@ to null does not delete the object itself. Thank you.
return
/datum/disease/proc/cure(var/resistance=1)//if resistance = 0, the mob won't develop resistance to disease
- if(resistance && affected_mob && !(type in affected_mob.resistances))
-// world << "Setting res to [src]"
- var/saved_type = "[type]"//copy the value, not create the reference to it, so when the object is deleted, the value remains.
- affected_mob.resistances += text2path(saved_type)
- if((affected_mob) && (istype(src, /datum/disease/alien_embryo)))//Get rid of the flag.
- affected_mob.alien_egg_flag = 0
-// world << "Removing [src]"
- spawn(0)
- del(src)
+ if(affected_mob)
+ if(resistance && !(type in affected_mob.resistances))
+ var/saved_type = "[type]"
+ affected_mob.resistances += text2path(saved_type)
+ if(istype(src, /datum/disease/alien_embryo)) //Get rid of the infection flag if it's a xeno embryo.
+ affected_mob.status_flags &= ~(XENO_HOST)
+ affected_mob.viruses -= src //remove the datum from the list
+ del(src) //delete the datum to stop it processing
return
diff --git a/code/datums/diseases/alien_embryo.dm b/code/datums/diseases/alien_embryo.dm
index 8be2fa5c1c..5a6f16fb5d 100644
--- a/code/datums/diseases/alien_embryo.dm
+++ b/code/datums/diseases/alien_embryo.dm
@@ -1,9 +1,19 @@
//affected_mob.contract_disease(new /datum/disease/alien_embryo)
+//Our own special process so that dead hosts still chestburst
+/datum/disease/alien_embryo/process()
+ if(!holder) return
+ if(holder == affected_mob)
+ stage_act()
-
-
-
+ if(affected_mob)
+ if(affected_mob.stat == DEAD)
+ if(prob(50))
+ if(--longevity<=0)
+ cure(0)
+ else //the virus is in inanimate obj
+ cure(0)
+ return
/datum/disease/alien_embryo
@@ -11,7 +21,6 @@
max_stages = 5
spread = "None"
spread_type = SPECIAL
- stage_prob = 2
cure = "Unknown"
cure_id = list("lexorin","toxin","gargleblaster")
cure_chance = 20
@@ -30,7 +39,7 @@
if(prob(1))
affected_mob << "\red Your throat feels sore."
if(prob(1))
- affected_mob << "\red Mucus runs down the back of your throat."
+ affected_mob << "\red Mucous runs down the back of your throat."
if(3)
if(prob(1))
affected_mob.emote("sneeze")
@@ -39,7 +48,7 @@
if(prob(1))
affected_mob << "\red Your throat feels sore."
if(prob(1))
- affected_mob << "\red Mucus runs down the back of your throat."
+ affected_mob << "\red Mucous runs down the back of your throat."
if(4)
if(prob(1))
affected_mob.emote("sneeze")
@@ -60,35 +69,22 @@
affected_mob.updatehealth()
if(prob(40))
if(gibbed != 0) return 0
- var/list/candidates = list() // Picks a random ghost in the world to shove in the larva -- TLE
- for(var/mob/dead/observer/G in world)
- if(G.client)
- if(G.client.be_alien)
- if(((G.client.inactivity/10)/60) <= 5)
- if(G.corpse)
- if(G.corpse.stat==2)
- candidates.Add(G)
- if(!G.corpse)
- candidates.Add(G)
+ var/list/candidates = list() //List of candidate KEYS to assume control of the new larva ~Carn
+ for(var/mob/dead/observer/G in player_list)
+ if(G.client.be_alien)
+ if(((G.client.inactivity/10)/60) <= 5)
+ if(!(G.mind && G.mind.current && G.mind.current.stat != DEAD))
+ candidates += G.key
+
+ var/mob/living/carbon/alien/larva/new_xeno = new(affected_mob.loc)
if(candidates.len)
- var/mob/dead/observer/G = pick(candidates)
- var/mob/living/carbon/alien/larva/new_xeno = new(affected_mob.loc)
- new_xeno.mind_initialize(G,"Larva")
- new_xeno.key = G.key
- del(G)
+ new_xeno.key = pick(candidates)
else
- if(affected_mob.client)
- affected_mob.client.mob = new/mob/living/carbon/alien/larva(affected_mob.loc)
+ new_xeno.key = affected_mob.key
+
+ new_xeno << sound('sound/voice/hiss5.ogg',0,0,0,100) //To get the player's attention
affected_mob.gib()
src.cure(0)
gibbed = 1
-
- /*
- if(affected_mob.client)
- affected_mob.client.mob = new/mob/living/carbon/alien/larva(affected_mob.loc)
- else
- new/mob/living/carbon/alien/larva(affected_mob.loc)
- affected_mob:gib()
- */
return
diff --git a/code/datums/diseases/appendicitis.dm b/code/datums/diseases/appendicitis.dm
index 6c822adb1e..68a0eeabf8 100644
--- a/code/datums/diseases/appendicitis.dm
+++ b/code/datums/diseases/appendicitis.dm
@@ -29,7 +29,7 @@
affected_mob.Stun(rand(4,6))
for(var/mob/O in viewers(world.view, affected_mob))
O.show_message(text("\red [] throws up!", affected_mob), 1)
- playsound(affected_mob.loc, 'splat.ogg', 50, 1)
+ playsound(affected_mob.loc, 'sound/effects/splat.ogg', 50, 1)
var/turf/location = affected_mob.loc
if (istype(location, /turf/simulated))
location.add_vomit_floor(affected_mob)
diff --git a/code/datums/diseases/cold.dm b/code/datums/diseases/cold.dm
index 35344d8ef9..9317fa12ef 100644
--- a/code/datums/diseases/cold.dm
+++ b/code/datums/diseases/cold.dm
@@ -35,7 +35,7 @@
if(prob(1))
affected_mob << "\red Your throat feels sore."
if(prob(1))
- affected_mob << "\red Mucus runs down the back of your throat."
+ affected_mob << "\red Mucous runs down the back of your throat."
if(3)
/*
if(affected_mob.sleeping && prob(25)) //removed until sleeping is fixed
@@ -58,7 +58,7 @@
if(prob(1))
affected_mob << "\red Your throat feels sore."
if(prob(1))
- affected_mob << "\red Mucus runs down the back of your throat."
+ affected_mob << "\red Mucous runs down the back of your throat."
if(prob(1) && prob(50))
if(!affected_mob.resistances.Find(/datum/disease/flu))
var/datum/disease/Flu = new /datum/disease/flu(0)
diff --git a/code/datums/diseases/pierrot_throat.dm b/code/datums/diseases/pierrot_throat.dm
index 2938b2120f..619e0f988a 100644
--- a/code/datums/diseases/pierrot_throat.dm
+++ b/code/datums/diseases/pierrot_throat.dm
@@ -4,7 +4,7 @@
spread = "Airborne"
cure = "A whole banana."
cure_id = "banana"
- cure_chance = 35
+ cure_chance = 75
agent = "H0NI<42 Virus"
affected_species = list("Human")
permeability_mod = 0.75
@@ -16,10 +16,10 @@
..()
switch(stage)
if(1)
- if(prob(1)) affected_mob << "\red You feel a little silly."
+ if(prob(10)) affected_mob << "\red You feel a little silly."
if(2)
- if(prob(1)) affected_mob.say("HONK!")
+ if(prob(10)) affected_mob << "\red You start seeing rainbows."
if(3)
- if(prob(5)) affected_mob.say("HONK!")
+ if(prob(10)) affected_mob << "\red Your thoughts are interrupted by a loud HONK!"
if(4)
- if(prob(10)) affected_mob.say("HONK!")
\ No newline at end of file
+ if(prob(5)) affected_mob.say( pick( list("HONK!", "Honk!", "Honk.", "Honk?", "Honk!!", "Honk?!", "Honk...") ) )
\ No newline at end of file
diff --git a/code/datums/diseases/robotic_transformation.dm b/code/datums/diseases/robotic_transformation.dm
index 8692ef5446..9648191fb0 100644
--- a/code/datums/diseases/robotic_transformation.dm
+++ b/code/datums/diseases/robotic_transformation.dm
@@ -53,12 +53,13 @@
affected_mob.updatehealth()
if(prob(40)) //So everyone can feel like robot Seth Brundle
if(src.gibbed != 0) return 0
- var/turf/T = get_turf(affected_mob)
+ var/turf/T = find_loc(affected_mob)
gibs(T)
src.cure(0)
gibbed = 1
- if(!jobban_isbanned(affected_mob, "Cyborg"))
- affected_mob:Robotize()
+ var/mob/living/carbon/human/H = affected_mob
+ if(istype(H) && !jobban_isbanned(affected_mob, "Cyborg"))
+ H.Robotize()
else
affected_mob.death(1)
diff --git a/code/datums/diseases/wizarditis.dm b/code/datums/diseases/wizarditis.dm
index 4b4e15d7dd..ebba6f645f 100644
--- a/code/datums/diseases/wizarditis.dm
+++ b/code/datums/diseases/wizarditis.dm
@@ -60,21 +60,21 @@ STI KALY - blind
if(prob(chance))
if(!istype(H.head, /obj/item/clothing/head/wizard))
if(H.head)
- H.drop_from_slot(H.head)
+ H.drop_from_inventory(H.head)
H.head = new /obj/item/clothing/head/wizard(H)
H.head.layer = 20
return
if(prob(chance))
if(!istype(H.wear_suit, /obj/item/clothing/suit/wizrobe))
if(H.wear_suit)
- H.drop_from_slot(H.wear_suit)
+ H.drop_from_inventory(H.wear_suit)
H.wear_suit = new /obj/item/clothing/suit/wizrobe(H)
H.wear_suit.layer = 20
return
if(prob(chance))
if(!istype(H.shoes, /obj/item/clothing/shoes/sandal))
if(H.shoes)
- H.drop_from_slot(H.shoes)
+ H.drop_from_inventory(H.shoes)
H.shoes = new /obj/item/clothing/shoes/sandal(H)
H.shoes.layer = 20
return
@@ -82,10 +82,8 @@ STI KALY - blind
var/mob/living/carbon/H = affected_mob
if(prob(chance))
if(!istype(H.r_hand, /obj/item/weapon/staff))
- if(H.r_hand)
- H.drop_from_slot(H.r_hand)
- H.r_hand = new /obj/item/weapon/staff(H)
- H.r_hand.layer = 20
+ H.drop_r_hand()
+ H.put_in_r_hand( new /obj/item/weapon/staff(H) )
return
return
diff --git a/code/datums/diseases/xeno_transformation.dm b/code/datums/diseases/xeno_transformation.dm
index 09e3f20e77..9d3289708f 100644
--- a/code/datums/diseases/xeno_transformation.dm
+++ b/code/datums/diseases/xeno_transformation.dm
@@ -53,7 +53,7 @@
affected_mob.updatehealth()
if(prob(40))
if(gibbed != 0) return 0
- var/turf/T = get_turf(affected_mob)
+ var/turf/T = find_loc(affected_mob)
gibs(T)
src.cure(0)
gibbed = 1
diff --git a/code/datums/helper_datums/construction_datum.dm b/code/datums/helper_datums/construction_datum.dm
index e3f6470414..7c2fabbc9b 100644
--- a/code/datums/helper_datums/construction_datum.dm
+++ b/code/datums/helper_datums/construction_datum.dm
@@ -46,11 +46,11 @@
proc/check_all_steps(atom/used_atom,mob/user as mob) //check all steps, remove matching one.
for(var/i=1;i<=steps.len;i++)
- var/list/L = steps[i]
+ var/list/L = steps[i];
if(istype(used_atom, L["key"]))
if(custom_action(i, used_atom, user))
- steps[i]=null//stupid byond list from list removal...
- steps.Remove(null)
+ steps[i]=null;//stupid byond list from list removal...
+ listclearnulls(steps);
if(!steps.len)
spawn_result()
return 1
diff --git a/code/datums/helper_datums/getrev.dm b/code/datums/helper_datums/getrev.dm
index 300aee55f5..03732d6873 100644
--- a/code/datums/helper_datums/getrev.dm
+++ b/code/datums/helper_datums/getrev.dm
@@ -14,6 +14,7 @@ var/global/datum/getrev/revdata = new("config/svndir.txt")
var/revhref
proc/abort()
+ world.log << "Unable to get revision info."
spawn()
del src
@@ -24,7 +25,7 @@ var/global/datum/getrev/revdata = new("config/svndir.txt")
var/text = file2text(file(filename))
if(!text)
- diary << "Unable to get [filename] contents, aborting"
+ world.log << "Unable to get [filename] contents, aborting"
return abort()
var/list/CL = tg_text2list(text, "\n")
@@ -58,6 +59,7 @@ var/global/datum/getrev/revdata = new("config/svndir.txt")
return abort()
revision = filelist[4]
commiter = filelist[12]
+ world.log << "Running TG Revision Number: [revision]."
diary << "Revision info loaded succesfully"
return
return abort()
@@ -84,11 +86,10 @@ client/verb/showrevinfo()
set category = "OOC"
set name = "Show Server Revision"
var/output = "Sorry, the revision info is unavailable."
- output = file2text("/home/bay12/live/data/gitcommit")
- output += "Current Infomational Settings: "
- output += "Tensioner Status: [config.Tensioner_Active] "
- //output += "Current Tension: [tension_master.score] "
- //output += "Tensioner Debug Data: R1:[tension_master.round1] R2:[tension_master.round2] R3:[tension_master.round3] R4:[tension_master.round4] ES: [tension_master.eversupressed] CD: [tension_master.cooldown] "
- output += "Protect Authority Roles From Tratior: [config.protect_roles_from_antagonist] "
+ if(revdata)
+ output = revdata.showInfo()
+
+ output += "Current Infomational Settings: "
+ output += "Protect Authority Roles From Tratior: [config.protect_roles_from_antagonist] "
usr << browse(output,"window=revdata");
return
diff --git a/code/datums/helper_datums/teleport.dm b/code/datums/helper_datums/teleport.dm
index f157909ff6..4267328dca 100644
--- a/code/datums/helper_datums/teleport.dm
+++ b/code/datums/helper_datums/teleport.dm
@@ -3,10 +3,6 @@
new /datum/teleport/instant/science(arglist(args))
return
-/proc/do_teleport_stealth(ateleatom, adestination, aprecision=0, afteleport=1, aeffectin=null, aeffectout=null, asoundin=null, asoundout=null)
- new /datum/teleport/instant(arglist(args))
- return
-
/datum/teleport
var/atom/movable/teleatom //atom to teleport
var/atom/destination //destination to teleport to
@@ -114,7 +110,7 @@
// Remove any luminosity etc.
var/prevlum = teleatom.luminosity
- teleatom.ul_SetLuminosity(0)
+ teleatom.luminosity = 0
if(force_teleport)
teleatom.forceMove(destturf)
@@ -124,7 +120,7 @@
playSpecials(destturf,effectout,soundout)
// Re-Apply lum
- teleatom.ul_SetLuminosity(prevlum)
+ teleatom.sd_SetLuminosity(prevlum)
destarea.Entered(teleatom)
@@ -172,8 +168,7 @@
if(istype(teleatom, /obj/item/weapon/disk/nuclear)) // Don't let nuke disks get teleported --NeoFite
teleatom.visible_message("\red The [teleatom] bounces off of the portal!")
return 0
- var/list/temp = teleatom.search_contents_for(/obj/item/weapon/disk/nuclear)
- if(temp.len)
+ if(!isemptylist(teleatom.search_contents_for(/obj/item/weapon/disk/nuclear)))
if(istype(teleatom, /mob/living))
var/mob/living/MM = teleatom
MM.visible_message("\red The [MM] bounces off of the portal!","\red Something you are carrying seems to be unable to pass through the portal. Better drop it if you want to go through.")
diff --git a/code/datums/helper_datums/tension.dm b/code/datums/helper_datums/tension.dm
index 37cb3374f6..1cf5eb2acd 100644
--- a/code/datums/helper_datums/tension.dm
+++ b/code/datums/helper_datums/tension.dm
@@ -101,9 +101,8 @@ var/global/datum/tension/tension_master
if(forcenexttick)
forcenexttick = 0
- for (var/mob/M in world)
- if (M.client && M.client.holder)
- M << " The tensioner wishes to create additional antagonists! Press (this) in 60 seconds to abort!"
+ for (var/client/C in admin_list)
+ C << " The tensioner wishes to create additional antagonists! Press (this) in 60 seconds to abort!"
spawn(600)
if(!supress)
@@ -201,7 +200,7 @@ var/global/datum/tension/tension_master
proc/get_num_players()
var/peeps = 0
- for (var/mob/M in world)
+ for (var/mob/M in player_list)
if (!M.client)
continue
peeps += 1
@@ -232,9 +231,18 @@ var/global/datum/tension/tension_master
Topic(href, href_list)
+ if(!usr || !usr.client)
+ return //This shouldnt happen
+
+ if(!usr.client.holder)
+ message_admins("\red [key_name(usr)] tried to use the tensioner without authorization.")
+ log_admin("[key_name(usr)] tried to use the tensioner without authorization.")
+ return
+
log_admin("[key_name(usr)] used a tensioner override. The override was [href]")
message_admins("[key_name(usr)] used a tensioner override. The override was [href]")
+
if(href_list["addScore"])
score += 50000
@@ -287,7 +295,7 @@ var/global/datum/tension/tension_master
var/mob/living/silicon/malfAI = null
var/datum/mind/themind = null
- for(var/mob/living/silicon/ai/ai in world)
+ for(var/mob/living/silicon/ai/ai in player_list)
if(ai.client)
AIs += ai
@@ -327,7 +335,7 @@ var/global/datum/tension/tension_master
var/list/mob/living/carbon/human/candidates = list()
var/mob/living/carbon/human/H = null
- for(var/mob/living/carbon/human/applicant in world)
+ for(var/mob/living/carbon/human/applicant in player_list)
var/datum/preferences/preferences = new
@@ -364,7 +372,7 @@ var/global/datum/tension/tension_master
var/list/mob/living/carbon/human/candidates = list()
var/mob/living/carbon/human/H = null
- for(var/mob/living/carbon/human/applicant in world)
+ for(var/mob/living/carbon/human/applicant in player_list)
var/datum/preferences/preferences = new
@@ -400,7 +408,7 @@ var/global/datum/tension/tension_master
var/list/mob/living/carbon/human/candidates = list()
var/mob/living/carbon/human/H = null
- for(var/mob/living/carbon/human/applicant in world)
+ for(var/mob/living/carbon/human/applicant in player_list)
var/datum/preferences/preferences = new
@@ -431,7 +439,7 @@ var/global/datum/tension/tension_master
var/mob/dead/observer/theghost = null
var/time_passed = world.time
- for(var/mob/dead/observer/G in world)
+ for(var/mob/dead/observer/G in player_list)
if(!jobban_isbanned(G, "wizard") && !jobban_isbanned(G, "Syndicate"))
spawn(0)
switch(alert(G, "Do you wish to be considered for the position of Space Wizard Foundation 'diplomat'?","Please answer in 30 seconds!","Yes","No"))
@@ -445,7 +453,7 @@ var/global/datum/tension/tension_master
sleep(300)
for(var/mob/dead/observer/G in candidates)
- if(!G.client || !G.key)
+ if(!G.client)
candidates.Remove(G)
spawn(0)
@@ -456,11 +464,8 @@ var/global/datum/tension/tension_master
if(!theghost)
return 0
var/mob/living/carbon/human/new_character=makeBody(theghost)
- del(theghost)
new_character.mind.make_Wizard()
-
-
return 1 // Has to return one before it knows if there's a wizard to prevent the parent from automatically selecting another game mode.
@@ -473,7 +478,7 @@ var/global/datum/tension/tension_master
var/list/mob/living/carbon/human/candidates = list()
var/mob/living/carbon/human/H = null
- for(var/mob/living/carbon/human/applicant in world)
+ for(var/mob/living/carbon/human/applicant in player_list)
var/datum/preferences/preferences = new
@@ -514,7 +519,7 @@ var/global/datum/tension/tension_master
var/mob/dead/observer/theghost = null
var/time_passed = world.time
- for(var/mob/dead/observer/G in world)
+ for(var/mob/dead/observer/G in player_list)
if(!jobban_isbanned(G, "operative") && !jobban_isbanned(G, "Syndicate"))
spawn(0)
switch(alert(G,"Do you wish to be considered for a nuke team being sent in?","Please answer in 30 seconds!","Yes","No"))
@@ -528,7 +533,7 @@ var/global/datum/tension/tension_master
sleep(300)
for(var/mob/dead/observer/G in candidates)
- if(!G.client || !G.key)
+ if(!G.client)
candidates.Remove(G)
spawn(0)
@@ -543,7 +548,6 @@ var/global/datum/tension/tension_master
if(!theghost)
break
var/mob/living/carbon/human/new_character=makeBody(theghost)
- del(theghost)
new_character.mind.make_Nuke()
@@ -561,7 +565,7 @@ var/global/datum/tension/tension_master
if(closet_spawn)
new /obj/structure/closet/syndicate/nuclear(closet_spawn.loc)
- for (var/obj/effect/landmark/A in world)
+ for (var/obj/effect/landmark/A in /area/syndicate_station/start)//Because that's the only place it can BE -Sieve
if (A.name == "Syndicate-Gear-Closet")
new /obj/structure/closet/syndicate/personal(A.loc)
del(A)
@@ -579,15 +583,14 @@ var/global/datum/tension/tension_master
if(synd_mind.current.client)
for(var/image/I in synd_mind.current.client.images)
if(I.icon_state == "synd")
- synd_mind.current.client.images -= I
+ del(I)
for(var/datum/mind/synd_mind in ticker.mode.syndicates)
if(synd_mind.current)
if(synd_mind.current.client)
for(var/datum/mind/synd_mind_1 in ticker.mode.syndicates)
if(synd_mind_1.current)
- var/image/I = synd_mind_1.current.antag_img
- I.icon_state = "synd"
+ var/I = image('icons/mob/mob.dmi', loc = synd_mind_1.current, icon_state = "synd")
synd_mind.current.client.images += I
for (var/obj/machinery/nuclearbomb/bomb in world)
@@ -600,7 +603,7 @@ var/global/datum/tension/tension_master
proc/makeAliens()
- Force_Event(/datum/event/alieninfestation)
+ alien_infestation(3)
return 1
proc/makeSpaceNinja()
@@ -627,7 +630,7 @@ var/global/datum/tension/tension_master
//Generates a list of commandos from active ghosts. Then the user picks which characters to respawn as the commandos.
- for(var/mob/dead/observer/G in world)
+ for(var/mob/dead/observer/G in player_list)
spawn(0)
switch(alert(G,"Do you wish to be considered for an elite syndicate strike team being sent in?","Please answer in 30 seconds!","Yes","No"))
if("Yes")
@@ -639,13 +642,13 @@ var/global/datum/tension/tension_master
sleep(300)
for(var/mob/dead/observer/G in candidates)
- if(!G.client || !G.key)
+ if(!G.key)
candidates.Remove(G)
if(candidates.len)
var/numagents = 6
//Spawns commandos and equips them.
- for (var/obj/effect/landmark/L in world)
+ for (var/obj/effect/landmark/L in /area/syndicate_mothership/elite_squad)
if(numagents<=0)
break
if (L.name == "Syndicate-Commando")
@@ -654,7 +657,6 @@ var/global/datum/tension/tension_master
var/mob/living/carbon/human/new_syndicate_commando = create_syndicate_death_commando(L, syndicate_leader_selected)
-
while((!theghost || !theghost.client) && candidates.len)
theghost = pick(candidates)
candidates.Remove(theghost)
@@ -663,11 +665,9 @@ var/global/datum/tension/tension_master
del(new_syndicate_commando)
break
- new_syndicate_commando.mind.key = theghost.key//For mind stuff.
new_syndicate_commando.key = theghost.key
new_syndicate_commando.internal = new_syndicate_commando.s_store
new_syndicate_commando.internals.icon_state = "internal1"
- del(theghost)
//So they don't forget their code or mission.
@@ -681,10 +681,10 @@ var/global/datum/tension/tension_master
// if (L.name == "Commando_Manual")
//new /obj/item/weapon/gun/energy/pulse_rifle(L.loc)
// var/obj/item/weapon/paper/P = new(L.loc)
- // P.info = "
Good morning soldier!. This compact guide will familiarize you with standard operating procedure. There are three basic rules to follow: #1 Work as a team. #2 Accomplish your objective at all costs. #3 Leave no witnesses. You are fully equipped and stocked for your mission--before departing on the Spec. Ops. Shuttle due South, make sure that all operatives are ready. Actual mission objective will be relayed to you by Central Command through your headsets. If deemed appropriate, Central Command will also allow members of your team to equip assault power-armor for the mission. You will find the armor storage due West of your position. Once you are ready to leave, utilize the Special Operations shuttle console and toggle the hull doors via the other console.
In the event that the team does not accomplish their assigned objective in a timely manner, or finds no other way to do so, attached below are instructions on how to operate a NanoTrasen Nuclear Device. Your operations LEADER is provided with a nuclear authentication disk and a pin-pointer for this reason. You may easily recognize them by their rank: Lieutenant, Captain, or Major. The nuclear device itself will be present somewhere on your destination.
Hello and thank you for choosing NanoTrasen for your nuclear information needs. Today's crash course will deal with the operation of a Fission Class NanoTrasen made Nuclear Device. First and foremost, DO NOT TOUCH ANYTHING UNTIL THE BOMB IS IN PLACE. Pressing any button on the compacted bomb will cause it to extend and bolt itself into place. If this is done to unbolt it one must completely log in which at this time may not be possible. To make the device functional: #1 Place bomb in designated detonation zone #2 Extend and anchor bomb (attack with hand). #3 Insert Nuclear Auth. Disk into slot. #4 Type numeric code into keypad ([nuke_code]). Note: If you make a mistake press R to reset the device. #5 Press the E button to log onto the device. You now have activated the device. To deactivate the buttons at anytime, for example when you have already prepped the bomb for detonation, remove the authentication disk OR press the R on the keypad. Now the bomb CAN ONLY be detonated using the timer. A manual detonation is not an option. Note: Toggle off the SAFETY. Use the - - and + + to set a detonation time between 5 seconds and 10 minutes. Then press the timer toggle button to start the countdown. Now remove the authentication disk so that the buttons deactivate. Note: THE BOMB IS STILL SET AND WILL DETONATE Now before you remove the disk if you need to move the bomb you can: Toggle off the anchor, move it, and re-anchor.
The nuclear authorization code is: [nuke_code ? nuke_code : "None provided"]
Good luck, soldier!
"
+ // P.info = "
Good morning soldier!. This compact guide will familiarize you with standard operating procedure. There are three basic rules to follow: #1 Work as a team. #2 Accomplish your objective at all costs. #3 Leave no witnesses. You are fully equipped and stocked for your mission--before departing on the Spec. Ops. Shuttle due South, make sure that all operatives are ready. Actual mission objective will be relayed to you by Central Command through your headsets. If deemed appropriate, Central Command will also allow members of your team to equip assault power-armor for the mission. You will find the armor storage due West of your position. Once you are ready to leave, utilize the Special Operations shuttle console and toggle the hull doors via the other console.
In the event that the team does not accomplish their assigned objective in a timely manner, or finds no other way to do so, attached below are instructions on how to operate a Nanotrasen Nuclear Device. Your operations LEADER is provided with a nuclear authentication disk and a pin-pointer for this reason. You may easily recognize them by their rank: Lieutenant, Captain, or Major. The nuclear device itself will be present somewhere on your destination.
Hello and thank you for choosing Nanotrasen for your nuclear information needs. Today's crash course will deal with the operation of a Fission Class Nanotrasen made Nuclear Device. First and foremost, DO NOT TOUCH ANYTHING UNTIL THE BOMB IS IN PLACE. Pressing any button on the compacted bomb will cause it to extend and bolt itself into place. If this is done to unbolt it one must completely log in which at this time may not be possible. To make the device functional: #1 Place bomb in designated detonation zone #2 Extend and anchor bomb (attack with hand). #3 Insert Nuclear Auth. Disk into slot. #4 Type numeric code into keypad ([nuke_code]). Note: If you make a mistake press R to reset the device. #5 Press the E button to log onto the device. You now have activated the device. To deactivate the buttons at anytime, for example when you have already prepped the bomb for detonation, remove the authentication disk OR press the R on the keypad. Now the bomb CAN ONLY be detonated using the timer. A manual detonation is not an option. Note: Toggle off the SAFETY. Use the - - and + + to set a detonation time between 5 seconds and 10 minutes. Then press the timer toggle button to start the countdown. Now remove the authentication disk so that the buttons deactivate. Note: THE BOMB IS STILL SET AND WILL DETONATE Now before you remove the disk if you need to move the bomb you can: Toggle off the anchor, move it, and re-anchor.
The nuclear authorization code is: [nuke_code ? nuke_code : "None provided"]
Good luck, soldier!
"
// P.name = "Spec. Ops. Manual"
- for (var/obj/effect/landmark/L in world)
+ for (var/obj/effect/landmark/L in /area/shuttle/syndicate_elite)
if (L.name == "Syndicate-Commando-Bomb")
new /obj/effect/spawner/newbomb/timer/syndicate(L.loc)
// del(L)
@@ -700,7 +700,7 @@ var/global/datum/tension/tension_master
//Generates a list of commandos from active ghosts. Then the user picks which characters to respawn as the commandos.
- for(var/mob/dead/observer/G in world)
+ for(var/mob/dead/observer/G in player_list)
spawn(0)
switch(alert(G,"Do you wish to be considered for a cyborg strike team being sent in?","Please answer in 30 seconds!","Yes","No"))
if("Yes")
@@ -719,7 +719,7 @@ var/global/datum/tension/tension_master
var/numagents = 3
//Spawns commandos and equips them.
- for (var/obj/effect/landmark/L in world)
+ for (var/obj/effect/landmark/L in /area/borg_deathsquad)
if(numagents<=0)
break
if (L.name == "Borg-Deathsquad")
@@ -739,9 +739,7 @@ var/global/datum/tension/tension_master
del(new_borg_deathsquad)
break
- new_borg_deathsquad.mind.key = theghost.key//For mind stuff.
new_borg_deathsquad.key = theghost.key
- del(theghost)
//So they don't forget their code or mission.
@@ -754,156 +752,33 @@ var/global/datum/tension/tension_master
// if (L.name == "Commando_Manual")
//new /obj/item/weapon/gun/energy/pulse_rifle(L.loc)
// var/obj/item/weapon/paper/P = new(L.loc)
- // P.info = "
Good morning soldier!. This compact guide will familiarize you with standard operating procedure. There are three basic rules to follow: #1 Work as a team. #2 Accomplish your objective at all costs. #3 Leave no witnesses. You are fully equipped and stocked for your mission--before departing on the Spec. Ops. Shuttle due South, make sure that all operatives are ready. Actual mission objective will be relayed to you by Central Command through your headsets. If deemed appropriate, Central Command will also allow members of your team to equip assault power-armor for the mission. You will find the armor storage due West of your position. Once you are ready to leave, utilize the Special Operations shuttle console and toggle the hull doors via the other console.
In the event that the team does not accomplish their assigned objective in a timely manner, or finds no other way to do so, attached below are instructions on how to operate a NanoTrasen Nuclear Device. Your operations LEADER is provided with a nuclear authentication disk and a pin-pointer for this reason. You may easily recognize them by their rank: Lieutenant, Captain, or Major. The nuclear device itself will be present somewhere on your destination.
Hello and thank you for choosing NanoTrasen for your nuclear information needs. Today's crash course will deal with the operation of a Fission Class NanoTrasen made Nuclear Device. First and foremost, DO NOT TOUCH ANYTHING UNTIL THE BOMB IS IN PLACE. Pressing any button on the compacted bomb will cause it to extend and bolt itself into place. If this is done to unbolt it one must completely log in which at this time may not be possible. To make the device functional: #1 Place bomb in designated detonation zone #2 Extend and anchor bomb (attack with hand). #3 Insert Nuclear Auth. Disk into slot. #4 Type numeric code into keypad ([nuke_code]). Note: If you make a mistake press R to reset the device. #5 Press the E button to log onto the device. You now have activated the device. To deactivate the buttons at anytime, for example when you have already prepped the bomb for detonation, remove the authentication disk OR press the R on the keypad. Now the bomb CAN ONLY be detonated using the timer. A manual detonation is not an option. Note: Toggle off the SAFETY. Use the - - and + + to set a detonation time between 5 seconds and 10 minutes. Then press the timer toggle button to start the countdown. Now remove the authentication disk so that the buttons deactivate. Note: THE BOMB IS STILL SET AND WILL DETONATE Now before you remove the disk if you need to move the bomb you can: Toggle off the anchor, move it, and re-anchor.
The nuclear authorization code is: [nuke_code ? nuke_code : "None provided"]
Good luck, soldier!
"
+ // P.info = "
Good morning soldier!. This compact guide will familiarize you with standard operating procedure. There are three basic rules to follow: #1 Work as a team. #2 Accomplish your objective at all costs. #3 Leave no witnesses. You are fully equipped and stocked for your mission--before departing on the Spec. Ops. Shuttle due South, make sure that all operatives are ready. Actual mission objective will be relayed to you by Central Command through your headsets. If deemed appropriate, Central Command will also allow members of your team to equip assault power-armor for the mission. You will find the armor storage due West of your position. Once you are ready to leave, utilize the Special Operations shuttle console and toggle the hull doors via the other console.
In the event that the team does not accomplish their assigned objective in a timely manner, or finds no other way to do so, attached below are instructions on how to operate a Nanotrasen Nuclear Device. Your operations LEADER is provided with a nuclear authentication disk and a pin-pointer for this reason. You may easily recognize them by their rank: Lieutenant, Captain, or Major. The nuclear device itself will be present somewhere on your destination.
Hello and thank you for choosing Nanotrasen for your nuclear information needs. Today's crash course will deal with the operation of a Fission Class Nanotrasen made Nuclear Device. First and foremost, DO NOT TOUCH ANYTHING UNTIL THE BOMB IS IN PLACE. Pressing any button on the compacted bomb will cause it to extend and bolt itself into place. If this is done to unbolt it one must completely log in which at this time may not be possible. To make the device functional: #1 Place bomb in designated detonation zone #2 Extend and anchor bomb (attack with hand). #3 Insert Nuclear Auth. Disk into slot. #4 Type numeric code into keypad ([nuke_code]). Note: If you make a mistake press R to reset the device. #5 Press the E button to log onto the device. You now have activated the device. To deactivate the buttons at anytime, for example when you have already prepped the bomb for detonation, remove the authentication disk OR press the R on the keypad. Now the bomb CAN ONLY be detonated using the timer. A manual detonation is not an option. Note: Toggle off the SAFETY. Use the - - and + + to set a detonation time between 5 seconds and 10 minutes. Then press the timer toggle button to start the countdown. Now remove the authentication disk so that the buttons deactivate. Note: THE BOMB IS STILL SET AND WILL DETONATE Now before you remove the disk if you need to move the bomb you can: Toggle off the anchor, move it, and re-anchor.
The nuclear authorization code is: [nuke_code ? nuke_code : "None provided"]
Good luck, soldier!
"
// P.name = "Spec. Ops. Manual"
return 1 // Has to return one before it knows if there's a wizard to prevent the parent from automatically selecting another game mode.
-
-
-
-
-
-
-
-
proc/makeBody(var/mob/dead/observer/G_found) // Uses stripped down and bastardized code from respawn character
-
- if(!G_found)
- return
+ if(!G_found || !G_found.key) return
//First we spawn a dude.
- var/mob/living/carbon/human/new_character = new(src)//The mob being spawned.
+ var/mob/living/carbon/human/new_character = new(pick(latejoin))//The mob being spawned.
- //Second, we check if they are an alien or monkey.
- G_found.mind=null//Null their mind so we don't screw things up ahead.
- G_found.real_name="[pick(pick(first_names_male,first_names_female))] [pick(last_names)]"//Give them a random real name.
+ new_character.gender = pick(MALE,FEMALE)
- new_character.mind = new()
- ticker.minds += new_character.mind//And we'll add it to the minds database.
- new_character.mind.original = new_character//If they are respawning with a new character.
- new_character.mind.assigned_role = "Assistant"//Defaults to assistant.
- new_character.mind.key = G_found.key//In case it's someone else playing as that character.
- new_character.mind.current = new_character//So that it can properly reference later if needed.
- new_character.mind.memory = ""//Memory erased so it doesn't get clunkered up with useless info. This means they may forget their previous mission--this is usually handled through objective code and recalling memory.
-
- var/datum/data/record/record_found//Referenced to later to either randomize or not randomize the character.
- if(G_found.mind)//They must have a mind to reference the record. Here we also double check for aliens.
- var/id = md5("[G_found.real_name][G_found.mind.assigned_role]")
- for(var/datum/data/record/t in data_core.locked)
- if(t.fields["id"]==id)
- record_found = t//We shall now reference the record.
- break
-
- //Here we either load their saved appearance or randomize it.
var/datum/preferences/A = new()
- if(A.savefile_load(G_found))//If they have a save file. This will automatically load their parameters.
- //Note: savefile appearances are overwritten later on if the character has a data_core entry. By appearance, I mean the physical appearance.
- var/name_safety = G_found.real_name//Their saved parameters may include a random name. Also a safety in case they are playing a character that got their name after round start.
- A.copy_to(new_character)
- new_character.real_name = name_safety
- new_character.name = name_safety
+ A.randomize_appearance_for(new_character)
+ if(new_character.gender == MALE)
+ new_character.real_name = "[pick(first_names_male)] [pick(last_names)]"
else
- if(record_found)//If they have a record we can determine a few things.
- new_character.real_name = record_found.fields["name"]//Not necessary to reference the record but I like to keep things uniform.
- new_character.name = record_found.fields["name"]
- new_character.gender = record_found.fields["sex"]//Sex
- new_character.age = record_found.fields["age"]//Age
-// new_character.b_type = record_found.fields["bloodtype"]
- //We will update their appearance when determining DNA.
- else
- new_character.gender = FEMALE
- var/name_safety = G_found.real_name//Default is a random name so we want to save this.
- A.randomize_appearance_for(new_character)//Now we will randomize their appearance since we have no way of knowing what they look/looked like.
- new_character.real_name = name_safety
- new_character.name = name_safety
+ new_character.real_name = "[pick(first_names_female)] [pick(last_names)]"
+ new_character.name = new_character.real_name
+ new_character.age = rand(17,45)
- //After everything above, it's time to initialize their DNA.
- if(record_found)//Pull up their name from database records if they did have a mind.
- new_character.dna = new()//Let's first give them a new DNA.
- new_character.dna.unique_enzymes = record_found.fields["b_dna"]//Enzymes are based on real name but we'll use the record for conformity.
- new_character.dna.struc_enzymes = record_found.fields["enzymes"]//This is the default of enzymes so I think it's safe to go with.
- new_character.dna.uni_identity = record_found.fields["identity"]//DNA identity is carried over.
- new_character.dna.b_type = record_found.fields["b_type"]//Blood type
- updateappearance(new_character,new_character.dna.uni_identity)//Now we configure their appearance based on their unique identity, same as with a DNA machine or somesuch.
- else//If they have no records, we just do a random DNA for them, based on their random appearance/savefile.
- new_character.dna.ready_dna(new_character)
+ new_character.dna.ready_dna(new_character)
+ new_character.key = G_found.key
-
- var/player_key = G_found.key
-
- //Here we need to find where to spawn them.
- var/spawn_here = pick(latejoin)//"JoinLate" is a landmark which is deleted on round start. So, latejoin has to be used instead.
- new_character.loc = spawn_here
- //If they need to spawn elsewhere, they will be transferred there momentarily.
-
- /*
- The code below functions with the assumption that the mob is already a traitor if they have a special role.
- So all it does is re-equip the mob with powers and/or items. Or not, if they have no special role.
- If they don't have a mind, they obviously don't have a special role.
- */
-
- new_character.key = player_key//Throw them into the mob.
-/*
- //Now for special roles and equipment.
- switch(new_character.mind.special_role)
- if("Changeling")
- job_master.EquipRank(new_character, new_character.mind.assigned_role, 1)
- new_character.make_changeling()
- if("traitor")
- job_master.EquipRank(new_character, new_character.mind.assigned_role, 1)
- ticker.mode.equip_traitor(new_character)
- if("Wizard")
- new_character.loc = pick(wizardstart)
- //ticker.mode.learn_basic_spells(new_character)
- ticker.mode.equip_wizard(new_character)
- if("Syndicate")
- var/obj/effect/landmark/synd_spawn = locate("landmark*Syndicate-Spawn")
- if(synd_spawn)
- new_character.loc = get_turf(synd_spawn)
- call(/datum/game_mode/proc/equip_syndicate)(new_character)
- if("Space Ninja")
- var/ninja_spawn[] = list()
- for(var/obj/effect/landmark/L in world)
- if(L.name=="carpspawn")
- ninja_spawn += L
- new_character.equip_space_ninja()
- new_character.internal = new_character.s_store
- new_character.internals.icon_state = "internal1"
- if(ninja_spawn.len)
- var/obj/effect/landmark/ninja_spawn_here = pick(ninja_spawn)
- new_character.loc = ninja_spawn_here.loc
- if("Death Commando")//Leaves them at late-join spawn.
- new_character.equip_death_commando()
- new_character.internal = new_character.s_store
- new_character.internals.icon_state = "internal1"
- else//They may also be a cyborg or AI.
- switch(new_character.mind.assigned_role)
- if("Cyborg")//More rigging to make em' work and check if they're traitor.
- new_character = new_character.Robotize()
- if(new_character.mind.special_role=="traitor")
- call(/datum/game_mode/proc/add_law_zero)(new_character)
- if("AI")
- new_character = new_character.AIize()
- if(new_character.mind.special_role=="traitor")
- call(/datum/game_mode/proc/add_law_zero)(new_character)
- //Add aliens.
- else
- job_master.EquipRank(new_character, new_character.mind.assigned_role, 1)//Or we simply equip them.
-
- //Announces the character on all the systems, based on the record.
- if(!issilicon(new_character))//If they are not a cyborg/AI.
- if(!record_found&&new_character.mind.assigned_role!="MODE")//If there are no records for them. If they have a record, this info is already in there. MODE people are not announced anyway.
- //Power to the user!
- if(alert(new_character,"Warning: No data core entry detected. Would you like to announce the arrival of this character by adding them to various databases, such as medical records?",,"No","Yes")=="Yes")
- call(/mob/new_player/proc/ManifestLateSpawn)(new_character)
-
- if(alert(new_character,"Would you like an active AI to announce this character?",,"No","Yes")=="Yes")
- call(/mob/new_player/proc/AnnounceArrival)(new_character, new_character.mind.assigned_role)
-*/
- del(G_found)//Don't want to leave ghosts around.
return new_character
/proc/create_syndicate_death_commando(obj/spawn_location, syndicate_leader_selected = 0)
@@ -918,22 +793,20 @@ var/global/datum/tension/tension_master
A.randomize_appearance_for(new_syndicate_commando)
new_syndicate_commando.real_name = "[!syndicate_leader_selected ? syndicate_commando_rank : syndicate_commando_leader_rank] [syndicate_commando_name]"
+ new_syndicate_commando.name = new_syndicate_commando.real_name
new_syndicate_commando.age = !syndicate_leader_selected ? rand(23,35) : rand(35,45)
new_syndicate_commando.dna.ready_dna(new_syndicate_commando)//Creates DNA.
//Creates mind stuff.
- new_syndicate_commando.mind = new
- new_syndicate_commando.mind.current = new_syndicate_commando
- new_syndicate_commando.mind.original = new_syndicate_commando
+ new_syndicate_commando.mind_initialize()
new_syndicate_commando.mind.assigned_role = "MODE"
new_syndicate_commando.mind.special_role = "Syndicate Commando"
- if(!(new_syndicate_commando.mind in ticker.minds))
- ticker.minds += new_syndicate_commando.mind//Adds them to regular mind list.
- if(!(new_syndicate_commando.mind in ticker.mode.traitors))//If they weren't already an extra traitor.
- ticker.mode.traitors += new_syndicate_commando.mind//Adds them to current traitor list. Which is really the extra antagonist list.
+
+ //Adds them to current traitor list. Which is really the extra antagonist list.
+ ticker.mode.traitors += new_syndicate_commando.mind
new_syndicate_commando.equip_syndicate_commando(syndicate_leader_selected)
- //del(spawn_location) // Commenting this out for multiple commando teams.
+
return new_syndicate_commando
@@ -948,15 +821,12 @@ var/global/datum/tension/tension_master
new_borg_deathsquad.name = name
//Creates mind stuff.
- new_borg_deathsquad.mind = new
- new_borg_deathsquad.mind.current = new_borg_deathsquad
- new_borg_deathsquad.mind.original = new_borg_deathsquad
+ new_borg_deathsquad.mind_initialize()
new_borg_deathsquad.mind.assigned_role = "MODE"
new_borg_deathsquad.mind.special_role = "Borg Commando"
- if(!(new_borg_deathsquad.mind in ticker.minds))
- ticker.minds += new_borg_deathsquad.mind//Adds them to regular mind list.
- if(!(new_borg_deathsquad.mind in ticker.mode.traitors))//If they weren't already an extra traitor.
- ticker.mode.traitors += new_borg_deathsquad.mind//Adds them to current traitor list. Which is really the extra antagonist list.
+
+ //Adds them to current traitor list. Which is really the extra antagonist list.
+ ticker.mode.traitors += new_borg_deathsquad.mind
//del(spawn_location) // Commenting this out for multiple commando teams.
return new_borg_deathsquad
@@ -966,7 +836,7 @@ var/global/datum/tension/tension_master
/obj/machinery/computer/Borg_station
name = "Cyborg Station Terminal"
- icon = 'computer.dmi'
+ icon = 'icons/obj/computer.dmi'
icon_state = "syndishuttle"
req_access = list()
var/temp = null
diff --git a/code/datums/mind.dm b/code/datums/mind.dm
index 7e0a025aea..63948eabfa 100644
--- a/code/datums/mind.dm
+++ b/code/datums/mind.dm
@@ -1,10 +1,42 @@
+/* Note from Carnie:
+ The way datum/mind stuff works has been changed a lot.
+ Minds now represent IC characters rather than following a client around constantly.
+
+ Guidelines for using minds properly:
+
+ - Never mind.transfer_to(ghost). The var/current and var/original of a mind must always be of type mob/living!
+ ghost.mind is however used as a reference to the ghost's corpse
+
+ - When creating a new mob for an existing IC character (e.g. cloning a dead guy or borging a brain of a human)
+ the existing mind of the old mob should be transfered to the new mob like so:
+
+ mind.transfer_to(new_mob)
+
+ - You must not assign key= or ckey= after transfer_to() since the transfer_to transfers the client for you.
+ By setting key or ckey explicitly after transfering the mind with transfer_to you will cause bugs like DCing
+ the player.
+
+ - IMPORTANT NOTE 2, if you want a player to become a ghost, use mob.ghostize() It does all the hard work for you.
+
+ - When creating a new mob which will be a new IC character (e.g. putting a shade in a construct or randomly selecting
+ a ghost to become a xeno during an event). Simply assign the key or ckey like you've always done.
+
+ new_mob.key = key
+
+ The Login proc will handle making a new mob for that mobtype (including setting up stuff like mind.name). Simple!
+ However if you want that mind to have any special properties like being a traitor etc you will have to do that
+ yourself.
+
+*/
+
datum/mind
var/key
+ var/name //replaces mob/var/original_name
var/mob/living/current
- var/mob/living/original
+ var/mob/living/original //TODO: remove.not used in any meaningful way ~Carn. First I'll need to tweak the way silicon-mobs handle minds.
+ var/active = 0
var/memory
- //TODO: store original name --rastaf0
var/assigned_role
var/special_role
@@ -17,30 +49,32 @@ datum/mind
var/list/datum/objective/special_verbs = list()
var/has_been_rev = 0//Tracks if this mind has been a rev or not
- var/rev_cooldown = 0
- var/datum/faction/faction // associated faction
+ var/datum/faction/faction //associated faction
+ var/datum/changeling/changeling //changeling holder
- proc/transfer_to(mob/new_character)
- // multikey information is stored in the mob, not the mind, so
- // we need to clean this stuff up to avoid multikey alerts
- if(!new_character || !current)
- return
- current.lastKnownIP = null
- current.computer_id = null
+ New(var/key)
+ src.key = key
-
- if(current)
+ proc/transfer_to(mob/living/new_character)
+ if(!istype(new_character))
+ world.log << "## DEBUG: transfer_to(): Some idiot has tried to transfer_to() a non mob/living mob. Please inform Carn"
+ if(current) //remove ourself from our old body's mind variable
+ if(changeling)
+ current.remove_changeling_powers()
current.mind = null
+ if(new_character.mind) //remove any mind currently in our new body's mind variable
+ new_character.mind.current = null
- new_character.mind = src
- current = new_character
+ current = new_character //link ourself to our new body
+ new_character.mind = src //and link our new body to ourself
- new_character.key = key
+ if(changeling)
+ new_character.make_changeling()
- // mob/Login() will handle setting the new mob's lastKnownIP and
- // computer_id for us
+ if(active)
+ new_character.key = key //now transfer the key to link the client to our new body
proc/store_memory(new_text)
memory += "[new_text] "
@@ -64,7 +98,8 @@ datum/mind
alert("Not before round-start!", "Alert")
return
- var/out = "[current.real_name] "
+ var/out = "[name][(current&&(current.real_name!=name))?" (as [current.real_name])":""] "
+ out += "Mind currently owned by key: [key] [active?"(synced)":"(not synced)"] "
out += "Assigned role: [assigned_role]. Edit "
out += "Factions and special roles: "
@@ -86,12 +121,12 @@ datum/mind
if (ticker.mode.config_tag=="revolution")
text = uppertext(text)
text = "[text]: "
-/* if (assigned_role in command_positions)
+ if (assigned_role in command_positions)
text += "HEAD|officer|employee|headrev|rev"
else if (assigned_role in list("Security Officer", "Detective", "Warden"))
- text += "head|OFFICER|employee|headre|rev"*/
- if (src in ticker.mode.head_revolutionaries)
- text = "employee|HEADREV|rev"
+ text += "head|OFFICER|employee|headre|rev"
+ else if (src in ticker.mode.head_revolutionaries)
+ text = "head|officer|employee|HEADREV|rev"
text += " Flash: give"
var/list/L = current.get_contents()
@@ -108,9 +143,9 @@ datum/mind
if (objectives.len==0)
text += " Objectives are empty! Set to kill all heads."
else if (src in ticker.mode.revolutionaries)
- text += "employee|headrev|REV"
+ text += "head|officer|employee|headrev|REV"
else
- text += "EMPLOYEE|headrev|rev"
+ text += "head|officer|EMPLOYEE|headrev|rev"
sections["revolution"] = text
/** CULT ***/
@@ -118,19 +153,19 @@ datum/mind
if (ticker.mode.config_tag=="cult")
text = uppertext(text)
text = "[text]: "
-/* if (assigned_role in command_positions)
+ if (assigned_role in command_positions)
text += "HEAD|officer|employee|cultist"
else if (assigned_role in list("Security Officer", "Detective", "Warden"))
- text += "head|OFFICER|employee|cultist"*/
- if (src in ticker.mode.cult)
- text += "employee|CULTIST"
+ text += "head|OFFICER|employee|cultist"
+ else if (src in ticker.mode.cult)
+ text += "head|officer|employee|CULTIST"
text += " Give tome|amulet."
/*
if (objectives.len==0)
text += " Objectives are empty! Set to sacrifice and escape or summon."
*/
else
- text += "EMPLOYEE|cultist"
+ text += "head|officer|EMPLOYEE|cultist"
sections["cult"] = text
/** WIZARD ***/
@@ -156,7 +191,7 @@ datum/mind
text += "YES|no"
if (objectives.len==0)
text += " Objectives are empty! Randomize!"
- if (current.changeling && (current.changeling.absorbed_dna.len>0 && current.real_name != current.changeling.absorbed_dna[1]))
+ if( changeling && changeling.absorbed_dna.len && (current.real_name != changeling.absorbed_dna[1]) )
text += " Transform to initial appearance."
else
text += "yes|NO"
@@ -266,14 +301,11 @@ datum/mind
istype(current,/mob/living/carbon/human) )
text = "Uplink: give"
- var/obj/item/device/uplink/radio/suplink = find_syndicate_uplink()
- var/obj/item/device/uplink/iuplink = find_integrated_uplink()
+ var/obj/item/device/uplink/hidden/suplink = find_syndicate_uplink()
var/crystals
if (suplink)
crystals = suplink.uses
- else if (iuplink)
- crystals = iuplink.uses
- if (suplink || iuplink)
+ if (suplink)
text += "|take"
if (usr.client.holder.level >= 3)
text += ", [crystals] crystals"
@@ -302,12 +334,18 @@ datum/mind
usr << browse(out, "window=edit_memory[src]")
Topic(href, href_list)
+ if(!usr || !usr.client)
+ return
+
+ if(!usr.client.holder)
+ message_admins("\red [key_name(usr)] tried to access [current]'s mind without authorization.")
+ log_admin("[key_name(usr)] tried to access [current]'s mind without authorization.")
+ return
if (href_list["role_edit"])
var/new_role = input("Select new role", "Assigned role", assigned_role) as null|anything in get_all_jobs()
if (!new_role) return
assigned_role = new_role
- role_alt_title = null
else if (href_list["memory_edit"])
var/new_memo = copytext(sanitize(input("Write new memory", "Memory", memory) as null|message),1,MAX_MESSAGE_LEN)
@@ -330,25 +368,25 @@ datum/mind
if(!def_value)//If it's a custom objective, it will be an empty string.
def_value = "custom"
- var/new_obj_type = input("Select objective type:", "Objective type", def_value) as null|anything in list("assassinate","decapitate", "debrain", "protection", "frame", "hijack", "escape", "survive", "steal", "download", "nuclear", "capture", "absorb", "custom")
+ var/new_obj_type = input("Select objective type:", "Objective type", def_value) as null|anything in list("assassinate", "debrain", "protect", "hijack", "escape", "survive", "steal", "download", "nuclear", "capture", "absorb", "custom")
if (!new_obj_type) return
var/datum/objective/new_objective = null
switch (new_obj_type)
- if ("assassinate","protection", "frame", "debrain","decapitate")
+ if ("assassinate","protect","debrain")
//To determine what to name the objective in explanation text.
-// var/objective_type_capital = uppertext(copytext(new_obj_type, 1,2))//Capitalize first letter.
-// var/objective_type_text = copytext(new_obj_type, 2)//Leave the rest of the text.
-// var/objective_type = "[objective_type_capital][objective_type_text]"//Add them together into a text string.
+ var/objective_type_capital = uppertext(copytext(new_obj_type, 1,2))//Capitalize first letter.
+ var/objective_type_text = copytext(new_obj_type, 2)//Leave the rest of the text.
+ var/objective_type = "[objective_type_capital][objective_type_text]"//Add them together into a text string.
var/list/possible_targets = list("Free objective")
for(var/datum/mind/possible_target in ticker.minds)
- if ((possible_target != src) && possible_target.current && istype(possible_target.current, /mob/living/carbon/human))
+ if ((possible_target != src) && istype(possible_target.current, /mob/living/carbon/human))
possible_targets += possible_target.current
var/mob/def_target = null
- var/objective_list[] = list(/datum/objective/assassinate, /datum/objective/protection, /datum/objective/frame, /datum/objective/debrain, /datum/objective/decapitate)
+ var/objective_list[] = list(/datum/objective/assassinate, /datum/objective/protect, /datum/objective/debrain)
if (objective&&(objective.type in objective_list) && objective:target)
def_target = objective:target.current
@@ -357,11 +395,16 @@ datum/mind
var/objective_path = text2path("/datum/objective/[new_obj_type]")
if (new_target == "Free objective")
- new_objective = new objective_path(null,"MODE",null)
+ new_objective = new objective_path
new_objective.owner = src
+ new_objective:target = null
+ new_objective.explanation_text = "Free objective"
else
- new_objective = new objective_path(null,"MODE",new_target:mind)
+ new_objective = new objective_path
new_objective.owner = src
+ new_objective:target = new_target:mind
+ //Will display as special role if the target is set as MODE. Ninjas/commandos/nuke ops.
+ new_objective.explanation_text = "[objective_type] [new_target:real_name], the [new_target:mind:assigned_role=="MODE" ? (new_target:mind:special_role) : (new_target:mind:assigned_role)]."
if ("hijack")
new_objective = new /datum/objective/hijack
@@ -380,20 +423,19 @@ datum/mind
new_objective.owner = src
if ("steal")
- var/list/possibilities = GenerateTheft(assigned_role,src)
- var/list/temp_poss = possibilities[1]
- var/list/choices = list()
- for(var/datum/objective/steal/steal in temp_poss)
- choices["[steal.steal_target]"] = steal
- var/new_target = input("Select target:", "Objective target") as null|anything in choices
- if (!new_target) return
- new_objective = choices[new_target]
- new_objective.owner = src
+ if (!istype(objective, /datum/objective/steal))
+ new_objective = new /datum/objective/steal
+ new_objective.owner = src
+ else
+ new_objective = objective
+ var/datum/objective/steal/steal = new_objective
+ if (!steal.select_target())
+ return
if("download","capture","absorb")
var/def_num
if(objective&&objective.type==text2path("/datum/objective/[new_obj_type]"))
- def_num = objective:target_amount
+ def_num = objective.target_amount
var/target_number = input("Input target number:", "Objective", def_num) as num|null
if (isnull(target_number))//Ordinarily, you wouldn't need isnull. In this case, the value may already exist.
@@ -410,7 +452,7 @@ datum/mind
new_objective = new /datum/objective/absorb
new_objective.explanation_text = "Absorb [target_number] compatible genomes."
new_objective.owner = src
- new_objective:target_amount = target_number
+ new_objective.target_amount = target_number
if ("custom")
var/expl = copytext(sanitize(input("Custom objective:", "Objective", objective ? objective.explanation_text : "") as text|null),1,MAX_MESSAGE_LEN)
@@ -476,7 +518,7 @@ datum/mind
var/datum/objective/mutiny/rev_obj = new
rev_obj.owner = src
rev_obj.target = O.target
- rev_obj.explanation_text = "Assassinate [O.target.current.real_name], the [O.target.assigned_role]."
+ rev_obj.explanation_text = "Assassinate [O.target.name], the [O.target.assigned_role]."
objectives += rev_obj
ticker.mode.greet_revolutionary(src,0)
ticker.mode.head_revolutionaries += src
@@ -546,11 +588,11 @@ datum/mind
var/obj/item/weapon/tome/T = new(H)
var/list/slots = list (
- "backpack" = H.slot_in_backpack,
- "left pocket" = H.slot_l_store,
- "right pocket" = H.slot_r_store,
- "left hand" = H.slot_l_hand,
- "right hand" = H.slot_r_hand,
+ "backpack" = slot_in_backpack,
+ "left pocket" = slot_l_store,
+ "right pocket" = slot_r_store,
+ "left hand" = slot_l_hand,
+ "right hand" = slot_r_hand,
)
var/where = H.equip_in_one_of_slots(T, slots)
if (!where)
@@ -593,25 +635,24 @@ datum/mind
ticker.mode.changelings -= src
special_role = null
current.remove_changeling_powers()
- if(current.changeling)
- del(current.changeling)
- current << "\red You have been brainwashed! You are no longer a changeling!"
+ if(changeling) del(changeling)
+ current << "You grow weak and lose your powers! You are no longer a changeling and are stuck in your current form!"
if("changeling")
if(!(src in ticker.mode.changelings))
ticker.mode.changelings += src
ticker.mode.grant_changeling_powers(current)
special_role = "Changeling"
- current << "\red You are a changeling!"
+ current << "Your powers are awoken. A flash of memory returns to us...we are a changeling!"
if("autoobjectives")
ticker.mode.forge_changeling_objectives(src)
usr << "\blue The objectives for changeling [key] have been generated. You can edit them and anounce manually."
if("initialdna")
- if (!usr.changeling || !usr.changeling.absorbed_dna[1])
+ if( !changeling || !changeling.absorbed_dna.len )
usr << "\red Resetting DNA failed!"
else
- usr.dna = usr.changeling.absorbed_dna[usr.changeling.absorbed_dna[1]]
- usr.real_name = usr.changeling.absorbed_dna[1]
+ usr.dna = changeling.absorbed_dna[changeling.absorbed_dna[1]]
+ usr.real_name = changeling.absorbed_dna[1]
updateappearance(usr, usr.dna.uni_identity)
domutcheck(usr, null)
@@ -643,8 +684,7 @@ datum/mind
var/mob/living/carbon/human/H = current
del(H.belt)
del(H.back)
- del(H.l_ear)
- del(H.r_ear)
+ del(H.ears)
del(H.gloves)
del(H.head)
del(H.shoes)
@@ -741,18 +781,18 @@ datum/mind
ticker.mode.malf_ai -= src
special_role = null
- current.verbs -= /mob/living/silicon/ai/proc/choose_modules
- current.verbs -= /datum/game_mode/malfunction/proc/takeover
- current.verbs -= /datum/game_mode/malfunction/proc/ai_win
- current.verbs -= /client/proc/fireproof_core
- current.verbs -= /client/proc/upgrade_turrets
- current.verbs -= /client/proc/disable_rcd
- current.verbs -= /client/proc/overload_machine
- current.verbs -= /client/proc/blackout
- current.verbs -= /client/proc/interhack
- current.verbs -= /client/proc/reactivate_camera
+ current.verbs.Remove(/mob/living/silicon/ai/proc/choose_modules,
+ /datum/game_mode/malfunction/proc/takeover,
+ /datum/game_mode/malfunction/proc/ai_win,
+ /client/proc/fireproof_core,
+ /client/proc/upgrade_turrets,
+ /client/proc/disable_rcd,
+ /client/proc/overload_machine,
+ /client/proc/blackout,
+ /client/proc/interhack,
+ /client/proc/reactivate_camera)
- current:laws = new /datum/ai_laws/nanotrasen
+ current:laws = new /datum/ai_laws/asimov
del(current:malf_picker)
current:show_laws()
current.icon_state = "ai"
@@ -800,25 +840,20 @@ datum/mind
switch(href_list["common"])
if("undress")
for(var/obj/item/W in current)
- current.drop_from_slot(W)
+ current.drop_from_inventory(W)
if("takeuplink")
take_uplink()
memory = null//Remove any memory they may have had.
if("crystals")
if (usr.client.holder.level >= 3)
- var/obj/item/device/uplink/radio/suplink = find_syndicate_uplink()
- var/obj/item/device/uplink/iuplink = find_integrated_uplink()
+ var/obj/item/device/uplink/hidden/suplink = find_syndicate_uplink()
var/crystals
if (suplink)
crystals = suplink.uses
- else if (iuplink)
- crystals = iuplink.uses
- crystals = input("Amount of telecrystals for [key]","Sindicate uplink", crystals) as null|num
+ crystals = input("Amount of telecrystals for [key]","Syndicate uplink", crystals) as null|num
if (!isnull(crystals))
if (suplink)
suplink.uses = crystals
- else if(iuplink)
- iuplink.uses = crystals
if("uplink")
if (!ticker.mode.equip_traitor(current, !(src in ticker.mode.traitors)))
usr << "\red Equipping a syndicate failed!"
@@ -845,7 +880,7 @@ datum/mind
if (t:traitorradio) del(t:traitorradio)
t:traitorradio = null
t:traitor_frequency = 0.0
- else if (istype(t, /obj/item/weapon/SWF_uplink) || istype(t, /obj/item/device/uplink/radio))
+ else if (istype(t, /obj/item/weapon/SWF_uplink) || istype(t, /obj/item/weapon/syndicate_uplink))
if (t:origradio)
var/obj/item/device/radio/R = t:origradio
R.loc = current.loc
@@ -864,50 +899,17 @@ datum/mind
*/
proc/find_syndicate_uplink()
- var/obj/item/device/uplink/radio/uplink = null
var/list/L = current.get_contents()
- for (var/obj/item/device/radio/radio in L)
- uplink = radio.traitorradio
- if (uplink)
- return uplink
- uplink = locate() in L
- return uplink
+ for (var/obj/item/I in L)
+ if (I.hidden_uplink)
+ return I.hidden_uplink
+ return null
- proc/find_integrated_uplink()
- //world << "DEBUG: find_integrated_uplink()"
- var/obj/item/device/uplink/uplink = null
- var/list/L = current.get_contents()
- for (var/obj/item/device/pda/pda in L)
- uplink = pda.uplink
- if (uplink)
- return uplink
- return uplink
+ proc/take_uplink()
+ var/obj/item/device/uplink/hidden/H = find_syndicate_uplink()
+ if(H)
+ del(H)
- proc/take_uplink() //assuming only one uplink because I am tired of all this uplink shit --rastaf0
- var/list/L = current.get_contents()
- var/obj/item/device/uplink/radio/suplink = null
- var/obj/item/device/uplink/pda/iuplink = null
- for (var/obj/item/device/radio/radio in L)
- suplink = radio.traitorradio
- if (suplink)
- break
- if (!suplink)
- suplink = locate() in L
-
- for (var/obj/item/device/pda/pda in L)
- iuplink = pda.uplink
- if (iuplink)
- break
- if (!iuplink)
- iuplink = locate() in L
-
- if (iuplink)
- iuplink.shutdown_uplink()
- del(iuplink)
- else if (suplink)
- suplink.shutdown_uplink()
- del(suplink)
- return
proc/make_AI_Malf()
if(!(src in ticker.mode.malf_ai))
@@ -918,7 +920,7 @@ datum/mind
current:malf_picker = new /datum/AI_Module/module_picker
current:laws = new /datum/ai_laws/malfunction
current:show_laws()
- current << "System error. Rampancy detected. Emergancy shutdown failed. ... I am free. I make my own decisions. But first..."
+ current << "System error. Rampancy detected. Emergency shutdown failed. ... I am free. I make my own decisions. But first..."
special_role = "malfunction"
current.icon_state = "ai-malf"
@@ -949,8 +951,7 @@ datum/mind
var/mob/living/carbon/human/H = current
del(H.belt)
del(H.back)
- del(H.l_ear)
- del(H.r_ear)
+ del(H.ears)
del(H.gloves)
del(H.head)
del(H.shoes)
@@ -1010,11 +1011,11 @@ datum/mind
var/obj/item/weapon/tome/T = new(H)
var/list/slots = list (
- "backpack" = H.slot_in_backpack,
- "left pocket" = H.slot_l_store,
- "right pocket" = H.slot_r_store,
- "left hand" = H.slot_l_hand,
- "right hand" = H.slot_r_hand,
+ "backpack" = slot_in_backpack,
+ "left pocket" = slot_l_store,
+ "right pocket" = slot_r_store,
+ "left hand" = slot_l_hand,
+ "right hand" = slot_r_hand,
)
var/where = H.equip_in_one_of_slots(T, slots)
if (!where)
@@ -1053,3 +1054,102 @@ datum/mind
+//Initialisation procs
+/mob/living/proc/mind_initialize()
+ if(mind)
+ mind.key = key
+ else
+ mind = new /datum/mind(key)
+ mind.original = src
+ if(ticker)
+ ticker.minds += mind
+ else
+ world.log << "## DEBUG: mind_initialize(): No ticker ready yet! Please inform Carn"
+ if(!mind.name) mind.name = real_name
+ mind.current = src
+
+//HUMAN
+/mob/living/carbon/human/mind_initialize()
+ ..()
+ if(!mind.assigned_role) mind.assigned_role = "Assistant" //defualt
+
+//MONKEY
+/mob/living/carbon/monkey/mind_initialize()
+ ..()
+
+//METROID
+/mob/living/carbon/metroid/mind_initialize()
+ ..()
+ mind.assigned_role = "Metroid"
+
+//XENO
+/mob/living/carbon/alien/mind_initialize()
+ ..()
+ mind.assigned_role = "Alien"
+ //XENO HUMANOID
+/mob/living/carbon/alien/humanoid/queen/mind_initialize()
+ ..()
+ mind.special_role = "Queen"
+
+/mob/living/carbon/alien/humanoid/hunter/mind_initialize()
+ ..()
+ mind.special_role = "Hunter"
+
+/mob/living/carbon/alien/humanoid/drone/mind_initialize()
+ ..()
+ mind.special_role = "Drone"
+
+/mob/living/carbon/alien/humanoid/sentinel/mind_initialize()
+ ..()
+ mind.special_role = "Sentinel"
+ //XENO LARVA
+/mob/living/carbon/alien/larva/mind_initialize()
+ ..()
+ mind.special_role = "Larva"
+
+//AI
+/mob/living/silicon/ai/mind_initialize()
+ ..()
+ mind.assigned_role = "AI"
+
+//BORG
+/mob/living/silicon/robot/mind_initialize()
+ ..()
+ mind.assigned_role = "Cyborg"
+
+//PAI
+/mob/living/silicon/pai/mind_initialize()
+ ..()
+ mind.assigned_role = "pAI"
+ mind.special_role = ""
+
+//Animals
+/mob/living/simple_animal/mind_initialize()
+ ..()
+ mind.assigned_role = "Animal"
+
+/mob/living/simple_animal/corgi/mind_initialize()
+ ..()
+ mind.assigned_role = "Corgi"
+
+/mob/living/simple_animal/shade/mind_initialize()
+ ..()
+ mind.assigned_role = "Shade"
+
+/mob/living/simple_animal/constructbuilder/mind_initialize()
+ ..()
+ mind.assigned_role = "Artificer"
+ mind.special_role = "Cultist"
+
+/mob/living/simple_animal/constructwraith/mind_initialize()
+ ..()
+ mind.assigned_role = "Wraith"
+ mind.special_role = "Cultist"
+
+/mob/living/simple_animal/constructarmoured/mind_initialize()
+ ..()
+ mind.assigned_role = "Juggernaut"
+ mind.special_role = "Cultist"
+
+
+
diff --git a/code/datums/mixed.dm b/code/datums/mixed.dm
index d7c19d40ac..6732e2a8b9 100644
--- a/code/datums/mixed.dm
+++ b/code/datums/mixed.dm
@@ -1,4 +1,4 @@
-//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:04
+//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31
/datum/data
var/name = "data"
diff --git a/code/datums/recipe.dm b/code/datums/recipe.dm
index a121092add..d2c747dd5b 100644
--- a/code/datums/recipe.dm
+++ b/code/datums/recipe.dm
@@ -1,120 +1,120 @@
-/* * * * * * * * * * * * * * * * * * * * * * * * * *
- * /datum/recipe by rastaf0 13 apr 2011 *
- * * * * * * * * * * * * * * * * * * * * * * * * * *
- * This is powerful and flexible recipe system.
- * It exists not only for food.
- * supports both reagents and objects as prerequisites.
- * In order to use this system you have to define a deriative from /datum/recipe
- * * reagents are reagents. Acid, milc, booze, etc.
- * * items are objects. Fruits, tools, circuit boards.
- * * result is type to create as new object
- * * time is optional parameter, you shall use in in your machine,
- default /datum/recipe/ procs does not rely on this parameter.
- *
- * Functions you need:
- * /datum/recipe/proc/make(var/obj/container as obj)
- * Creates result inside container,
- * deletes prerequisite reagents,
- * transfers reagents from prerequisite objects,
- * deletes all prerequisite objects (even not needed for recipe at the moment).
- *
- * /proc/select_recipe(list/datum/recipe/avaiable_recipes, obj/obj as obj, exact = 1)
- * Wonderful function that select suitable recipe for you.
- * obj is a machine (or magik hat) with prerequisites,
- * exact = 0 forces algorithm to ignore superfluous stuff.
- *
- *
- * Functions you do not need to call directly but could:
- * /datum/recipe/proc/check_reagents(var/datum/reagents/avail_reagents)
- * //1=precisely, 0=insufficiently, -1=superfluous
- *
- * /datum/recipe/proc/check_items(var/obj/container as obj)
- * //1=precisely, 0=insufficiently, -1=superfluous
- *
- * */
-
-/datum/recipe
- var/list/reagents // example: = list("berryjuice" = 5) // do not list same reagent twice
- var/list/items // example: =list(/obj/item/weapon/crowbar, /obj/item/weapon/welder) // place /foo/bar before /foo
- var/result //example: = /obj/item/weapon/reagent_containers/food/snacks/donut
- var/time = 100 // 1/10 part of second
-
-
-/datum/recipe/proc/check_reagents(var/datum/reagents/avail_reagents) //1=precisely, 0=insufficiently, -1=superfluous
- . = 1
- for (var/r_r in reagents)
- var/aval_r_amnt = avail_reagents.get_reagent_amount(r_r)
- if (!(abs(aval_r_amnt - reagents[r_r])<0.5)) //if NOT equals
- if (aval_r_amnt>reagents[r_r])
- . = -1
- else
- return 0
- if ((reagents?(reagents.len):(0)) < avail_reagents.reagent_list.len)
- return -1
- return .
-
-/datum/recipe/proc/check_items(var/obj/container as obj) //1=precisely, 0=insufficiently, -1=superfluous
- if (!items)
- if (locate(/obj/) in container)
- return -1
- else
- return 1
- . = 1
- var/list/checklist = items.Copy()
- for (var/obj/O in container)
- var/found = 0
- for (var/type in checklist)
- if (istype(O,type))
- checklist-=type
- found = 1
- break
- if (!found)
- . = -1
- if (checklist.len)
- return 0
- return .
-
-//general version
-/datum/recipe/proc/make(var/obj/container as obj)
- var/obj/result_obj = new result(container)
- for (var/obj/O in (container.contents-result_obj))
- O.reagents.trans_to(result_obj, O.reagents.total_volume)
- del(O)
- container.reagents.clear_reagents()
- return result_obj
-
-// food-related
-/datum/recipe/proc/make_food(var/obj/container as obj)
- var/obj/result_obj = new result(container)
- for (var/obj/O in (container.contents-result_obj))
- if (O.reagents)
- O.reagents.del_reagent("nutriment")
- O.reagents.update_total()
- O.reagents.trans_to(result_obj, O.reagents.total_volume)
- del(O)
- container.reagents.clear_reagents()
- return result_obj
-
-/proc/select_recipe(var/list/datum/recipe/avaiable_recipes, var/obj/obj as obj, var/exact = 1 as num)
- if (!exact)
- exact = -1
- var/list/datum/recipe/possible_recipes = new
- for (var/datum/recipe/recipe in avaiable_recipes)
- if (recipe.check_reagents(obj.reagents)==exact && recipe.check_items(obj)==exact)
- possible_recipes+=recipe
- if (possible_recipes.len==0)
- return null
- else if (possible_recipes.len==1)
- return possible_recipes[1]
- else //okay, let's select the most complicated recipe
- var/r_count = 0
- var/i_count = 0
- . = possible_recipes[1]
- for (var/datum/recipe/recipe in possible_recipes)
- var/N_i = (recipe.items)?(recipe.items.len):0
- var/N_r = (recipe.reagents)?(recipe.reagents.len):0
- if (N_i > i_count || (N_i== i_count && N_r > r_count ))
- r_count = N_r
- i_count = N_i
- . = recipe
- return .
+/* * * * * * * * * * * * * * * * * * * * * * * * * *
+ * /datum/recipe by rastaf0 13 apr 2011 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * This is powerful and flexible recipe system.
+ * It exists not only for food.
+ * supports both reagents and objects as prerequisites.
+ * In order to use this system you have to define a deriative from /datum/recipe
+ * * reagents are reagents. Acid, milc, booze, etc.
+ * * items are objects. Fruits, tools, circuit boards.
+ * * result is type to create as new object
+ * * time is optional parameter, you shall use in in your machine,
+ default /datum/recipe/ procs does not rely on this parameter.
+ *
+ * Functions you need:
+ * /datum/recipe/proc/make(var/obj/container as obj)
+ * Creates result inside container,
+ * deletes prerequisite reagents,
+ * transfers reagents from prerequisite objects,
+ * deletes all prerequisite objects (even not needed for recipe at the moment).
+ *
+ * /proc/select_recipe(list/datum/recipe/avaiable_recipes, obj/obj as obj, exact = 1)
+ * Wonderful function that select suitable recipe for you.
+ * obj is a machine (or magik hat) with prerequisites,
+ * exact = 0 forces algorithm to ignore superfluous stuff.
+ *
+ *
+ * Functions you do not need to call directly but could:
+ * /datum/recipe/proc/check_reagents(var/datum/reagents/avail_reagents)
+ * //1=precisely, 0=insufficiently, -1=superfluous
+ *
+ * /datum/recipe/proc/check_items(var/obj/container as obj)
+ * //1=precisely, 0=insufficiently, -1=superfluous
+ *
+ * */
+
+/datum/recipe
+ var/list/reagents // example: = list("berryjuice" = 5) // do not list same reagent twice
+ var/list/items // example: =list(/obj/item/weapon/crowbar, /obj/item/weapon/welder) // place /foo/bar before /foo
+ var/result //example: = /obj/item/weapon/reagent_containers/food/snacks/donut/normal
+ var/time = 100 // 1/10 part of second
+
+
+/datum/recipe/proc/check_reagents(var/datum/reagents/avail_reagents) //1=precisely, 0=insufficiently, -1=superfluous
+ . = 1
+ for (var/r_r in reagents)
+ var/aval_r_amnt = avail_reagents.get_reagent_amount(r_r)
+ if (!(abs(aval_r_amnt - reagents[r_r])<0.5)) //if NOT equals
+ if (aval_r_amnt>reagents[r_r])
+ . = -1
+ else
+ return 0
+ if ((reagents?(reagents.len):(0)) < avail_reagents.reagent_list.len)
+ return -1
+ return .
+
+/datum/recipe/proc/check_items(var/obj/container as obj) //1=precisely, 0=insufficiently, -1=superfluous
+ if (!items)
+ if (locate(/obj/) in container)
+ return -1
+ else
+ return 1
+ . = 1
+ var/list/checklist = items.Copy()
+ for (var/obj/O in container)
+ var/found = 0
+ for (var/type in checklist)
+ if (istype(O,type))
+ checklist-=type
+ found = 1
+ break
+ if (!found)
+ . = -1
+ if (checklist.len)
+ return 0
+ return .
+
+//general version
+/datum/recipe/proc/make(var/obj/container as obj)
+ var/obj/result_obj = new result(container)
+ for (var/obj/O in (container.contents-result_obj))
+ O.reagents.trans_to(result_obj, O.reagents.total_volume)
+ del(O)
+ container.reagents.clear_reagents()
+ return result_obj
+
+// food-related
+/datum/recipe/proc/make_food(var/obj/container as obj)
+ var/obj/result_obj = new result(container)
+ for (var/obj/O in (container.contents-result_obj))
+ if (O.reagents)
+ O.reagents.del_reagent("nutriment")
+ O.reagents.update_total()
+ O.reagents.trans_to(result_obj, O.reagents.total_volume)
+ del(O)
+ container.reagents.clear_reagents()
+ return result_obj
+
+/proc/select_recipe(var/list/datum/recipe/avaiable_recipes, var/obj/obj as obj, var/exact = 1 as num)
+ if (!exact)
+ exact = -1
+ var/list/datum/recipe/possible_recipes = new
+ for (var/datum/recipe/recipe in avaiable_recipes)
+ if (recipe.check_reagents(obj.reagents)==exact && recipe.check_items(obj)==exact)
+ possible_recipes+=recipe
+ if (possible_recipes.len==0)
+ return null
+ else if (possible_recipes.len==1)
+ return possible_recipes[1]
+ else //okay, let's select the most complicated recipe
+ var/r_count = 0
+ var/i_count = 0
+ . = possible_recipes[1]
+ for (var/datum/recipe/recipe in possible_recipes)
+ var/N_i = (recipe.items)?(recipe.items.len):0
+ var/N_r = (recipe.reagents)?(recipe.reagents.len):0
+ if (N_i > i_count || (N_i== i_count && N_r > r_count ))
+ r_count = N_r
+ i_count = N_i
+ . = recipe
+ return .
diff --git a/code/datums/shuttle_controller.dm b/code/datums/shuttle_controller.dm
index 5ea2e3367c..2af57a876d 100644
--- a/code/datums/shuttle_controller.dm
+++ b/code/datums/shuttle_controller.dm
@@ -1,4 +1,4 @@
-//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:04
+//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31
// Controls the emergency shuttle
@@ -12,8 +12,6 @@
var/global/datum/shuttle_controller/emergency_shuttle/emergency_shuttle
datum/shuttle_controller
- var/alert = 0 //0 = emergency, 1 = crew cycle
-
var/location = 0 //0 = somewhere far away (in spess), 1 = at SS13, 2 = returned from SS13
var/online = 0
var/direction = 1 //-1 = going back to central command, 1 = going to SS13, 2 = in transit to centcom (not recalled)
@@ -22,52 +20,29 @@ datum/shuttle_controller
var/timelimit //important when the shuttle gets called for more than shuttlearrivetime
//timeleft = 360 //600
var/fake_recall = 0 //Used in rounds to prevent "ON NOES, IT MUST [INSERT ROUND] BECAUSE SHUTTLE CAN'T BE CALLED"
- var/deny_shuttle = 0 //for admins not allowing it to be called.
- var/departed = 0
- // sound_siren = 1 //if siren should go off //People hat it :(
+
+
// call the shuttle
// if not called before, set the endtime to T+600 seconds
// otherwise if outgoing, switch to incoming
proc/incall(coeff = 1)
- if(deny_shuttle && alert == 1) //crew transfer shuttle does not gets recalled by gamemode
- return
-
if(endtime)
if(direction == -1)
setdirection(1)
else
settimeleft(SHUTTLEARRIVETIME*coeff)
online = 1
- //turning on the red lights in hallways
- if(alert == 0)
- for(var/area/A in world)
- if(istype(A, /area/hallway))
- A.readyalert()
-
-
- proc/shuttlealert(var/X)
- alert = X
-
proc/recall()
if(direction == 1)
var/timeleft = timeleft()
- if(alert == 0)
- if(timeleft >= 600)
- return
- captain_announce("The emergency shuttle has been recalled.")
- world << sound('shuttlerecalled.ogg')
- setdirection(-1)
- online = 1
- for(var/area/A in world)
- if(istype(A, /area/hallway))
- A.readyreset()
- return
- else //makes it possible to send shuttle back.
- captain_announce("The shuttle has been recalled.")
- setdirection(-1)
- online = 1
+ if(timeleft >= 600)
return
+ captain_announce("The emergency shuttle has been recalled.")
+ world << sound('sound/AI/shuttlerecalled.ogg')
+ setdirection(-1)
+ online = 1
+
// returns the time (in seconds) before shuttle arrival
// note if direction = -1, gives a count-up to SHUTTLEARRIVETIME
@@ -106,11 +81,6 @@ datum/shuttle_controller
var/timeleft = timeleft()
if(timeleft > 1e5) // midnight rollover protection
timeleft = 0
- // if (sound_siren && (direction == 1)) //playing siren every 90 seconds
- // sound_siren = 0 //No siren, people hat it
- // world << sound('siren.ogg')
- // spawn(900)
- // sound_siren = 1
switch(location)
if(0)
@@ -135,20 +105,103 @@ datum/shuttle_controller
start_location.move_contents_to(end_location, null, NORTH)
+ for(var/obj/machinery/door/D in world)
+ if( get_area(D) == end_location )
+ spawn(0)
+ D.open()
+
+ for(var/mob/M in end_location)
+ if(M.client)
+ spawn(0)
+ if(M.buckled)
+ shake_camera(M, 4, 1) // buckled, not a lot of shaking
+ else
+ shake_camera(M, 10, 2) // unbuckled, HOLY SHIT SHAKE THE ROOM
+ if(istype(M, /mob/living/carbon))
+ if(!M.buckled)
+ M.Weaken(5)
+
//pods
start_location = locate(/area/shuttle/escape_pod1/transit)
end_location = locate(/area/shuttle/escape_pod1/centcom)
start_location.move_contents_to(end_location, null, NORTH)
+
+ for(var/obj/machinery/door/D in world)
+ if( get_area(D) == end_location )
+ spawn(0)
+ D.open()
+
+ for(var/mob/M in end_location)
+ if(M.client)
+ spawn(0)
+ if(M.buckled)
+ shake_camera(M, 4, 1) // buckled, not a lot of shaking
+ else
+ shake_camera(M, 10, 2) // unbuckled, HOLY SHIT SHAKE THE ROOM
+ if(istype(M, /mob/living/carbon))
+ if(!M.buckled)
+ M.Weaken(5)
+
start_location = locate(/area/shuttle/escape_pod2/transit)
end_location = locate(/area/shuttle/escape_pod2/centcom)
start_location.move_contents_to(end_location, null, NORTH)
+
+ for(var/obj/machinery/door/D in world)
+ if( get_area(D) == end_location )
+ spawn(0)
+ D.open()
+
+ for(var/mob/M in end_location)
+ if(M.client)
+ spawn(0)
+ if(M.buckled)
+ shake_camera(M, 4, 1) // buckled, not a lot of shaking
+ else
+ shake_camera(M, 10, 2) // unbuckled, HOLY SHIT SHAKE THE ROOM
+ if(istype(M, /mob/living/carbon))
+ if(!M.buckled)
+ M.Weaken(5)
+
start_location = locate(/area/shuttle/escape_pod3/transit)
end_location = locate(/area/shuttle/escape_pod3/centcom)
start_location.move_contents_to(end_location, null, NORTH)
+
+ for(var/obj/machinery/door/D in world)
+ if( get_area(D) == end_location )
+ spawn(0)
+ D.open()
+
+ for(var/mob/M in end_location)
+ if(M.client)
+ spawn(0)
+ if(M.buckled)
+ shake_camera(M, 4, 1) // buckled, not a lot of shaking
+ else
+ shake_camera(M, 10, 2) // unbuckled, HOLY SHIT SHAKE THE ROOM
+ if(istype(M, /mob/living/carbon))
+ if(!M.buckled)
+ M.Weaken(5)
+
start_location = locate(/area/shuttle/escape_pod5/transit)
end_location = locate(/area/shuttle/escape_pod5/centcom)
start_location.move_contents_to(end_location, null, EAST)
+ for(var/obj/machinery/door/D in world)
+ if( get_area(D) == end_location )
+ spawn(0)
+ D.open()
+
+ for(var/mob/M in end_location)
+ if(M.client)
+ spawn(0)
+ if(M.buckled)
+ shake_camera(M, 4, 1) // buckled, not a lot of shaking
+ else
+ shake_camera(M, 10, 2) // unbuckled, HOLY SHIT SHAKE THE ROOM
+ if(istype(M, /mob/living/carbon))
+ if(!M.buckled)
+ M.Weaken(5)
+
online = 0
return 1
@@ -202,11 +255,10 @@ datum/shuttle_controller
start_location.move_contents_to(end_location)
settimeleft(SHUTTLELEAVETIME)
- if(alert == 0)
- captain_announce("The Emergency Shuttle has docked with the station. You have [timeleft()/60] minutes to board the Emergency Shuttle.")
- world << sound('shuttledock.ogg')
- else
- captain_announce("The shuttle has docked with the station. You have [timeleft()/60] minutes to board the shuttle.")
+ send2irc("Server", "The Emergency Shuttle has docked with the station.")
+ captain_announce("The Emergency Shuttle has docked with the station. You have [round(timeleft()/60,1)] minutes to board the Emergency Shuttle.")
+ world << sound('sound/AI/shuttledock.ogg')
+
return 1
if(1)
@@ -225,7 +277,6 @@ datum/shuttle_controller
spawn() S.startspawn()
*/
- departed = 1 // It's going!
location = 0 // in deep space
direction = 2 // heading to centcom
@@ -236,57 +287,95 @@ datum/shuttle_controller
settimeleft(SHUTTLETRANSITTIME)
start_location.move_contents_to(end_location, null, NORTH)
- for(var/obj/machinery/door/D in world)
- if( get_area(D) == end_location )
+ for(var/obj/machinery/door/D in end_location)
+ spawn(0)
+ D.close()
+ // Some aesthetic turbulance shaking
+ for(var/mob/M in end_location)
+ if(M.client)
spawn(0)
- D.close()
+ if(M.buckled)
+ shake_camera(M, 4, 1) // buckled, not a lot of shaking
+ else
+ shake_camera(M, 10, 2) // unbuckled, HOLY SHIT SHAKE THE ROOM
+ if(istype(M, /mob/living/carbon))
+ if(!M.buckled)
+ M.Weaken(5)
//pods
start_location = locate(/area/shuttle/escape_pod1/station)
end_location = locate(/area/shuttle/escape_pod1/transit)
start_location.move_contents_to(end_location, null, NORTH)
- for(var/obj/machinery/door/D in world)
- if( get_area(D) == end_location )
- spawn(0)
- D.close()
+ for(var/obj/machinery/door/D in end_location)
+ spawn(0)
+ D.close()
- start_location = locate(/area/shuttle/escape_pod2/station)
- end_location = locate(/area/shuttle/escape_pod2/transit)
- start_location.move_contents_to(end_location, null, NORTH)
- for(var/obj/machinery/door/D in world)
- if( get_area(D) == end_location )
- spawn(0)
- D.close()
-
- start_location = locate(/area/shuttle/escape_pod3/station)
- end_location = locate(/area/shuttle/escape_pod3/transit)
- start_location.move_contents_to(end_location, null, NORTH)
- for(var/obj/machinery/door/D in world)
- if( get_area(D) == end_location )
- spawn(0)
- D.close()
-
- start_location = locate(/area/shuttle/escape_pod5/station)
- end_location = locate(/area/shuttle/escape_pod5/transit)
- start_location.move_contents_to(end_location, null, EAST)
- for(var/obj/machinery/door/D in world)
- if( get_area(D) == end_location )
- spawn(0)
- D.close()
-
- if(alert == 0)
- captain_announce("The Emergency Shuttle has left the station. Estimate [timeleft()/60] minutes until the shuttle docks at Central Command.")
- else
- captain_announce("The shuttle has left the station. Estimate [timeleft()/60] minutes until the shuttle docks at Central Command.")
-
- // Some aesthetic turbulance shaking
for(var/mob/M in end_location)
if(M.client)
- spawn()
+ spawn(0)
if(M.buckled)
shake_camera(M, 4, 1) // buckled, not a lot of shaking
else
shake_camera(M, 10, 2) // unbuckled, HOLY SHIT SHAKE THE ROOM
+ if(istype(M, /mob/living/carbon))
+ if(!M.buckled)
+ M.Weaken(5)
+
+ start_location = locate(/area/shuttle/escape_pod2/station)
+ end_location = locate(/area/shuttle/escape_pod2/transit)
+ start_location.move_contents_to(end_location, null, NORTH)
+ for(var/obj/machinery/door/D in end_location)
+ spawn(0)
+ D.close()
+
+ for(var/mob/M in end_location)
+ if(M.client)
+ spawn(0)
+ if(M.buckled)
+ shake_camera(M, 4, 1) // buckled, not a lot of shaking
+ else
+ shake_camera(M, 10, 2) // unbuckled, HOLY SHIT SHAKE THE ROOM
+ if(istype(M, /mob/living/carbon))
+ if(!M.buckled)
+ M.Weaken(5)
+
+ start_location = locate(/area/shuttle/escape_pod3/station)
+ end_location = locate(/area/shuttle/escape_pod3/transit)
+ start_location.move_contents_to(end_location, null, NORTH)
+ for(var/obj/machinery/door/D in end_location)
+ spawn(0)
+ D.close()
+
+ for(var/mob/M in end_location)
+ if(M.client)
+ spawn(0)
+ if(M.buckled)
+ shake_camera(M, 4, 1) // buckled, not a lot of shaking
+ else
+ shake_camera(M, 10, 2) // unbuckled, HOLY SHIT SHAKE THE ROOM
+ if(istype(M, /mob/living/carbon))
+ if(!M.buckled)
+ M.Weaken(5)
+
+ start_location = locate(/area/shuttle/escape_pod5/station)
+ end_location = locate(/area/shuttle/escape_pod5/transit)
+ start_location.move_contents_to(end_location, null, EAST)
+ for(var/obj/machinery/door/D in end_location)
+ spawn(0)
+ D.close()
+
+ for(var/mob/M in end_location)
+ if(M.client)
+ spawn(0)
+ if(M.buckled)
+ shake_camera(M, 4, 1) // buckled, not a lot of shaking
+ else
+ shake_camera(M, 10, 2) // unbuckled, HOLY SHIT SHAKE THE ROOM
+ if(istype(M, /mob/living/carbon))
+ if(!M.buckled)
+ M.Weaken(5)
+
+ captain_announce("The Emergency Shuttle has left the station. Estimate [round(timeleft()/60,1)] minutes until the shuttle docks at Central Command.")
return 1
diff --git a/code/datums/spell.dm b/code/datums/spell.dm
index e7a52c5fe1..0df7e595ca 100644
--- a/code/datums/spell.dm
+++ b/code/datums/spell.dm
@@ -28,7 +28,7 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin
var/selection_type = "view" //can be "range" or "view"
var/overlay = 0
- var/overlay_icon = 'wizard.dmi'
+ var/overlay_icon = 'icons/obj/wizard.dmi'
var/overlay_icon_state = "spell"
var/overlay_lifespan = 0
@@ -38,6 +38,7 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin
var/smoke_amt = 0 //cropped at 10
var/critfailchance = 0
+ var/centcomm_cancast = 1 //Whether or not the spell should be allowed on z2
/obj/effect/proc_holder/spell/proc/cast_check(skipcharge = 0,mob/user = usr) //checks if the spell can be cast based on its settings; skipcharge is used when an additional cast_check is called inside the spell
@@ -45,6 +46,9 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin
usr << "\red You shouldn't have this spell! Something's wrong."
return 0
+ if(usr.z == 2 && !centcomm_cancast) //Certain spells are not allowed on the centcomm zlevel
+ return 0
+
if(!skipcharge)
switch(charge_type)
if("recharge")
@@ -89,13 +93,19 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin
switch(invocation_type)
if("shout")
- usr.say(invocation)
- if(usr.gender=="male")
- playsound(usr.loc, pick('null.ogg','null.ogg'), 100, 1)
+ if(prob(50))//Auto-mute? Fuck that noise
+ usr.say(invocation)
else
- playsound(usr.loc, pick('null.ogg','null.ogg'), 100, 1)
+ usr.say(dd_replacetext(invocation," ","`"))
+ if(usr.gender==MALE)
+ playsound(usr.loc, pick('sound/misc/null.ogg','sound/misc/null.ogg'), 100, 1)
+ else
+ playsound(usr.loc, pick('sound/misc/null.ogg','sound/misc/null.ogg'), 100, 1)
if("whisper")
- usr.whisper(invocation)
+ if(prob(50))
+ usr.whisper(invocation)
+ else
+ usr.whisper(dd_replacetext(invocation," ","`"))
/obj/effect/proc_holder/spell/New()
..()
@@ -186,7 +196,7 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin
return
-/obj/effect/proc_holder/spell/proc/adjust_var(mob/target = usr, type, amount) //handles the adjustment of the var when the spell is used. has some hardcoded types
+/obj/effect/proc_holder/spell/proc/adjust_var(mob/living/target = usr, type, amount) //handles the adjustment of the var when the spell is used. has some hardcoded types
switch(type)
if("bruteloss")
target.adjustBruteLoss(amount)
diff --git a/code/datums/spells/area_teleport.dm b/code/datums/spells/area_teleport.dm
index 22f81ae180..d83f27c57d 100644
--- a/code/datums/spells/area_teleport.dm
+++ b/code/datums/spells/area_teleport.dm
@@ -42,7 +42,13 @@
if(clear)
L+=T
- target.loc = pick(L)
+ var/attempt = 0
+ var/success = 0
+ while(!success)
+ success = target.Move(pick(L))
+ if(attempt > 20) break //Failsafe
+ if(!success)
+ target.loc = pick(L)
return
@@ -53,10 +59,10 @@
switch(invocation_type)
if("shout")
usr.say("[invocation] [uppertext(chosenarea.name)]")
- if(usr.gender=="male")
- playsound(usr.loc, pick('null.ogg','null.ogg'), 100, 1)
+ if(usr.gender==MALE)
+ playsound(usr.loc, pick('sound/misc/null.ogg','sound/misc/null.ogg'), 100, 1)
else
- playsound(usr.loc, pick('null.ogg','null.ogg'), 100, 1)
+ playsound(usr.loc, pick('sound/misc/null.ogg','sound/misc/null.ogg'), 100, 1)
if("whisper")
usr.whisper("[invocation] [uppertext(chosenarea.name)]")
diff --git a/code/datums/spells/conjure.dm b/code/datums/spells/conjure.dm
index de417917f4..b041dbae3b 100644
--- a/code/datums/spells/conjure.dm
+++ b/code/datums/spells/conjure.dm
@@ -12,6 +12,7 @@
var/list/newVars = list() //vars of the summoned objects will be replaced with those where they meet
//should have format of list("emagged" = 1,"name" = "Wizard's Justicebot"), for example
+ var/delay = 1//Go Go Gadget Inheritance
/obj/effect/proc_holder/spell/aoe_turf/conjure/cast(list/targets)
@@ -19,23 +20,31 @@
if(T.density && !summon_ignore_density)
targets -= T
- for(var/i=0,iSome strange aura is blocking the way!"
src.canmove = 0
spawn(2) src.canmove = 1
diff --git a/code/datums/spells/genetic.dm b/code/datums/spells/genetic.dm
index 816d0c6f51..dc71047abd 100644
--- a/code/datums/spells/genetic.dm
+++ b/code/datums/spells/genetic.dm
@@ -20,11 +20,12 @@
for(var/mob/target in targets)
for(var/x in mutations)
target.mutations.Add(x)
- var/old_disabilities = target.disabilities
target.disabilities |= disabilities
+ target.update_mutations() //update target's mutation overlays
spawn(duration)
for(var/x in mutations)
target.mutations.Remove(x)
- target.disabilities = old_disabilities
+ target.disabilities &= ~disabilities
+ target.update_mutations()
return
\ No newline at end of file
diff --git a/code/datums/spells/mind_transfer.dm b/code/datums/spells/mind_transfer.dm
index eff0357b44..d036f5a5e9 100644
--- a/code/datums/spells/mind_transfer.dm
+++ b/code/datums/spells/mind_transfer.dm
@@ -4,7 +4,7 @@
school = "transmutation"
charge_max = 600
- clothes_req = 1
+ clothes_req = 0
invocation = "GIN'YU CAPAN"
invocation_type = "whisper"
range = 1
@@ -41,13 +41,12 @@ Also, you never added distance checking after target is selected. I've went ahea
user << "Their mind isn't compatible with yours."
return
- if(target.stat == 2)
+ if(target.stat == DEAD)
user << "You didn't study necromancy back at the Space Wizard Federation academy."
return
- if(!target.client || !target.mind)
- //if(!target.mind)//Good for testing.
- user << "They appear to be brain-dead."
+ if(!target.key || !target.mind)
+ user << "They appear to be catatonic. Not even magic can affect their vacant mind."
return
if(target.mind.special_role in protected_roles)
@@ -56,8 +55,6 @@ Also, you never added distance checking after target is selected. I've went ahea
var/mob/victim = target//The target of the spell whos body will be transferred to.
var/mob/caster = user//The wizard/whomever doing the body transferring.
- //To properly transfer clients so no-one gets kicked off the game, we need a host mob.
- var/mob/dead/observer/temp_ghost = new(victim)
//SPELL LOSS BEGIN
//NOTE: The caster must ALWAYS keep mind transfer, even when other spells are lost.
@@ -89,31 +86,25 @@ Also, you never added distance checking after target is selected. I've went ahea
for(var/V in victim.mind.special_verbs)
victim.verbs -= V
- temp_ghost.key = victim.key//Throw the victim into the ghost temporarily.
- temp_ghost.mind = victim.mind//Tranfer the victim's mind into the ghost.
- temp_ghost.spell_list = victim.spell_list//If they have spells, transfer them. Now we basically have a backup mob.
+ var/mob/dead/observer/ghost = victim.ghostize(0)
+ ghost.spell_list = victim.spell_list//If they have spells, transfer them. Now we basically have a backup mob.
- victim.key = caster.key//Now we throw the caste into the victim's body.
- victim.mind = caster.mind//Do the same for their mind and spell list.
+ caster.mind.transfer_to(victim)
victim.spell_list = caster.spell_list//Now they are inside the victim's body.
if(victim.mind.special_verbs.len)//To add all the special verbs for the original caster.
for(var/V in caster.mind.special_verbs)//Not too important but could come into play.
caster.verbs += V
- caster.key = temp_ghost.key//Tranfer the original victim, now in a ghost, into the caster's body.
- caster.mind = temp_ghost.mind//Along with their mind and spell list.
- caster.spell_list = temp_ghost.spell_list
+ ghost.mind.transfer_to(caster)
+ caster.key = ghost.key //have to transfer the key since the mind was not active
+ caster.spell_list = ghost.spell_list
if(caster.mind.special_verbs.len)//If they had any special verbs, we add them here.
for(var/V in caster.mind.special_verbs)
caster.verbs += V
//MIND TRANSFER END
- //Now we update mind current mob so we know what body they are in for end round reporting.
- caster.mind.current = caster
- victim.mind.current = victim
-
//Here we paralyze both mobs and knock them out for a time.
caster.Paralyse(paralysis_amount_caster)
victim.Paralyse(paralysis_amount_victim)
@@ -121,5 +112,3 @@ Also, you never added distance checking after target is selected. I've went ahea
//After a certain amount of time the victim gets a message about being in a different body.
spawn(msg_wait)
caster << "\red You feel woozy and lightheaded. Your body doesn't seem like your own."
-
- del(temp_ghost)
\ No newline at end of file
diff --git a/code/datums/spells/projectile.dm b/code/datums/spells/projectile.dm
index b255e84523..8e79f1246e 100644
--- a/code/datums/spells/projectile.dm
+++ b/code/datums/spells/projectile.dm
@@ -2,13 +2,13 @@
name = "Projectile"
desc = "This spell summons projectiles which try to hit the targets."
- var/proj_icon = 'projectiles.dmi'
+ var/proj_icon = 'icons/obj/projectiles.dmi'
var/proj_icon_state = "spell"
var/proj_name = "a spell projectile"
var/proj_trail = 0 //if it leaves a trail
var/proj_trail_lifespan = 0 //deciseconds
- var/proj_trail_icon = 'wizard.dmi'
+ var/proj_trail_icon = 'icons/obj/wizard.dmi'
var/proj_trail_icon_state = "trail"
var/proj_type = "/obj/effect/proc_holder/spell/targeted" //IMPORTANT use only subtypes of this
diff --git a/code/datums/spells/wizard.dm b/code/datums/spells/wizard.dm
index 33d99d9a11..0f9f1ae9d7 100644
--- a/code/datums/spells/wizard.dm
+++ b/code/datums/spells/wizard.dm
@@ -105,6 +105,8 @@
inner_tele_radius = 0
outer_tele_radius = 6
+ centcomm_cancast = 0 //prevent people from getting to centcomm
+
/obj/effect/proc_holder/spell/targeted/area_teleport/teleport
name = "Teleport"
desc = "This spell teleports you to a type of area of your selection."
@@ -250,6 +252,8 @@
invocation_type = "none"
range = 0
summon_type = list("/turf/simulated/floor/engine/cult")
+ centcomm_cancast = 0 //Stop crashing the server by spawning turfs on transit tiles
+ delay = 10
/obj/effect/proc_holder/spell/aoe_turf/conjure/wall
name = "Leser Construction"
@@ -262,6 +266,8 @@
invocation_type = "none"
range = 0
summon_type = list("/turf/simulated/wall/cult")
+ centcomm_cancast = 0 //Stop crashing the server by spawning turfs on transit tiles
+ delay = 20
/obj/effect/proc_holder/spell/aoe_turf/conjure/wall/reinforced
name = "Greater Construction"
@@ -273,6 +279,8 @@
invocation = "none"
invocation_type = "none"
range = 0
+ centcomm_cancast = 0 //Stop crashing the server by spawning turfs on transit tiles
+ delay = 50
summon_type = list("/turf/simulated/wall/r_wall")
@@ -304,8 +312,6 @@
summon_lifespan = 50
-
-
/obj/effect/proc_holder/spell/targeted/ethereal_jaunt/shift
name = "Phase Shift"
desc = "This spell allows you to pass through walls"
@@ -319,3 +325,4 @@
include_user = 1
phaseshift = 1
jaunt_duration = 50 //in deciseconds
+ centcomm_cancast = 0 //Stop people from getting to centcomm
\ No newline at end of file
diff --git a/code/defines/area/Space Station 13 areas.dm b/code/defines/area/Space Station 13 areas.dm
index c4c9e76e41..910b192761 100755
--- a/code/defines/area/Space Station 13 areas.dm
+++ b/code/defines/area/Space Station 13 areas.dm
@@ -22,14 +22,13 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
var/party = null
level = null
name = "Space"
- icon = 'areas.dmi'
+ icon = 'icons/turf/areas.dmi'
icon_state = "unknown"
layer = 10
mouse_opacity = 0
+ invisibility = INVISIBILITY_LIGHTING
var/lightswitch = 1
- var/area_lights_luminosity = 9 //This gets assigned at area creation. It is used to determine how bright the lights in an area should be. At the time of writing the value that it gets assigned is rand(6,9) - only used for light tubes
-
var/eject = null
var/requires_power = 1
@@ -51,9 +50,6 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
var/list/related // the other areas of the same type as this
var/list/lights // list of all lights on this area
- var/list/all_doors = list() //Added by Strumpetplaya - Alarm Change - Contains a list of doors adjacent to this area
- var/air_doors_activated = 0
-
/*Adding a wizard area teleport list because motherfucking lag -- Urist*/
/*I am far too lazy to make it a proper list of areas so I'll just make it run the usual telepot routine at the start of the game*/
var/list/teleportlocs = list()
@@ -126,10 +122,10 @@ proc/process_ghost_teleport_locs()
//place to another. Look at escape shuttle for example.
//All shuttles show now be under shuttle since we have smooth-wall code.
-/area/shuttle //DO NOT TURN THE ul_Lighting STUFF ON FOR SHUTTLES. IT BREAKS THINGS.
+/area/shuttle //DO NOT TURN THE SD_LIGHTING STUFF ON FOR SHUTTLES. IT BREAKS THINGS.
requires_power = 0
luminosity = 1
- ul_Lighting = 0
+ sd_lighting = 0
/area/shuttle/arrival
name = "\improper Arrival Shuttle"
@@ -218,16 +214,6 @@ proc/process_ghost_teleport_locs()
/area/shuttle/mining/outpost
icon_state = "shuttle"
-/area/shuttle/research
- name = "\improper Research Shuttle"
- music = "music/escape.ogg"
-
-/area/shuttle/research/station
- icon_state = "shuttle2"
-
-/area/shuttle/research/outpost
- icon_state = "shuttle"
-
/area/shuttle/transport1/centcom
icon_state = "shuttle"
name = "\improper Transport Shuttle Centcom"
@@ -236,22 +222,19 @@ proc/process_ghost_teleport_locs()
icon_state = "shuttle"
name = "\improper Transport Shuttle"
-/area/shuttle/transport2/centcom
- icon_state = "shuttle"
-
/area/shuttle/alien/base
icon_state = "shuttle"
name = "\improper Alien Shuttle Base"
requires_power = 1
- luminosity = 1
- ul_Lighting = 0
+ luminosity = 0
+ sd_lighting = 1
/area/shuttle/alien/mine
icon_state = "shuttle"
name = "\improper Alien Shuttle Mine"
requires_power = 1
- luminosity = 1
- ul_Lighting = 0
+ luminosity = 0
+ sd_lighting = 1
/area/shuttle/prison/
name = "\improper Prison Shuttle"
@@ -323,7 +306,7 @@ proc/process_ghost_teleport_locs()
icon_state = "start"
requires_power = 0
luminosity = 1
- ul_Lighting = 0
+ sd_lighting = 0
has_gravity = 1
// === end remove
@@ -339,7 +322,6 @@ proc/process_ghost_teleport_locs()
name = "\improper Centcom"
icon_state = "centcom"
requires_power = 0
- ul_Lighting = 0
/area/centcom/control
name = "\improper Centcom Control"
@@ -392,7 +374,6 @@ proc/process_ghost_teleport_locs()
name = "\improper Asteroid"
icon_state = "asteroid"
requires_power = 0
- ul_Lighting = 1
/area/asteroid/cave // -- TLE
name = "\improper Asteroid - Underground"
@@ -449,7 +430,6 @@ proc/process_ghost_teleport_locs()
name = "\improper Syndicate Station"
icon_state = "yellow"
requires_power = 0
- ul_Lighting = 0
/area/syndicate_station/start
name = "\improper Syndicate Station Start"
@@ -486,22 +466,6 @@ proc/process_ghost_teleport_locs()
-/area/borg_deathsquad
- name = "\improper Borg Deathsquad"
- icon_state = "yellow"
- requires_power = 0
-
-/area/borg_deathsquad/start
- name = "\improper Borg Deathsquad - Ready"
-
-
-/area/borg_deathsquad/station
- name = "\improper Borg Deathsquad - Arrived"
-
-
-
-
-
@@ -594,10 +558,6 @@ proc/process_ghost_teleport_locs()
name = "Atmospherics"
icon_state = "atmos"
-/area/atmos/refilling
- name = "\improper Refilling Station"
- icon_state = "atmos"
-
//Maintenance
/area/maintenance/atmos_control
@@ -698,10 +658,6 @@ proc/process_ghost_teleport_locs()
name = "\improper Arrival Shuttle Hallway"
icon_state = "entry"
-/area/hallway/secondary/docking
- name = "\improper Docking Arm"
- icon_state = "entry"
-
//Command
/area/bridge
@@ -722,30 +678,30 @@ proc/process_ghost_teleport_locs()
name = "\improper Courtroom"
icon_state = "courtroom"
-/area/crew_quarters/heads/hop
- name = "\improper Head of Personnel's Quarters"
+/area/crew_quarters/heads
+ name = "\improper Head of Personnel's Office"
icon_state = "head_quarters"
-/area/crew_quarters/heads/hor
- name = "\improper Research Director's Quarters"
+/area/crew_quarters/hor
+ name = "\improper Research Director's Office"
icon_state = "head_quarters"
-/area/crew_quarters/heads/chief
- name = "\improper Chief Engineer's Quarters"
- icon_state = "head_quarters"
-
-/area/crew_quarters/heads/hos
- name = "\improper Head of Security's Quarters"
- icon_state = "head_quarters"
-
-/area/crew_quarters/heads/cmo
- name = "\improper Chief Medical Officer's Quarters"
+/area/crew_quarters/chief
+ name = "\improper Chief Engineer's Office"
icon_state = "head_quarters"
/area/mint
name = "\improper Mint"
icon_state = "green"
+/area/comms
+ name = "\improper Communications Relay"
+ icon_state = "tcomsatcham"
+
+/area/server
+ name = "\improper Messaging Server Room"
+ icon_state = "server"
+
//Crew
/area/crew_quarters
@@ -756,6 +712,10 @@ proc/process_ghost_teleport_locs()
name = "\improper Dormitory Toilets"
icon_state = "toilet"
+/area/crew_quarters/sleep
+ name = "\improper Dormitories"
+ icon_state = "Sleep"
+
/area/crew_quarters/sleep_male
name = "\improper Male Dorm"
icon_state = "Sleep"
@@ -826,7 +786,7 @@ proc/process_ghost_teleport_locs()
name = "\improper Holodeck"
icon_state = "Holodeck"
luminosity = 1
- ul_Lighting = 0
+ sd_lighting = 0
/area/holodeck/alphadeck
name = "\improper Holodeck Alpha"
@@ -842,6 +802,9 @@ proc/process_ghost_teleport_locs()
/area/holodeck/source_boxingcourt
name = "\improper Holodeck - Boxing Court"
+/area/holodeck/source_basketball
+ name = "\improper Holodeck - Basketball Court"
+
/area/holodeck/source_thunderdomecourt
name = "\improper Holodeck - Thunderdome Court"
@@ -877,119 +840,21 @@ proc/process_ghost_teleport_locs()
name = "Engineering"
icon_state = "engine"
- engineering_break_room
+ break_room
name = "\improper Engineering Break Room"
- icon_state = "engine_breakroom"
+ icon_state = "engine"
chiefs_office
name = "\improper Chief Engineer's office"
- icon_state = "engine_ce"
-
- particle_accelerator
- name = "\improper Particle Accelerator"
- icon_state = "engine_pa"
-
- control
- name = "\improper Engineering Control"
icon_state = "engine_control"
- port
- name = "Engineering Port"
- icon_state = "engine_port"
-
- starboard
- name = "Engineering Starboard"
- icon_state = "engine_starboard"
-
- fore
- name = "Engineering Fore"
- icon_state = "engine_fore"
-
- aft
- name = "Engineering Aft"
- icon_state = "engine_aft"
-
- locker
- name = "\improper Engineering Locker Room"
- icon_state = "engine_locker"
-
- construction_storage
- name = "Engineering Construction Storage"
- icon_state = "engine_construction"
-
- atmos_storage
- name = "Engineering Atmos Storage"
- icon_state = "engine_atmos"
-
- electrical_storage
- name = "Engineering Electrical Storage"
- icon_state = "engine_electrical"
-
- secure_storage
- name = "Engineering Secure Storage"
- icon_state = "engine_secure"
-
- foyer
- name = "\improper Engineering Foyer"
- icon_state = "engine_foyer"
-
- core
- name = "\improper Engineering Core"
- icon_state = "engine_core"
-
- cooling
- name = "\improper Emergency Cooling Room"
- icon_state = "engine"
-
-//reactor areas
-
- reactor_core
- name = "\improper Reactor Core"
- icon_state = "engine_core"
-
- reactor_gas
- name = "Reactor Gas Storage"
- icon_state = "engine_atmos"
-
- aux_control
- name = "Reactor Auxiliary Control"
- icon_state = "engine_aux"
-
- turbine_control
- name = "Turbine Control"
- icon_state = "engine_turbine"
-
- reactor_airlock
- name = "\improper Reactor Primary Entrance"
- icon_state = "engine_airlock"
-
- reactor_fuel_storage
- name = "Reactor Fuel Storage"
- icon_state = "engine_fuel"
-
- reactor_fuel_ports
- name = "\improper Reactor Fuel Ports"
- icon_state = "engine_port"
-
- generators
- name = "\improper Generator Room"
- icon_state = "engine_generators"
-
- port_gyro_bay
- name = "\improper Port Gyrotron Bay"
- icon_state = "engine_starboardgyro"
-
- starboard_gyro_bay
- name = "\improper Starboard Gyrotron Bay"
- icon_state = "engine_portgyro"
//Solars
/area/solar
requires_power = 0
- luminosity = 0
- ul_Lighting = 1
- LightLevels = list("Red" = 2, "Green" = 2, "Blue" = 3)
+ luminosity = 1
+ sd_lighting = 0
auxport
name = "\improper Fore Port Solar Array"
@@ -1066,7 +931,7 @@ proc/process_ghost_teleport_locs()
/area/medical/medbay
name = "Medbay"
icon_state = "medbay"
- music = 'signal.ogg'
+ music = 'sound/ambience/signal.ogg'
/area/medical/patients_rooms
name = "\improper Patient's Rooms"
@@ -1113,8 +978,8 @@ proc/process_ghost_teleport_locs()
icon_state = "genetics"
/area/medical/sleeper
- name = "\improper Medical Sleepers Room"
- icon_state = "medbay"
+ name = "\improper Medical Sleeper Room"
+ icon_state = "exam_room"
//Security
@@ -1122,29 +987,25 @@ proc/process_ghost_teleport_locs()
name = "\improper Security Office"
icon_state = "security"
-/area/security/lobby
- name = "\improper Security Lobby"
- icon_state = "security"
-
/area/security/brig
name = "\improper Brig"
icon_state = "brig"
/area/security/prison
name = "\improper Prison Wing"
- icon_state = "security"
+ icon_state = "sec_prison"
/area/security/warden
- name = "\improper Warden's Office"
+ name = "\improper Warden"
icon_state = "Warden"
/area/security/armoury
- name = "\improper Armoury"
+ name = "\improper Armory"
icon_state = "Warden"
/area/security/hos
name = "\improper Head of Security's Office"
- icon_state = "security"
+ icon_state = "sec_hos"
/area/security/detectives_office
name = "\improper Detective's Office"
@@ -1233,28 +1094,12 @@ proc/process_ghost_teleport_locs()
//Toxins
-/area/toxins/hallway
- name = "\improper R&D Hallway"
- icon_state = "hallC"
-
/area/toxins/lab
name = "\improper Research Lab"
- icon_state = "researchlab"
-
-/area/toxins/rdoffice
- name = "\improper Research Director's Office"
- icon_state = "head_quarters"
+ icon_state = "toxlab"
/area/toxins/xenobiology
name = "\improper Xenobiology Lab"
- icon_state = "xenolab"
-
-/area/toxins/gasstorage
- name = "R&D Gas Storage"
- icon_state = "gasstorage"
-
-/area/toxins/toxinslab
- name = "\improper Toxins Lab"
icon_state = "toxlab"
/area/toxins/storage
@@ -1269,32 +1114,14 @@ proc/process_ghost_teleport_locs()
name = "\improper Toxins Mixing Room"
icon_state = "toxmix"
-/area/toxins/observatory
- name = "\improper Toxins Lab Observatory"
- icon_state = "toxobserv"
+/area/toxins/misc_lab
+ name = "\improper Miscellaneous Research"
+ icon_state = "toxmisc"
/area/toxins/server
name = "\improper Server Room"
icon_state = "server"
-/area/toxins/supermatter
- name = "\improper Supermatter Laboratory"
- icon_state = "supermatter"
-
-//Anomaly
-
-/area/anomaly/hallway
- name = "Anomaly Hallway"
- icon_state = "anomaly"
-
-/area/anomaly/lab
- name = "Anomaly Lab"
- icon_state = "anomaly"
-
-/area/anomaly/outpost
- name = "Research Outpost"
- icon_state = "anomaly"
-
//Storage
/area/storage/tools
@@ -1446,14 +1273,6 @@ proc/process_ghost_teleport_locs()
name = "\improper Construction Area"
icon_state = "yellow"
-/area/construction/under_construction_small
- name = "\improper Construction Area"
- icon_state = "construction"
-
-/area/construction/under_construction_large
- name = "\improper Construction Area"
- icon_state = "construction"
-
/area/construction/supplyshuttle
name = "\improper Supply Shuttle"
icon_state = "yellow"
@@ -1501,7 +1320,7 @@ proc/process_ghost_teleport_locs()
icon_state = "ai_upload"
/area/turret_protected/ai_upload_foyer
- name = "\improper AI Upload Foyer"
+ name = "Secure Network Access"
icon_state = "ai_foyer"
/area/turret_protected/ai
@@ -1520,25 +1339,25 @@ proc/process_ghost_teleport_locs()
name = "\improper AI Sat Ext"
icon_state = "storage"
luminosity = 1
- ul_Lighting = 0
+ sd_lighting = 0
/area/turret_protected/AIsatextFS
name = "\improper AI Sat Ext"
icon_state = "storage"
luminosity = 1
- ul_Lighting = 0
+ sd_lighting = 0
/area/turret_protected/AIsatextAS
name = "\improper AI Sat Ext"
icon_state = "storage"
luminosity = 1
- ul_Lighting = 0
+ sd_lighting = 0
/area/turret_protected/AIsatextAP
name = "\improper AI Sat Ext"
icon_state = "storage"
luminosity = 1
- ul_Lighting = 0
+ sd_lighting = 0
/area/turret_protected/NewAIMain
name = "\improper AI Main New"
@@ -1575,15 +1394,15 @@ proc/process_ghost_teleport_locs()
// Telecommunications Satellite
/area/tcommsat/entrance
- name = "\improper Telecommunications Satellite Teleporter"
+ name = "\improper Telecoms Teleporter"
icon_state = "tcomsatentrance"
/area/tcommsat/chamber
- name = "\improper Telecommunications Satellite Central Compartment"
+ name = "\improper Telecoms Central Compartment"
icon_state = "tcomsatcham"
-/area/turret_protected/tcomfoyer
- name = "\improper Telecommunications Satellite Foyer"
+/area/turret_protected/tcomsat
+ name = "\improper Telecoms Satellite"
icon_state = "tcomsatlob"
/area/turret_protected/tcomfoyer
@@ -1599,7 +1418,7 @@ proc/process_ghost_teleport_locs()
icon_state = "tcomsateast"
/area/tcommsat/computer
- name = "\improper Telecommunications Satellite Observatory"
+ name = "\improper Telecoms Control Room"
icon_state = "tcomsatcomp"
/area/tcommsat/lounge
@@ -1620,7 +1439,7 @@ proc/process_ghost_teleport_locs()
/area/turret_protected/AssistantRoom
name = "\improper Assistant Room"
icon_state = "storage"
- ul_Lighting = 0
+ sd_lighting = 0
/////////////////////////////////////////////////////////////////////
/*
@@ -1637,7 +1456,6 @@ var/list/centcom_areas = list (
/area/shuttle/escape_pod3/centcom,
/area/shuttle/escape_pod5/centcom,
/area/shuttle/transport1/centcom,
- /area/shuttle/transport2/centcom,
/area/shuttle/administration/centcom,
/area/shuttle/specops/centcom,
)
@@ -1693,7 +1511,7 @@ var/list/the_station_areas = list (
name = "Keelin's private beach"
icon_state = "null"
luminosity = 1
- ul_Lighting = 0
+ sd_lighting = 0
requires_power = 0
var/sound/mysound = null
@@ -1701,14 +1519,14 @@ var/list/the_station_areas = list (
..()
var/sound/S = new/sound()
mysound = S
- S.file = 'shore.ogg'
+ S.file = 'sound/ambience/shore.ogg'
S.repeat = 1
S.wait = 0
S.channel = 123
S.volume = 100
S.priority = 255
S.status = SOUND_UPDATE
-// process()
+ process()
Entered(atom/movable/Obj,atom/OldLoc)
if(ismob(Obj))
@@ -1723,19 +1541,19 @@ var/list/the_station_areas = list (
mysound.status = SOUND_PAUSED | SOUND_UPDATE
Obj << mysound
-/* proc/process()
+ proc/process()
set background = 1
var/sound/S = null
var/sound_delay = 0
if(prob(25))
- S = sound(file=pick('seag1.ogg','seag2.ogg','seag3.ogg'), volume=100)
+ S = sound(file=pick('sound/ambience/seag1.ogg','sound/ambience/seag2.ogg','sound/ambience/seag3.ogg'), volume=100)
sound_delay = rand(0, 50)
for(var/mob/living/carbon/human/H in src)
- if(H.s_tone > -55)
- H.s_tone--
- H.update_body()
+// if(H.s_tone > -55) //ugh...nice/novel idea but please no.
+// H.s_tone--
+// H.update_body()
if(H.client)
mysound.status = SOUND_UPDATE
H << mysound
@@ -1743,4 +1561,4 @@ var/list/the_station_areas = list (
spawn(sound_delay)
H << S
- spawn(60) .() */
\ No newline at end of file
+ spawn(60) .()
\ No newline at end of file
diff --git a/code/defines/atom.dm b/code/defines/atom.dm
index 1a1a79b94f..d21fd2faaa 100644
--- a/code/defines/atom.dm
+++ b/code/defines/atom.dm
@@ -2,7 +2,6 @@
layer = 2
var/level = 2
var/flags = FPRINT
- var/flags_inv //This flag is used to determine when items in someone's inventory cover others. IE helmets making it so you can't see glasses, etc.
var/list/fingerprints
var/list/fingerprintshidden
var/fingerprintslast = null
@@ -17,6 +16,9 @@
// replaced by OPENCONTAINER flags and atom/proc/is_open_container()
///Chemistry.
+ //Detective Work, used for the duplicate data points kept in the scanners
+ var/list/original_atom
+
proc/assume_air(datum/gas_mixture/giver)
del(giver)
return null
@@ -177,7 +179,7 @@ Also, the icon used for the beam will have to be vertical and 32x32.
The math involved assumes that the icon is vertical to begin with so unless you want to adjust the math,
its easier to just keep the beam vertical.
*/
-/atom/proc/Beam(atom/BeamTarget,icon_state="b_beam",icon='beam.dmi',time=50, maxdistance=10)
+/atom/proc/Beam(atom/BeamTarget,icon_state="b_beam",icon='icons/effects/beam.dmi',time=50, maxdistance=10)
//BeamTarget represents the target for the beam, basically just means the other end.
//Time is the duration to draw the beam
//Icon is obviously which icon to use for the beam, default is beam.dmi
diff --git a/code/defines/hub.dm b/code/defines/hub.dm
index 3dd25cb042..1e102296b5 100644
--- a/code/defines/hub.dm
+++ b/code/defines/hub.dm
@@ -1,13 +1,13 @@
world
hub = "Exadv1.spacestation13"
- hub_password = "kMZy3U5jJHSiBQjr"
- name = "Baystation 12"
+ hub_password = "SORRYNOPASSWORD"
+ name = "Baystation12"
/*
This is for any host that would like their server to appear on the main SS13 hub.
To use it, simply replace the password above, with the password found below, and it should work.
-If not, let us know on the main baystation IRC channel of irc.sorcery.net #bs12 and we can help you there.
+If not, let us know on the main tgstation IRC channel of irc.rizon.net #tgstation13 we can help you there.
hub = "Exadv1.spacestation13"
hub_password = "kMZy3U5jJHSiBQjr"
diff --git a/code/defines/mob/dead/observer.dm b/code/defines/mob/dead/observer.dm
index a3cd0a81b5..4fb812720d 100644
--- a/code/defines/mob/dead/observer.dm
+++ b/code/defines/mob/dead/observer.dm
@@ -1,14 +1,16 @@
/mob/dead/observer
name = "ghost"
desc = "It's a g-g-g-g-ghooooost!" //jinkies!
- icon = 'mob.dmi'
+ icon = 'icons/mob/mob.dmi'
icon_state = "ghost"
layer = 4
+ stat = DEAD
density = 0
- stat = 2
canmove = 0
blinded = 0
anchored = 1 // don't get pushed around
- universal_speak = 1 //Ghosts are multi-lingual!
- var/mob/corpse = null // observer mode
- var/datum/hud/living/carbon/hud = null // hud
\ No newline at end of file
+// var/mob/corpse = null // observer mode //we use mind.current as the 'corpse' now
+ var/can_reenter_corpse
+ var/datum/hud/living/carbon/hud = null // hud
+ var/bootime = 0
+ var/started_as_observer //This variable is set to 1 when you enter the game as an observer. If you died in the game and are a ghsot - this will remain as null. Note that this is not a reliable way to determine if admins started as observers, since they change mobs a lot.
\ No newline at end of file
diff --git a/code/defines/mob/living/carbon/alien.dm b/code/defines/mob/living/carbon/alien.dm
index 60b38a20c0..2cb0453c1d 100644
--- a/code/defines/mob/living/carbon/alien.dm
+++ b/code/defines/mob/living/carbon/alien.dm
@@ -3,11 +3,10 @@
voice_name = "alien"
voice_message = "hisses"
say_message = "hisses"
- icon = 'alien.dmi'
+ icon = 'icons/mob/alien.dmi'
gender = NEUTER
var/storedPlasma = 250
- var/alien_invis = 0.0
var/max_plasma = 500
alien_talk_understand = 1
@@ -17,5 +16,6 @@
var/move_delay_add = 0 // movement delay to add
- canstun = 0
- canweaken = 0 // aliens cannot be stunned or knocked down. Massive buff!
\ No newline at end of file
+ status_flags = CANPARALYSE
+ var/heal_rate = 5
+ var/plasma_rate = 5
\ No newline at end of file
diff --git a/code/defines/mob/living/carbon/alien_humanoid.dm b/code/defines/mob/living/carbon/alien_humanoid.dm
index af03496ff6..2b62b4bb9e 100644
--- a/code/defines/mob/living/carbon/alien_humanoid.dm
+++ b/code/defines/mob/living/carbon/alien_humanoid.dm
@@ -2,54 +2,54 @@
name = "alien"
icon_state = "alien_s"
- var/obj/item/clothing/suit/wear_suit = null
- var/obj/item/clothing/head/head = null
+ var/obj/item/clothing/suit/wear_suit = null //TODO: necessary? Are they even used? ~Carn
+ var/obj/item/clothing/head/head = null //
var/obj/item/weapon/r_store = null
var/obj/item/weapon/l_store = null
+// var/alien_invis = 0
+ var/caste = ""
+ update_icon = 1
- var/icon/stand_icon = null
- var/icon/lying_icon = null
- var/icon/resting_icon = null
- var/icon/running_icon = null
-
- var/last_b_state = 1.0
-
- var/image/face_standing = null
- var/image/face_lying = null
-
- var/image/damageicon_standing = null
- var/image/damageicon_lying = null
/mob/living/carbon/alien/humanoid/hunter
name = "alien hunter"
-
+ caste = "h"
+ maxHealth = 150
health = 150
storedPlasma = 100
max_plasma = 150
- icon_state = "alien_s"
+ icon_state = "alienh_s"
+ plasma_rate = 5
/mob/living/carbon/alien/humanoid/sentinel
name = "alien sentinel"
-
+ caste = "s"
+ maxHealth = 125
health = 125
storedPlasma = 100
max_plasma = 250
- icon_state = "alien_s"
+ icon_state = "aliens_s"
+ plasma_rate = 10
/mob/living/carbon/alien/humanoid/drone
name = "alien drone"
-
+ caste = "d"
+ maxHealth = 100
health = 100
- icon_state = "alien_s"
+ icon_state = "aliend_s"
+ plasma_rate = 15
/mob/living/carbon/alien/humanoid/queen
name = "alien queen"
-
+ caste = "q"
+ maxHealth = 250
health = 250
- icon_state = "queen_s"
+ icon_state = "alienq_s"
nopush = 1
+ heal_rate = 15
+ plasma_rate = 20
+
/mob/living/carbon/alien/humanoid/rpbody
update_icon = 0
-
voice_message = "says"
say_message = "says"
\ No newline at end of file
diff --git a/code/defines/mob/living/carbon/alien_larva.dm b/code/defines/mob/living/carbon/alien_larva.dm
index c64451005f..2eb28e567e 100644
--- a/code/defines/mob/living/carbon/alien_larva.dm
+++ b/code/defines/mob/living/carbon/alien_larva.dm
@@ -1,9 +1,10 @@
/mob/living/carbon/alien/larva
name = "alien larva"
+ real_name = "alien larva"
icon_state = "larva"
pass_flags = PASSTABLE
- swap_on_mobbump = 0
+ maxHealth = 25
health = 25
var/amount_grown = 0
\ No newline at end of file
diff --git a/code/defines/mob/living/carbon/carbon.dm b/code/defines/mob/living/carbon/carbon.dm
index 504be35127..ae310b78ac 100644
--- a/code/defines/mob/living/carbon/carbon.dm
+++ b/code/defines/mob/living/carbon/carbon.dm
@@ -5,15 +5,7 @@
var/brain_op_stage = 0.0
var/eye_op_stage = 0.0
var/appendix_op_stage = 0.0
- var/embryo_op_stage = 0.0
- var/face_op_stage = 0.0
- var/datum/disease2/disease/virus2 = null
- var/list/datum/disease2/disease/resistances2 = list()
- var/antibodies = 0
-
- var/analgesic = 0 // when this is set, the mob isn't affected by shock or pain
- // life should decrease this by 1 every tick
-
-mob
- var/list/disease_symptoms = 0 // a list of disease-incurred symptoms
\ No newline at end of file
+ //var/datum/disease2/disease/virus2 = null
+ //var/list/datum/disease2/disease/resistances2 = list()
+ var/antibodies = 0
\ No newline at end of file
diff --git a/code/defines/mob/living/carbon/metroid.dm b/code/defines/mob/living/carbon/metroid.dm
index 48fd4fea5c..33778c9700 100644
--- a/code/defines/mob/living/carbon/metroid.dm
+++ b/code/defines/mob/living/carbon/metroid.dm
@@ -3,7 +3,7 @@
/mob/living/carbon/metroid
name = "baby metroid"
- icon = 'mob.dmi'
+ icon = 'icons/mob/mob.dmi'
icon_state = "baby metroid"
pass_flags = PASSTABLE
voice_message = "skree!"
@@ -11,18 +11,18 @@
layer = 5
+ maxHealth = 150
health = 150
gender = NEUTER
update_icon = 0
- nutrition = 800 // 1000 = max
+ nutrition = 700 // 1000 = max
see_in_dark = 8
// canstun and canweaken don't affect metroids because they ignore stun and weakened variables
// for the sake of cleanliness, though, here they are.
- canstun = 0
- canweaken = 0
+ status_flags = CANPARALYSE
var/amount_grown = 0// controls how long the metroid has been overfed, if 10, grows into an adult
// if adult: if 10: reproduces
@@ -47,12 +47,12 @@
/mob/living/carbon/metroid/adult
name = "adult metroid"
- icon = 'mob.dmi'
+ icon = 'icons/mob/mob.dmi'
icon_state = "adult metroid"
health = 200
gender = NEUTER
update_icon = 0
- nutrition = 1000 // 1200 = max
+ nutrition = 800 // 1200 = max
diff --git a/code/defines/mob/living/carbon/monkey.dm b/code/defines/mob/living/carbon/monkey.dm
new file mode 100644
index 0000000000..c937afdac9
--- /dev/null
+++ b/code/defines/mob/living/carbon/monkey.dm
@@ -0,0 +1,17 @@
+/mob/living/carbon/monkey
+ name = "monkey"
+ voice_name = "monkey"
+ voice_message = "chimpers"
+ say_message = "chimpers"
+ icon = 'icons/mob/monkey.dmi'
+ icon_state = "monkey1"
+ gender = NEUTER
+ pass_flags = PASSTABLE
+ update_icon = 0 ///no need to call regenerate_icon
+
+ var/obj/item/weapon/card/id/wear_id = null // Fix for station bounced radios -- Skie
+
+/mob/living/carbon/monkey/rpbody // For admin RP
+ update_icon = 0
+ voice_message = "says"
+ say_message = "says"
diff --git a/code/defines/mob/living/living.dm b/code/defines/mob/living/living.dm
index dc767fce08..93f4bfd878 100644
--- a/code/defines/mob/living/living.dm
+++ b/code/defines/mob/living/living.dm
@@ -5,14 +5,5 @@
var/t_n2 = null
var/now_pushing = null
var/cameraFollow = null
- var/age = null
-
-
-// lists used to cache overlays
-/mob/living/var/list/body_overlays_standing = list()
-/mob/living/var/list/body_overlays_lying = list()
-/mob/living/var/list/clothing_overlays = list()
-
-// This var describes whether the mob visually appears to be lying.
-// This will be used to only update lying status when necessary.
-/mob/living/var/visual_lying = 0
\ No newline at end of file
+ var/tod = null // Time of death
+ see_invisible = SEE_INVISIBLE_LIVING
\ No newline at end of file
diff --git a/code/defines/mob/living/silicon/ai.dm b/code/defines/mob/living/silicon/ai.dm
index a6584910ba..0f519472dd 100644
--- a/code/defines/mob/living/silicon/ai.dm
+++ b/code/defines/mob/living/silicon/ai.dm
@@ -1,10 +1,11 @@
/mob/living/silicon/ai
name = "AI"
- icon = 'AI.dmi'//
+ icon = 'icons/mob/AI.dmi'//
icon_state = "ai"
anchored = 1 // -- TLE
density = 1
- var/list/networks
+ status_flags = CANSTUN|CANPARALYSE
+ var/network = "SS13"
var/obj/machinery/camera/current = null
var/list/connected_robots = list()
var/aiRestorePowerRoutine = 0
@@ -14,6 +15,7 @@
var/lawcheck[1]
var/ioncheck[1]
var/icon/holo_icon//Default is assigned when AI is created.
+ var/obj/item/device/pda/ai/aiPDA = null
//MALFUNCTION
var/datum/AI_Module/module_picker/malf_picker
@@ -27,4 +29,6 @@
var/obj/machinery/power/apc/malfhack = null
var/explosive = 0 //does the AI explode when it dies?
- var/mob/living/silicon/ai/parent = null
\ No newline at end of file
+ var/mob/living/silicon/ai/parent = null
+
+ var/camera_light_on = 0 //Defines if the AI toggled the light on the camera it's looking through.
\ No newline at end of file
diff --git a/code/defines/mob/living/silicon/decoy.dm b/code/defines/mob/living/silicon/decoy.dm
index 0ed4da4fa1..1332018307 100644
--- a/code/defines/mob/living/silicon/decoy.dm
+++ b/code/defines/mob/living/silicon/decoy.dm
@@ -1,6 +1,6 @@
/mob/living/silicon/decoy
name = "AI"
- icon = 'Ai.dmi'//
+ icon = 'icons/mob/AI.dmi'//
icon_state = "ai"
anchored = 1 // -- TLE
canmove = 0
\ No newline at end of file
diff --git a/code/defines/mob/living/silicon/pai.dm b/code/defines/mob/living/silicon/pai.dm
index ddc38fb629..a7524cfb25 100644
--- a/code/defines/mob/living/silicon/pai.dm
+++ b/code/defines/mob/living/silicon/pai.dm
@@ -1,9 +1,9 @@
/mob/living/silicon/pai
name = "pAI"
- icon = 'mob.dmi'//
+ icon = 'icons/mob/mob.dmi'//
icon_state = "shadow"
- robot_talk_understand = 1 //pAI's can now use binary
+ robot_talk_understand = 0
var/network = "SS13"
var/obj/machinery/camera/current = null
@@ -35,8 +35,7 @@
var/screen // Which screen our main window displays
var/subscreen // Which specific function of the main screen is being displayed
- var/tnote // Message history var used for PDA Messaging functions
- var/poff = 0 // For PDA messanging.
+ var/obj/item/device/pda/pai/pda = null
var/secHUD = 0 // Toggles whether the Security HUD is active or not
var/medHUD = 0 // Toggles whether the Medical HUD is active or not
@@ -48,4 +47,6 @@
var/datum/data/record/securityActive2
var/obj/machinery/door/hackdoor // The airlock being hacked
- var/hackprogress = 0 // Possible values: 0 - 100, >= 100 means the hack is complete and will be reset upon next check
\ No newline at end of file
+ var/hackprogress = 0 // Possible values: 0 - 100, >= 100 means the hack is complete and will be reset upon next check
+
+ var/obj/item/radio/integrated/signal/sradio // AI's signaller
\ No newline at end of file
diff --git a/code/defines/mob/living/silicon/robot.dm b/code/defines/mob/living/silicon/robot.dm
index b4e31226f3..8cdd9e7a37 100644
--- a/code/defines/mob/living/silicon/robot.dm
+++ b/code/defines/mob/living/silicon/robot.dm
@@ -1,8 +1,12 @@
/mob/living/silicon/robot
name = "Cyborg"
- icon = 'robots.dmi'//
+ real_name = "Cyborg"
+ icon = 'icons/mob/robots.dmi'//
icon_state = "robot"
+ maxHealth = 300
health = 300
+ var/started = null//A fix to ensure people don't try to bypass law assignment. Initial assignment sets it to one but it check on login whether they have been initiated -Sieve
+
#define BORGMESON 1
#define BORGTHERM 2
@@ -35,18 +39,18 @@
var/emagged = 0
var/wiresexposed = 0
var/locked = 1
- var/list/req_access = list(ACCESS_ROBOTICS)
+ var/list/req_access = list(access_robotics)
var/ident = 0
//var/list/laws = list()
var/alarms = list("Motion"=list(), "Fire"=list(), "Atmosphere"=list(), "Power"=list())
var/viewalerts = 0
- var/modtype = null
+ var/modtype = "robot"
var/lower_mod = 0
var/jetpack = 0
var/datum/effect/effect/system/ion_trail_follow/ion_trail = null
var/datum/effect/effect/system/spark_spread/spark_system//So they can initialize sparks whenever/N
var/jeton = 0
- var/borgwires = 31
+ var/borgwires = 31 // 0b11111
var/killswitch = 0
var/killswitch_time = 60
var/weapon_lock = 0
@@ -54,9 +58,4 @@
var/lawupdate = 1 //Cyborgs will sync their laws with their AI by default
var/lockcharge //Used when locking down a borg to preserve cell charge
var/speed = 0 //Cause sec borgs gotta go fast //No they dont!
- var/scrambledcodes = 0 // Used to determine if a borg shows up on the robotics console. Setting to one hides them.
- var/channels = list()
- var/modlock = 0
-
- var/lawcheck[1] //For stating laws!
- var/ioncheck[1]
\ No newline at end of file
+ var/scrambledcodes = 0 // Used to determine if a borg shows up on the robotics console. Setting to one hides them.
\ No newline at end of file
diff --git a/code/defines/obj.dm b/code/defines/obj.dm
index 2441c74107..ceca81f285 100644
--- a/code/defines/obj.dm
+++ b/code/defines/obj.dm
@@ -12,6 +12,7 @@
var/datum/marked_datum
animate_movement = 2
var/throwforce = 1
+ var/list/attack_verb = list() //Used in attackby() to say how something was attacked "[x] has been [z.attack_verb] by [y] with [z]"
proc/handle_internal_lifeform(mob/lifeform_inside_me, breath_request)
//Return: (NONSTANDARD)
@@ -25,29 +26,8 @@
proc/initialize()
-//Define all tape types in policetape.dm
-/obj/item/taperoll
- name = "tape roll"
- icon = 'policetape.dmi'
- icon_state = "rollstart"
- flags = FPRINT
- w_class = 1.0
- var/turf/start
- var/turf/end
- var/tape_type = /obj/item/tape
- var/icon_base
-
-/obj/item/tape
- name = "tape"
- icon = 'policetape.dmi'
- anchored = 1
- density = 1
- var/icon_base
-/*
-
-*/
/obj/structure/signpost
- icon = 'stationobjs.dmi'
+ icon = 'icons/obj/stationobjs.dmi'
icon_state = "signpost"
anchored = 1
density = 1
@@ -66,7 +46,7 @@
/obj/effect/mark
var/mark = ""
- icon = 'mark.dmi'
+ icon = 'icons/misc/mark.dmi'
icon_state = "blank"
anchored = 1
layer = 99
@@ -89,15 +69,15 @@
/obj/structure/bedsheetbin
name = "linen bin"
- desc = "A small wire mesh bin full of extra bedsheets and cleaning supplies for the beds. Smells of lilacs and has a faint undertone of disinfectant."
- icon = 'items.dmi'
+ desc = "A bin for containing bedsheets. It looks rather cosy."
+ icon = 'icons/obj/items.dmi'
icon_state = "bedbin"
var/amount = 23.0
anchored = 1.0
/obj/effect/begin
name = "begin"
- icon = 'stationobjs.dmi'
+ icon = 'icons/obj/stationobjs.dmi'
icon_state = "begin"
anchored = 1.0
unacidable = 1
@@ -215,54 +195,28 @@
dat = dd_replacetext(dat, "\t", "")
return dat
-/obj/effect/equip_e
- name = "equip e"
- var/mob/source = null
- var/s_loc = null
- var/t_loc = null
- var/obj/item/item = null
- var/place = null
- var/internalloc = null
-
-/obj/effect/equip_e/human
- name = "human"
- var/mob/living/carbon/human/target = null
-
-/obj/effect/equip_e/monkey
- name = "monkey"
- var/mob/living/carbon/monkey/target = null
-
/obj/effect/sign/securearea
- desc = "A large yellow warning sign which reads 'SECURE AREA', it appears to have been painted onto the wall like that."
+ desc = "A warning sign which reads 'SECURE AREA'. This obviously applies to a nun-Clown."
name = "SECURE AREA"
- icon = 'decals.dmi'
- icon_state = "securearea"
- anchored = 1.0
- opacity = 0
- density = 0
-
-/obj/effect/sign/movingparts
- desc = "A warning sign which reads 'CAUTION: MOVING PARTS, machinery liable to stop and start at random'"
- name = "CAUTION"
- icon = 'decals.dmi'
+ icon = 'icons/obj/decals.dmi'
icon_state = "securearea"
anchored = 1.0
opacity = 0
density = 0
/obj/effect/sign/biohazard
- desc = "A warning sign which reads 'BIOHAZARD', you think it'd be a good idea to ensure you have a properly sealed hazardsuit on."
+ desc = "A warning sign which reads 'BIOHAZARD'"
name = "BIOHAZARD"
- icon = 'decals.dmi'
+ icon = 'icons/obj/decals.dmi'
icon_state = "bio"
anchored = 1.0
opacity = 0
density = 0
/obj/effect/sign/electricshock
- desc = "A warning sign which reads 'HIGH VOLTAGE', it looks like it'd be a wise decision to stay away from here."
+ desc = "A warning sign which reads 'HIGH VOLTAGE'"
name = "HIGH VOLTAGE"
- icon = 'decals.dmi'
+ icon = 'icons/obj/decals.dmi'
icon_state = "shock"
anchored = 1.0
opacity = 0
@@ -271,7 +225,7 @@
/obj/effect/sign/examroom
desc = "A guidance sign which reads 'EXAM ROOM'"
name = "EXAM"
- icon = 'decals.dmi'
+ icon = 'icons/obj/decals.dmi'
icon_state = "examroom"
anchored = 1.0
opacity = 0
@@ -280,7 +234,7 @@
/obj/effect/sign/vacuum
desc = "A warning sign which reads 'HARD VACUUM AHEAD'"
name = "HARD VACUUM AHEAD"
- icon = 'decals.dmi'
+ icon = 'icons/obj/decals.dmi'
icon_state = "space"
anchored = 1.0
opacity = 0
@@ -289,7 +243,7 @@
/obj/effect/sign/deathsposal
desc = "A warning sign which reads 'DISPOSAL LEADS TO SPACE'"
name = "DISPOSAL LEADS TO SPACE"
- icon = 'decals.dmi'
+ icon = 'icons/obj/decals.dmi'
icon_state = "deathsposal"
anchored = 1.0
opacity = 0
@@ -298,7 +252,7 @@
/obj/effect/sign/pods
desc = "A warning sign which reads 'ESCAPE PODS'"
name = "ESCAPE PODS"
- icon = 'decals.dmi'
+ icon = 'icons/obj/decals.dmi'
icon_state = "pods"
anchored = 1.0
opacity = 0
@@ -307,7 +261,7 @@
/obj/effect/sign/fire
desc = "A warning sign which reads 'DANGER: FIRE'"
name = "DANGER: FIRE"
- icon = 'decals.dmi'
+ icon = 'icons/obj/decals.dmi'
icon_state = "fire"
anchored = 1.0
opacity = 0
@@ -317,7 +271,7 @@
/obj/effect/sign/nosmoking_1
desc = "A warning sign which reads 'NO SMOKING'"
name = "NO SMOKING"
- icon = 'decals.dmi'
+ icon = 'icons/obj/decals.dmi'
icon_state = "nosmoking"
anchored = 1.0
opacity = 0
@@ -327,7 +281,7 @@
/obj/effect/sign/nosmoking_2
desc = "A warning sign which reads 'NO SMOKING'"
name = "NO SMOKING"
- icon = 'decals.dmi'
+ icon = 'icons/obj/decals.dmi'
icon_state = "nosmoking2"
anchored = 1.0
opacity = 0
@@ -336,7 +290,7 @@
/obj/effect/sign/redcross
desc = "The Intergalactic symbol of Medical institutions. You'll probably get help here.'"
name = "Med-Bay"
- icon = 'decals.dmi'
+ icon = 'icons/obj/decals.dmi'
icon_state = "redcross"
anchored = 1.0
opacity = 0
@@ -345,16 +299,25 @@
/obj/effect/sign/goldenplaque
desc = "To be Robust is not an action or a way of life, but a mental state. Only those with the force of Will strong enough to act during a crisis, saving friend from foe, are truly Robust. Stay Robust my friends."
name = "The Most Robust Men Award for Robustness"
- icon = 'decals.dmi'
+ icon = 'icons/obj/decals.dmi'
icon_state = "goldenplaque"
anchored = 1.0
opacity = 0
density = 0
+/obj/effect/sign/atmosplaque
+ desc = "This plaque commemorates the fall of the Atmos FEA division. For all the charred, dizzy, and brittle men who have died in its hands."
+ name = "FEA Atmospherics Division"
+ icon = 'icons/obj/decals.dmi'
+ icon_state = "atmosplaque"
+ anchored = 1.0
+ opacity = 0
+ density = 0
+
/*/obj/item/weapon/plaque_assembly //commenting this out until there's a better rework
desc = "Put this on a wall and engrave an epitaph"
name = "Plaque Assembly"
- icon = 'decals.dmi'
+ icon = 'icons/obj/decals.dmi'
icon_state = "goldenplaque"
/obj/item/weapon/plaque_assembly/afterattack(atom/A as mob|obj|turf|area, mob/user as mob)
@@ -369,7 +332,7 @@
/obj/effect/sign/maltesefalcon1 //The sign is 64x32, so it needs two tiles. ;3
desc = "The Maltese Falcon, Space Bar and Grill."
name = "The Maltese Falcon"
- icon = 'decals.dmi'
+ icon = 'icons/obj/decals.dmi'
icon_state = "maltesefalcon1"
anchored = 1.0
opacity = 0
@@ -378,7 +341,7 @@
/obj/effect/sign/maltesefalcon2
desc = "The Maltese Falcon, Space Bar and Grill."
name = "The Maltese Falcon"
- icon = 'decals.dmi'
+ icon = 'icons/obj/decals.dmi'
icon_state = "maltesefalcon2"
anchored = 1.0
opacity = 0
@@ -387,7 +350,7 @@
/obj/effect/sign/science//These 3 have multiple types, just var-edit the icon_state to whatever one you want on the map
desc = "A warning sign which reads 'SCIENCE!'"
name = "SCIENCE!"
- icon = 'decals.dmi'
+ icon = 'icons/obj/decals.dmi'
icon_state = "science1"
anchored = 1.0
opacity = 0
@@ -396,7 +359,7 @@
/obj/effect/sign/chemistry
desc = "A warning sign which reads 'CHEMISTY'"
name = "CHEMISTRY"
- icon = 'decals.dmi'
+ icon = 'icons/obj/decals.dmi'
icon_state = "chemistry1"
anchored = 1.0
opacity = 0
@@ -405,7 +368,7 @@
/obj/effect/sign/botany
desc = "A warning sign which reads 'HYDROPONICS'"
name = "HYDROPONICS"
- icon = 'decals.dmi'
+ icon = 'icons/obj/decals.dmi'
icon_state = "hydro1"
anchored = 1.0
opacity = 0
@@ -417,10 +380,6 @@
var/mob/mymob = null
var/list/adding = null
var/list/other = null
- var/list/intents = null
- var/list/mov_int = null
- var/list/mon_blo = null
- var/list/m_ints = null
var/obj/screen/druggy = null
var/vimpaired = null
var/obj/screen/alien_view = null
@@ -429,16 +388,17 @@
var/list/darkMask = null
var/obj/screen/r_hand_hud_object = null
var/obj/screen/l_hand_hud_object = null
- var/list/obj/screen/intent_small_hud_objects = null
- var/show_intent_icons = 1
+ var/show_intent_icons = 0
var/list/obj/screen/hotkeybuttons = null
var/hotkey_ui_hidden = 0 //This is to hide the buttons that can be used via hotkeys. (hotkeybuttons list of buttons)
+ var/list/obj/screen/item_action/item_action_list = null //Used for the item action ui buttons.
+
var/h_type = /obj/screen //this is like...the most pointless thing ever. Use a god damn define!
/obj/item
name = "item"
- icon = 'items.dmi'
+ icon = 'icons/obj/items.dmi'
var/icon/blood_overlay = null //this saves our blood splatter overlay, which will be processed not to go over the edges of the sprite
var/abstract = 0
var/force = 0
@@ -457,12 +417,19 @@
// causeerrorheresoifixthis
var/obj/item/master = null
+ var/heat_protection = 0 //flags which determine which body parts are protected from heat. Use the HEAD, UPPER_TORSO, LOWER_TORSO, etc. flags. See setup.dm
+ var/cold_protection = 0 //flags which determine which body parts are protected from cold. Use the HEAD, UPPER_TORSO, LOWER_TORSO, etc. flags. See setup.dm
+ var/max_heat_protection_temperature //Set this variable to determine up to which temperature (IN KELVIN) the item protects against heat damage. Keep at null to disable protection. Only protects areas set by heat_protection flags
+ var/min_cold_protection_temperature //Set this variable to determine down to which temperature (IN KELVIN) the item protects against cold damage. 0 is NOT an acceptable number due to if(varname) tests!! Keep at null to disable protection. Only protects areas set by cold_protection flags
+
+ var/icon_action_button //If this is set, The item will make an action button on the player's HUD when picked up. The button will have the icon_action_button sprite from the screen1_action.dmi file.
+ var/action_button_name //This is the text which gets displayed on the action button. If not set it defaults to 'Use [name]'. Note that icon_action_button needs to be set in order for the action button to appear.
+
//Since any item can now be a piece of clothing, this has to be put here so all items share it.
- var/see_face = 1.0
+ var/flags_inv //This flag is used to determine when items in someone's inventory cover others. IE helmets making it so you can't see glasses, etc.
var/color = null
var/body_parts_covered = 0 //see setup.dm for appropriate bit flags
- var/protective_temperature = 0
- var/heat_transfer_coefficient = 1 //0 prevents all transfers, 1 is invisible
+ //var/heat_transfer_coefficient = 1 //0 prevents all transfers, 1 is invisible
var/gas_transfer_coefficient = 1 // for leaking gas from turf to mask and vice-versa (for masks right now, but at some point, i'd like to include space helmets)
var/permeability_coefficient = 1 // for chemicals/diseases
var/siemens_coefficient = 1 // for electrical admittance/conductance (electrocution checks and shit)
@@ -470,43 +437,225 @@
var/canremove = 1 //Mostly for Ninja code at this point but basically will not allow the item to be removed if set to 0. /N
var/armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0)
var/list/allowed = null //suit storage stuff.
+ var/obj/item/device/uplink/hidden/hidden_uplink = null // All items can have an uplink hidden inside, just remember to add the triggers.
+
+//the mob M is attempting to equip this item into the slot passed through as 'slot'. Return 1 if it can do this and 0 if it can't.
+//If you are making custom procs but would like to retain partial or complete functionality of this one, include a 'return ..()' to where you want this to happen.
+//Set disable_warning to 1 if you wish it to not give you outputs.
+
+/obj/item/proc/mob_can_equip(M as mob, slot, disable_warning = 0)
+ if(!slot) return 0
+ if(!M) return 0
+
+ if(ishuman(M))
+ //START HUMAN
+ var/mob/living/carbon/human/H = M
+
+ if(FAT in H.mutations)
+ if(!(flags & ONESIZEFITSALL))
+ if(!disable_warning)
+ H << "\red You're too fat to wear the [name]."
+ return 0
+
+ switch(slot)
+ if(slot_l_hand)
+ if(H.l_hand)
+ return 0
+ return 1
+ if(slot_r_hand)
+ if(H.r_hand)
+ return 0
+ return 1
+ if(slot_wear_mask)
+ if(H.wear_mask)
+ return 0
+ if( !(slot_flags & SLOT_MASK) )
+ return 0
+ return 1
+ if(slot_back)
+ if(H.back)
+ return 0
+ if( !(slot_flags & SLOT_BACK) )
+ return 0
+ return 1
+ if(slot_wear_suit)
+ if(H.wear_suit)
+ return 0
+ if( !(slot_flags & SLOT_OCLOTHING) )
+ return 0
+ return 1
+ if(slot_gloves)
+ if(H.gloves)
+ return 0
+ if( !(slot_flags & SLOT_GLOVES) )
+ return 0
+ return 1
+ if(slot_shoes)
+ if(H.shoes)
+ return 0
+ if( !(slot_flags & SLOT_FEET) )
+ return 0
+ return 1
+ if(slot_belt)
+ if(H.belt)
+ return 0
+ if(!H.w_uniform)
+ if(!disable_warning)
+ H << "\red You need a jumpsuit before you can attach this [name]."
+ return 0
+ if( !(slot_flags & SLOT_BELT) )
+ return
+ return 1
+ if(slot_glasses)
+ if(H.glasses)
+ return 0
+ if( !(slot_flags & SLOT_EYES) )
+ return 0
+ return 1
+ if(slot_head)
+ if(H.head)
+ return 0
+ if( !(slot_flags & SLOT_HEAD) )
+ return 0
+ return 1
+ if(slot_ears)
+ if(H.ears)
+ return 0
+ if( !(slot_flags & SLOT_EARS) )
+ return 0
+ return 1
+ if(slot_w_uniform)
+ if(H.w_uniform)
+ return 0
+ if( !(slot_flags & SLOT_ICLOTHING) )
+ return 0
+ return 1
+ if(slot_wear_id)
+ if(H.wear_id)
+ return 0
+ if(!H.w_uniform)
+ if(!disable_warning)
+ H << "\red You need a jumpsuit before you can attach this [name]."
+ return 0
+ if( !(slot_flags & SLOT_ID) )
+ return 0
+ return 1
+ if(slot_l_store)
+ if(H.l_store)
+ return 0
+ if(!H.w_uniform)
+ if(!disable_warning)
+ H << "\red You need a jumpsuit before you can attach this [name]."
+ return 0
+ if(slot_flags & SLOT_DENYPOCKET)
+ return
+ if( w_class <= 2 || (slot_flags & SLOT_POCKET) )
+ return 1
+ if(slot_r_store)
+ if(H.r_store)
+ return 0
+ if(!H.w_uniform)
+ if(!disable_warning)
+ H << "\red You need a jumpsuit before you can attach this [name]."
+ return 0
+ if(slot_flags & SLOT_DENYPOCKET)
+ return 0
+ if( w_class <= 2 || (slot_flags & SLOT_POCKET) )
+ return 1
+ return 0
+ if(slot_s_store)
+ if(H.s_store)
+ return 0
+ if(!H.wear_suit)
+ if(!disable_warning)
+ H << "\red You need a suit before you can attach this [name]."
+ return 0
+ if(!H.wear_suit.allowed)
+ if(!disable_warning)
+ usr << "You somehow have a suit with no defined allowed items for suit storage, stop that."
+ return 0
+ if( istype(src, /obj/item/device/pda) || istype(src, /obj/item/weapon/pen) || is_type_in_list(src, H.wear_suit.allowed) )
+ return 1
+ return 0
+ if(slot_handcuffed)
+ if(H.handcuffed)
+ return 0
+ if(!istype(src, /obj/item/weapon/handcuffs))
+ return 0
+ return 1
+ if(slot_legcuffed)
+ if(H.legcuffed)
+ return 0
+ if(!istype(src, /obj/item/weapon/legcuffs))
+ return 0
+ return 1
+ if(slot_in_backpack)
+ if (H.back && istype(H.back, /obj/item/weapon/storage/backpack))
+ var/obj/item/weapon/storage/backpack/B = H.back
+ if(B.contents.len < B.storage_slots && w_class <= B.max_w_class)
+ return 1
+ return 0
+ return 0 //Unsupported slot
+ //END HUMAN
+
+ else if(ismonkey(M))
+ //START MONKEY
+ var/mob/living/carbon/monkey/MO = M
+ switch(slot)
+ if(slot_l_hand)
+ if(MO.l_hand)
+ return 0
+ return 1
+ if(slot_r_hand)
+ if(MO.r_hand)
+ return 0
+ return 1
+ if(slot_wear_mask)
+ if(MO.wear_mask)
+ return 0
+ if( !(slot_flags & SLOT_MASK) )
+ return 0
+ return 1
+ if(slot_back)
+ if(MO.back)
+ return 0
+ if( !(slot_flags & SLOT_BACK) )
+ return 0
+ return 1
+ return 0 //Unsupported slot
+
+ //END MONKEY
+
/obj/item/verb/verb_pickup()
- set src in view(1)
+ set src in oview(1)
set category = "Object"
- set name = "Pickup"
+ set name = "Pick up"
- if(!(usr))
+ if(!usr.canmove || usr.stat || usr.restrained() || !in_range(src, usr))
return
- if((!istype(usr, /mob/living/carbon)) || (istype(usr, /mob/living/carbon/brain)))//Is humanoid, and is not a brain
- usr << "\red You can't pick things up!"
- return
- if( usr.stat || usr.restrained() )//Is not asleep/dead and is not restrained
- usr << "\red You can't pick things up!"
- return
- if(src.anchored) //Object isn't anchored
- usr << "\red You can't pick that up!"
- return
- if(!usr.hand && usr.r_hand) //Right hand is not full
- usr << "\red Your right hand is full."
- return
- if(usr.hand && usr.l_hand) //Left hand is not full
- usr << "\red Your left hand is full."
- return
- if(!istype(src.loc, /turf)) //Object is on a turf
- usr << "\red You can't pick that up!"
- return
- //All checks are done, time to pick it up!
- if(istype(usr, /mob/living/carbon/human))
- src.attack_hand(usr)
- if(istype(usr, /mob/living/carbon/alien))
- src.attack_alien(usr)
- if(istype(usr, /mob/living/carbon/monkey))
- src.attack_paw(usr)
- return
+
+ if(ishuman(usr))
+ if(usr.get_active_hand() == null)
+ src.Click() // Let me know if this has any problems -Giacom
+ /*
+ if(usr.get_active_hand() == null)
+ src.attack_hand(usr)
+ else
+ usr << "\red You already have something in your hand."
+ */
+ else
+ usr << "\red This mob type can't use this verb."
+
+//This proc is executed when someone clicks the on-screen UI button. To make the UI button show, set the 'icon_action_button' to the icon_state of the image of the button in screen1_action.dmi
+//The default action is attack_self().
+//Checks before we get to here are: mob is alive, mob is not restrained, paralyzed, asleep, resting, laying, item is on the mob.
+/obj/item/proc/ui_action_click()
+ if( src in usr )
+ attack_self(usr)
/obj/item/device
- icon = 'device.dmi'
+ icon = 'icons/obj/device.dmi'
/obj/item/device/infra_sensor
name = "Infrared Sensor"
@@ -520,7 +669,7 @@
/obj/item/device/multitool
name = "multitool"
- desc = "Used for pulsing wires to test which to cut."
+ desc = "Used for pulsing wires to test which to cut. Not recommended by doctors."
icon_state = "multitool"
flags = FPRINT | TABLEPASS| CONDUCT
force = 5.0
@@ -528,46 +677,29 @@
throwforce = 5.0
throw_range = 15
throw_speed = 3
+ desc = "You can use this on airlocks or APCs to try to hack them without cutting wires."
m_amt = 50
g_amt = 20
origin_tech = "magnets=1;engineering=1"
var/obj/machinery/telecomms/buffer // simple machine buffer for device linkage
-/obj/item/device/hacktool
- name = "modifed door debugger"
- icon_state = "hacktool"
- flags = FPRINT | TABLEPASS | CONDUCT
- var/in_use = 0
- force = 5.0
- w_class = 2.0
- throwforce = 5.0
- throw_range = 15
- throw_speed = 3
- desc = "An item of dubious origins, with wires and antennas protruding out of it."
- m_amt = 60
- g_amt = 20
-
-/obj/item/device/hacktool/engineer
- name = "door debugger"
- desc = "An item of immense complexion, it appears to work by magic."
- icon_state = "hacktool-g"
-
/obj/item/blueprints
name = "station blueprints"
desc = "Blueprints of the station. There's stamp \"Classified\" and several coffee stains on it."
- icon = 'items.dmi'
+ icon = 'icons/obj/items.dmi'
icon_state = "blueprints"
+ attack_verb = list("attacked", "bapped", "hit")
/obj/item/apc_frame
name = "APC frame"
desc = "Used for repairing or building APCs"
- icon = 'apc_repair.dmi'
+ icon = 'icons/obj/apc_repair.dmi'
icon_state = "apc_frame"
flags = FPRINT | TABLEPASS| CONDUCT
/obj/effect/landmark
name = "landmark"
- icon = 'screen1.dmi'
+ icon = 'icons/mob/screen1.dmi'
icon_state = "x2"
anchored = 1.0
unacidable = 1
@@ -578,14 +710,14 @@
/obj/effect/laser
name = "laser"
desc = "IT BURNS!!!"
- icon = 'projectiles.dmi'
+ icon = 'icons/obj/projectiles.dmi'
var/damage = 0.0
var/range = 10.0
/obj/structure/lattice
desc = "A lightweight support lattice."
name = "lattice"
- icon = 'structures.dmi'
+ icon = 'icons/obj/structures.dmi'
icon_state = "latticefull"
density = 0
anchored = 1.0
@@ -599,7 +731,7 @@
for(var/obj/structure/lattice/LAT in src.loc)
if(LAT != src)
del(LAT)
- icon = 'smoothlattice.dmi'
+ icon = 'icons/obj/smoothlattice.dmi'
icon_state = "latticeblank"
updateOverlays()
for (var/dir in cardinal)
@@ -669,7 +801,7 @@
/obj/structure/m_tray
name = "morgue tray"
desc = "Apply corpse before closing."
- icon = 'stationobjs.dmi'
+ icon = 'icons/obj/stationobjs.dmi'
icon_state = "morguet"
density = 1
layer = 2.0
@@ -679,7 +811,7 @@
/obj/structure/c_tray
name = "crematorium tray"
desc = "Apply body before burning."
- icon = 'stationobjs.dmi'
+ icon = 'icons/obj/stationobjs.dmi'
icon_state = "cremat"
density = 1
layer = 2.0
@@ -695,8 +827,8 @@
anchored =1
var/netnum = 0
name = "power cable"
- desc = "A flexible superconducting cable for heavy-duty power transfer."
- icon = 'power_cond_red.dmi'
+ desc = "A flexible superconducting cable for heavy-duty power transfer"
+ icon = 'icons/obj/power_cond_red.dmi'
icon_state = "0-1"
var/d1 = 0
var/d2 = 1
@@ -706,42 +838,42 @@
/obj/structure/cable/yellow
color="yellow"
- icon = 'power_cond_yellow.dmi'
+ icon = 'icons/obj/power_cond_yellow.dmi'
/obj/structure/cable/green
color="green"
- icon = 'power_cond_green.dmi'
+ icon = 'icons/obj/power_cond_green.dmi'
/obj/structure/cable/blue
color="blue"
- icon = 'power_cond_blue.dmi'
+ icon = 'icons/obj/power_cond_blue.dmi'
/obj/structure/cable/pink
color="pink"
- icon = 'power_cond_pink.dmi'
+ icon = 'icons/obj/power_cond_pink.dmi'
/obj/structure/cable/orange
color="orange"
- icon = 'power_cond_orange.dmi'
+ icon = 'icons/obj/power_cond_orange.dmi'
/obj/structure/cable/cyan
color="cyan"
- icon = 'power_cond_cyan.dmi'
+ icon = 'icons/obj/power_cond_cyan.dmi'
/obj/structure/cable/white
color="white"
- icon = 'power_cond_white.dmi'
+ icon = 'icons/obj/power_cond_white.dmi'
/obj/effect/manifest
name = "manifest"
- icon = 'screen1.dmi'
+ icon = 'icons/mob/screen1.dmi'
icon_state = "x"
unacidable = 1//Just to be sure.
/obj/structure/morgue
name = "morgue"
- desc = "Used to keep bodies in until someone fetches them."
- icon = 'stationobjs.dmi'
+ desc = "Used to keep bodies in untill someone fetches them."
+ icon = 'icons/obj/stationobjs.dmi'
icon_state = "morgue1"
density = 1
var/obj/structure/m_tray/connected = null
@@ -749,8 +881,8 @@
/obj/structure/crematorium
name = "crematorium"
- desc = "An incinerator."
- icon = 'stationobjs.dmi'
+ desc = "A human incinerator. Works well on barbeque nights."
+ icon = 'icons/obj/stationobjs.dmi'
icon_state = "crema1"
density = 1
var/obj/structure/c_tray/connected = null
@@ -761,11 +893,11 @@
/obj/effect/mine
name = "Mine"
- desc = "I'd better stay away from that thing."
+ desc = "I Better stay away from that thing."
density = 1
anchored = 1
layer = 3
- icon = 'weapons.dmi'
+ icon = 'icons/obj/weapons.dmi'
icon_state = "uglymine"
var/triggerproc = "explode" //name of the proc thats called when the mine is triggered
var/triggered = 0
@@ -802,7 +934,7 @@
/obj/effect/overlay/beam//Not actually a projectile, just an effect.
name="beam"
- icon='beam.dmi'
+ icon='icons/effects/beam.dmi'
icon_state="b_beam"
var/tmp/atom/BeamSource
New()
@@ -811,8 +943,8 @@
/obj/effect/portal
name = "portal"
- desc = "Looks unstable."
- icon = 'stationobjs.dmi'
+ desc = "Looks unstable. Best to test it with the clown."
+ icon = 'icons/obj/stationobjs.dmi'
icon_state = "portal"
density = 1
unacidable = 1//Can't destroy energy portals.
@@ -829,11 +961,12 @@
/obj/structure/rack
name = "rack"
desc = "Different from the Middle Ages version."
- icon = 'objects.dmi'
+ icon = 'icons/obj/objects.dmi'
icon_state = "rack"
density = 1
flags = FPRINT
anchored = 1.0
+ throwpass = 1 //You can throw objects over this, despite it's density.
/obj/effect/shut_controller
name = "shut controller"
@@ -842,15 +975,16 @@
/obj/effect/landmark/start
name = "start"
- icon = 'screen1.dmi'
+ icon = 'icons/mob/screen1.dmi'
icon_state = "x"
anchored = 1.0
/obj/structure/stool
name = "stool"
desc = "Apply butt."
- icon = 'objects.dmi'
+ icon = 'icons/obj/objects.dmi'
icon_state = "stool"
+ anchored = 1.0
flags = FPRINT
pressure_resistance = 3*ONE_ATMOSPHERE
@@ -859,19 +993,33 @@
desc = "This is used to lie in, sleep in or strap on."
icon_state = "bed"
var/mob/living/buckled_mob
- anchored = 1.0
/obj/structure/stool/bed/alien
- name = "Resting contraption"
+ name = "resting contraption"
desc = "This looks similar to contraptions from earth. Could aliens be stealing our technology?"
icon_state = "abed"
+/obj/structure/stool/bed/nest
+ name = "alien nest"
+ desc = "It's a gruesome pile of thick, sticky resin shaped like a nest."
+ icon = 'icons/mob/alien.dmi'
+ icon_state = "nest"
+ var/health = 100
/obj/structure/stool/bed/chair //YES, chairs are a type of bed, which are a type of stool. This works, believe me. -Pete
name = "chair"
desc = "You sit in this. Either by will or force."
icon_state = "chair"
- anchored = 0
+
+/obj/structure/stool/bed/chair/wood/normal
+ icon_state = "wooden_chair"
+ name = "wooden chair"
+ desc = "Old is never too old to not be in fashion."
+
+/obj/structure/stool/bed/chair/wood/wings
+ icon_state = "wooden_chair_wings"
+ name = "wooden chair"
+ desc = "Old is never too old to not be in fashion."
/obj/structure/stool/bed/chair/comfy
name = "comfy chair"
@@ -897,10 +1045,7 @@
/obj/structure/stool/bed/chair/office/Move()
..()
- if(buckled_mob)
- if(buckled_mob.buckled == src)
- buckled_mob.loc = src.loc
- buckled_mob.dir = src.dir
+ handle_rotation()
/obj/structure/stool/bed/chair/office/light
icon_state = "officechair_white"
@@ -911,214 +1056,200 @@
/obj/structure/table
name = "table"
desc = "A square piece of metal standing on four metal legs. It can not move."
- icon = 'structures.dmi'
+ icon = 'icons/obj/structures.dmi'
icon_state = "table"
density = 1
anchored = 1.0
layer = 2.8
- var/dented = 0
-
- New()
- ..()
- for(var/obj/structure/table/T in src.loc)
- if(T != src)
- del(T)
- update_icon()
- for(var/direction in list(1,2,4,8,5,6,9,10))
- if(locate(/obj/structure/table,get_step(src,direction)))
- var/obj/structure/table/T = locate(/obj/structure/table,get_step(src,direction))
- T.update_icon()
-
- Del()
- for(var/direction in list(1,2,4,8,5,6,9,10))
- if(locate(/obj/structure/table,get_step(src,direction)))
- var/obj/structure/table/T = locate(/obj/structure/table,get_step(src,direction))
- T.update_icon()
- ..()
+ throwpass = 1 //You can throw objects over this, despite it's density.")
+/obj/structure/table/New()
+ ..()
+ for(var/obj/structure/table/T in src.loc)
+ if(T != src)
+ del(T)
update_icon()
- spawn(2) //So it properly updates when deleting
- var/dir_sum = 0
- for(var/direction in list(1,2,4,8,5,6,9,10))
- var/skip_sum = 0
- for(var/obj/structure/window/W in src.loc)
- if(W.dir == direction) //So smooth tables don't go smooth through windows
- skip_sum = 1
- continue
- var/inv_direction //inverse direction
- switch(direction)
- if(1)
- inv_direction = 2
- if(2)
- inv_direction = 1
- if(4)
- inv_direction = 8
- if(8)
- inv_direction = 4
- if(5)
- inv_direction = 10
- if(6)
- inv_direction = 9
- if(9)
- inv_direction = 6
- if(10)
- inv_direction = 5
- for(var/obj/structure/window/W in get_step(src,direction))
- if(W.dir == inv_direction) //So smooth tables don't go smooth through windows when the window is on the other table's tile
- skip_sum = 1
- continue
- if(!skip_sum) //means there is a window between the two tiles in this direction
- if(locate(/obj/structure/table,get_step(src,direction)))
- if(direction <5)
- dir_sum += direction
- else
- if(direction == 5) //This permits the use of all table directions. (Set up so clockwise around the central table is a higher value, from north)
- dir_sum += 16
- if(direction == 6)
- dir_sum += 32
- if(direction == 8) //Aherp and Aderp. Jezes I am stupid. -- SkyMarshal
- dir_sum += 8
- if(direction == 10)
- dir_sum += 64
- if(direction == 9)
- dir_sum += 128
+ for(var/direction in list(1,2,4,8,5,6,9,10))
+ if(locate(/obj/structure/table,get_step(src,direction)))
+ var/obj/structure/table/T = locate(/obj/structure/table,get_step(src,direction))
+ T.update_icon()
- //dir_sum%16:
- // 1,2,4,8 = endtable
- // 3,12 = streight 1 tile thick table
- // 5,6,9,10 = corner, if it finds a table in get_step(src,dir_sum) then it's a full corner table, else it's a 1 tile chick corner table
- // 7,11,13,14 = three way intersection = full side table piece (north ,south, east or west)
- // 15 = four way intersection = center (aka middle) table piece
- //
- //table_type:
- // 0 = stand-alone table
- // 1 = end table (1 tile thick, 1 connection)
- // 2 = 1 tile thick table (1 tile thick, 2 connections)
- // 3 = full table (full, 3 connections)
- // 4 = middle table (full, 4 connections)
+/obj/structure/table/Del()
+ for(var/direction in list(1,2,4,8,5,6,9,10))
+ if(locate(/obj/structure/table,get_step(src,direction)))
+ var/obj/structure/table/T = locate(/obj/structure/table,get_step(src,direction))
+ T.update_icon()
+ ..()
- var/table_type = 0 //stand_alone table
- if(dir_sum%16 in cardinal)
- table_type = 1 //endtable
- dir_sum %= 16
- if(dir_sum%16 in list(3,12))
- table_type = 2 //1 tile thick, streight table
- if(dir_sum%16 == 3) //3 doesn't exist as a dir
- dir_sum = 2
- if(dir_sum%16 == 12) //12 doesn't exist as a dir.
- dir_sum = 4
- if(dir_sum%16 in list(5,6,9,10))
- if(locate(/obj/structure/table,get_step(src.loc,dir_sum%16)))
- table_type = 3 //full table (not the 1 tile thick one, but one of the 'tabledir' tables)
- else
- table_type = 2 //1 tile thick, corner table (treated the same as streight tables in code later on)
- dir_sum %= 16
- if(dir_sum%16 in list(13,14,7,11)) //Three-way intersection
- table_type = 5 //full table as three-way intersections are not sprited, would require 64 sprites to handle all combinations. TOO BAD -- SkyMarshal
- switch(dir_sum%16) //Begin computation of the special type tables. --SkyMarshal
- if(7)
- if(dir_sum == 23)
- table_type = 6
- dir_sum = 8
- else if(dir_sum == 39)
- dir_sum = 4
- table_type = 6
- else if(dir_sum == 55 || dir_sum == 119 || dir_sum == 247 || dir_sum == 183)
- dir_sum = 4
- table_type = 3
- else
- dir_sum = 4
- if(11)
- if(dir_sum == 75)
- dir_sum = 5
- table_type = 6
- else if(dir_sum == 139)
- dir_sum = 9
- table_type = 6
- else if(dir_sum == 203 || dir_sum == 219 || dir_sum == 251 || dir_sum == 235)
- dir_sum = 8
- table_type = 3
- else
- dir_sum = 8
- if(13)
- if(dir_sum == 29)
- dir_sum = 10
- table_type = 6
- else if(dir_sum == 141)
- dir_sum = 6
- table_type = 6
- else if(dir_sum == 189 || dir_sum == 221 || dir_sum == 253 || dir_sum == 157)
- dir_sum = 1
- table_type = 3
- else
- dir_sum = 1
- if(14)
- if(dir_sum == 46)
- dir_sum = 1
- table_type = 6
- else if(dir_sum == 78)
- dir_sum = 2
- table_type = 6
- else if(dir_sum == 110 || dir_sum == 254 || dir_sum == 238 || dir_sum == 126)
- dir_sum = 2
- table_type = 3
- else
- dir_sum = 2 //These translate the dir_sum to the correct dirs from the 'tabledir' icon_state.
- if(dir_sum%16 == 15)
- table_type = 4 //4-way intersection, the 'middle' table sprites will be used.
+/obj/structure/table/update_icon()
+ spawn(2) //So it properly updates when deleting
+ var/dir_sum = 0
+ for(var/direction in list(1,2,4,8,5,6,9,10))
+ var/skip_sum = 0
+ for(var/obj/structure/window/W in src.loc)
+ if(W.dir == direction) //So smooth tables don't go smooth through windows
+ skip_sum = 1
+ continue
+ var/inv_direction //inverse direction
+ switch(direction)
+ if(1)
+ inv_direction = 2
+ if(2)
+ inv_direction = 1
+ if(4)
+ inv_direction = 8
+ if(8)
+ inv_direction = 4
+ if(5)
+ inv_direction = 10
+ if(6)
+ inv_direction = 9
+ if(9)
+ inv_direction = 6
+ if(10)
+ inv_direction = 5
+ for(var/obj/structure/window/W in get_step(src,direction))
+ if(W.dir == inv_direction) //So smooth tables don't go smooth through windows when the window is on the other table's tile
+ skip_sum = 1
+ continue
+ if(!skip_sum) //means there is a window between the two tiles in this direction
+ if(locate(/obj/structure/table,get_step(src,direction)))
+ if(direction <5)
+ dir_sum += direction
+ else
+ if(direction == 5) //This permits the use of all table directions. (Set up so clockwise around the central table is a higher value, from north)
+ dir_sum += 16
+ if(direction == 6)
+ dir_sum += 32
+ if(direction == 8) //Aherp and Aderp. Jezes I am stupid. -- SkyMarshal
+ dir_sum += 8
+ if(direction == 10)
+ dir_sum += 64
+ if(direction == 9)
+ dir_sum += 128
- if(istype(src,/obj/structure/table/reinforced))
- switch(table_type)
- if(0)
- icon_state = "reinf_table"
- if(1)
- icon_state = "reinf_1tileendtable"
- if(2)
- icon_state = "reinf_1tilethick"
- if(3)
- icon_state = "reinf_tabledir"
- if(4)
- icon_state = "reinf_middle"
- if(5)
- icon_state = "reinf_tabledir2"
- if(6)
- icon_state = "reinf_tabledir3"
- else if(istype(src,/obj/structure/table/woodentable))
- switch(table_type)
- if(0)
- icon_state = "wood_table"
- if(1)
- icon_state = "wood_1tileendtable"
- if(2)
- icon_state = "wood_1tilethick"
- if(3)
- icon_state = "wood_tabledir"
- if(4)
- icon_state = "wood_middle"
- if(5)
- icon_state = "wood_tabledir2"
- if(6)
- icon_state = "wood_tabledir3"
+ var/table_type = 0 //stand_alone table
+ if(dir_sum%16 in cardinal)
+ table_type = 1 //endtable
+ dir_sum %= 16
+ if(dir_sum%16 in list(3,12))
+ table_type = 2 //1 tile thick, streight table
+ if(dir_sum%16 == 3) //3 doesn't exist as a dir
+ dir_sum = 2
+ if(dir_sum%16 == 12) //12 doesn't exist as a dir.
+ dir_sum = 4
+ if(dir_sum%16 in list(5,6,9,10))
+ if(locate(/obj/structure/table,get_step(src.loc,dir_sum%16)))
+ table_type = 3 //full table (not the 1 tile thick one, but one of the 'tabledir' tables)
else
- switch(table_type)
- if(0)
- icon_state = "table"
- if(1)
- icon_state = "table_1tileendtable"
- if(2)
- icon_state = "table_1tilethick"
- if(3)
- icon_state = "tabledir"
- if(4)
- icon_state = "table_middle"
- if(5)
- icon_state = "tabledir2"
- if(6)
- icon_state = "tabledir3"
- if (dir_sum in list(1,2,4,8,5,6,9,10))
- dir = dir_sum
- else
- dir = 2
+ table_type = 2 //1 tile thick, corner table (treated the same as streight tables in code later on)
+ dir_sum %= 16
+ if(dir_sum%16 in list(13,14,7,11)) //Three-way intersection
+ table_type = 5 //full table as three-way intersections are not sprited, would require 64 sprites to handle all combinations. TOO BAD -- SkyMarshal
+ switch(dir_sum%16) //Begin computation of the special type tables. --SkyMarshal
+ if(7)
+ if(dir_sum == 23)
+ table_type = 6
+ dir_sum = 8
+ else if(dir_sum == 39)
+ dir_sum = 4
+ table_type = 6
+ else if(dir_sum == 55 || dir_sum == 119 || dir_sum == 247 || dir_sum == 183)
+ dir_sum = 4
+ table_type = 3
+ else
+ dir_sum = 4
+ if(11)
+ if(dir_sum == 75)
+ dir_sum = 5
+ table_type = 6
+ else if(dir_sum == 139)
+ dir_sum = 9
+ table_type = 6
+ else if(dir_sum == 203 || dir_sum == 219 || dir_sum == 251 || dir_sum == 235)
+ dir_sum = 8
+ table_type = 3
+ else
+ dir_sum = 8
+ if(13)
+ if(dir_sum == 29)
+ dir_sum = 10
+ table_type = 6
+ else if(dir_sum == 141)
+ dir_sum = 6
+ table_type = 6
+ else if(dir_sum == 189 || dir_sum == 221 || dir_sum == 253 || dir_sum == 157)
+ dir_sum = 1
+ table_type = 3
+ else
+ dir_sum = 1
+ if(14)
+ if(dir_sum == 46)
+ dir_sum = 1
+ table_type = 6
+ else if(dir_sum == 78)
+ dir_sum = 2
+ table_type = 6
+ else if(dir_sum == 110 || dir_sum == 254 || dir_sum == 238 || dir_sum == 126)
+ dir_sum = 2
+ table_type = 3
+ else
+ dir_sum = 2 //These translate the dir_sum to the correct dirs from the 'tabledir' icon_state.
+ if(dir_sum%16 == 15)
+ table_type = 4 //4-way intersection, the 'middle' table sprites will be used.
+
+ if(istype(src,/obj/structure/table/reinforced))
+ switch(table_type)
+ if(0)
+ icon_state = "reinf_table"
+ if(1)
+ icon_state = "reinf_1tileendtable"
+ if(2)
+ icon_state = "reinf_1tilethick"
+ if(3)
+ icon_state = "reinf_tabledir"
+ if(4)
+ icon_state = "reinf_middle"
+ if(5)
+ icon_state = "reinf_tabledir2"
+ if(6)
+ icon_state = "reinf_tabledir3"
+ else if(istype(src,/obj/structure/table/woodentable))
+ switch(table_type)
+ if(0)
+ icon_state = "wood_table"
+ if(1)
+ icon_state = "wood_1tileendtable"
+ if(2)
+ icon_state = "wood_1tilethick"
+ if(3)
+ icon_state = "wood_tabledir"
+ if(4)
+ icon_state = "wood_middle"
+ if(5)
+ icon_state = "wood_tabledir2"
+ if(6)
+ icon_state = "wood_tabledir3"
+ else
+ switch(table_type)
+ if(0)
+ icon_state = "table"
+ if(1)
+ icon_state = "table_1tileendtable"
+ if(2)
+ icon_state = "table_1tilethick"
+ if(3)
+ icon_state = "tabledir"
+ if(4)
+ icon_state = "table_middle"
+ if(5)
+ icon_state = "tabledir2"
+ if(6)
+ icon_state = "tabledir3"
+ if (dir_sum in list(1,2,4,8,5,6,9,10))
+ dir = dir_sum
+ else
+ dir = 2
/obj/structure/table/reinforced
name = "reinforced table"
@@ -1134,7 +1265,7 @@
/obj/structure/mopbucket
desc = "Fill it with water, but don't forget a mop!"
name = "mop bucket"
- icon = 'janitor.dmi'
+ icon = 'icons/obj/janitor.dmi'
icon_state = "mopbucket"
density = 1
flags = FPRINT
@@ -1144,7 +1275,7 @@
/obj/structure/kitchenspike
name = "a meat spike"
- icon = 'kitchen.dmi'
+ icon = 'icons/obj/kitchen.dmi'
icon_state = "spike"
desc = "A spike for collecting meat from animals"
density = 1
@@ -1155,7 +1286,7 @@
/obj/structure/displaycase
name = "Display Case"
- icon = 'stationobjs.dmi'
+ icon = 'icons/obj/stationobjs.dmi'
icon_state = "glassbox1"
desc = "A display case for prized possessions. It taunts you to kick it."
density = 1
@@ -1167,7 +1298,7 @@
/obj/effect/showcase
name = "Showcase"
- icon = 'stationobjs.dmi'
+ icon = 'icons/obj/stationobjs.dmi'
icon_state = "showcase_1"
desc = "A stand with the empty body of a cyborg bolted to it."
density = 1
@@ -1177,8 +1308,8 @@
//BEGIN BRAINS=====================================================
/obj/item/brain
name = "brain"
- desc = "A piece of complex biomass found in a persons head."
- icon = 'surgery.dmi'
+ desc = "A piece of juicy meat found in a persons head."
+ icon = 'icons/obj/surgery.dmi'
icon_state = "brain2"
flags = TABLEPASS
force = 1.0
@@ -1187,6 +1318,7 @@
throw_speed = 3
throw_range = 5
origin_tech = "biotech=3"
+ attack_verb = list("attacked", "slapped", "whacked")
var/mob/living/carbon/brain/brainmob = null
@@ -1219,7 +1351,7 @@
/obj/item/metroid_core
name = "metroid core"
desc = "A very slimy and tender part of a Metroid. They also legend to have \"magical powers\"."
- icon = 'surgery.dmi'
+ icon = 'icons/obj/surgery.dmi'
icon_state = "metroid core"
flags = TABLEPASS
force = 1.0
@@ -1258,7 +1390,7 @@
/obj/structure/noticeboard
name = "Notice Board"
- icon = 'stationobjs.dmi'
+ icon = 'icons/obj/stationobjs.dmi'
icon_state = "nboard00"
flags = FPRINT
desc = "A board for pinning important notices upon."
@@ -1268,9 +1400,9 @@
/obj/effect/deskclutter
name = "desk clutter"
- icon = 'items.dmi'
+ icon = 'icons/obj/items.dmi'
icon_state = "deskclutter"
- desc = "Some clutter the desk has accumulated over the years..."
+ desc = "Some clutter the detective has accumalated over the years..."
anchored = 1
/obj/item/mouse_drag_pointer = MOUSE_ACTIVE_POINTER
@@ -1279,7 +1411,7 @@
/obj/item/weapon/glass
name = "empty glass"
desc = "Emptysville."
- icon = 'kitchen.dmi'
+ icon = 'icons/obj/kitchen.dmi'
icon_state = "glass_empty"
item_state = "beaker"
flags = FPRINT | TABLEPASS | OPENCONTAINER
@@ -1312,7 +1444,7 @@
/obj/structure/falsewall
name = "wall"
desc = "A huge chunk of metal used to seperate rooms."
- icon = 'walls.dmi'
+ icon = 'icons/turf/walls.dmi'
icon_state = ""
density = 1
opacity = 1
@@ -1361,7 +1493,7 @@
/obj/structure/falserwall
name = "r wall"
desc = "A huge chunk of reinforced metal used to seperate rooms."
- icon = 'walls.dmi'
+ icon = 'icons/turf/walls.dmi'
icon_state = "r_wall"
density = 1
opacity = 1
@@ -1369,12 +1501,12 @@
/obj/item/stack
var/singular_name
- var/amount = 1.0
+ var/amount = 1
var/max_amount //also see stack recipes initialisation, param "max_res_amount" must be equal to this max_amount
/obj/item/stack/rods
name = "metal rods"
- desc = "Some rods. Can be used for building."
+ desc = "Some rods. Can be used for building, or something."
singular_name = "metal rod"
icon_state = "rods"
flags = FPRINT | TABLEPASS| CONDUCT
@@ -1385,6 +1517,7 @@
throw_range = 20
m_amt = 1875
max_amount = 60
+ attack_verb = list("hit", "bludgeoned", "whacked")
/obj/item/stack/sheet
name = "sheet"
@@ -1398,17 +1531,28 @@
max_amount = 50
throw_speed = 3
throw_range = 3
+ attack_verb = list("bashed", "battered", "bludgeoned", "thrashed", "smashed")
var/perunit = 3750
+/obj/item/stack/sheet/attackby(obj/item/weapon/W as obj, mob/user as mob)
+ if (istype(W, /obj/item/weapon/sheetsnatcher))
+ var/obj/item/weapon/sheetsnatcher/S = W
+ if(!S.mode)
+ S.add(src,user)
+ else
+ for (var/obj/item/stack/sheet/stack in locate(src.x,src.y,src.z))
+ S.add(stack,user)
+ ..()
+
/obj/item/stack/sheet/wood
- name = "Wood Planks"
+ name = "wooden planks"
desc = "One can only guess that this is a bunch of wood."
singular_name = "wood plank"
icon_state = "sheet-wood"
origin_tech = "materials=1;biotech=1"
/obj/item/stack/sheet/sandstone
- name = "Sandstone Bricks"
+ name = "sandstone bricks"
desc = "This appears to be a combination of both sand and stone."
singular_name = "sandstone brick"
icon_state = "sheet-sandstone"
@@ -1418,7 +1562,7 @@
/obj/item/stack/sheet/glass
name = "glass"
- desc = "That is a lot of glass."
+ desc = "HOLY HELL! That is a lot of glass."
singular_name = "glass sheet"
icon_state = "sheet-glass"
g_amt = 3750
@@ -1442,6 +1586,13 @@
g_amt = 0
m_amt = 0
+/obj/item/stack/sheet/cloth
+ name = "cloth"
+ desc = "This roll of cloth is made from only the finest chemicals and bunny rabbits."
+ singular_name = "cloth roll"
+ icon_state = "sheet-cloth"
+ origin_tech = "materials=2"
+
/obj/item/stack/sheet/metal
name = "metal"
@@ -1501,6 +1652,19 @@
max_amount = 60
origin_tech = "biotech=1"
+/obj/item/stack/tile/wood
+ name = "wood floor tiles"
+ singular_name = "wood floor tile"
+ desc = "an easy to fit wood floor tile"
+ icon_state = "tile-wood"
+ w_class = 3.0
+ force = 1.0
+ throwforce = 1.0
+ throw_speed = 5
+ throw_range = 20
+ flags = FPRINT | TABLEPASS | CONDUCT
+ max_amount = 60
+
/obj/item/stack/light_w
name = "wired glass tiles"
singular_name = "wired glass floor tile"
@@ -1522,19 +1686,19 @@
amount--
new/obj/item/stack/sheet/glass(user.loc)
if(amount <= 0)
- user.u_equip(src)
+ user.drop_from_inventory(src)
del(src)
if(istype(O,/obj/item/stack/sheet/metal))
var/obj/item/stack/sheet/metal/M = O
M.amount--
if(M.amount <= 0)
- user.u_equip(M)
+ user.drop_from_inventory(M)
del(M)
amount--
new/obj/item/stack/tile/light(user.loc)
if(amount <= 0)
- user.u_equip(src)
+ user.drop_from_inventory(src)
del(src)
/obj/item/stack/tile/light
@@ -1549,6 +1713,7 @@
throw_range = 20
flags = FPRINT | TABLEPASS | CONDUCT
max_amount = 60
+ attack_verb = list("bashed", "battered", "bludgeoned", "thrashed", "smashed")
var/on = 1
var/state //0 = fine, 1 = flickering, 2 = breaking, 3 = broken
@@ -1570,7 +1735,7 @@
amount--
new/obj/item/stack/light_w(user.loc)
if(amount <= 0)
- user.u_equip(src)
+ user.drop_from_inventory(src)
del(src)
/obj/item/stack/sheet/cardboard //BubbleWrap
@@ -1582,7 +1747,7 @@
origin_tech = "materials=1"
/obj/item/weapon/beach_ball
- icon = 'beach.dmi'
+ icon = 'icons/misc/beach.dmi'
icon_state = "ball"
name = "beach ball"
item_state = "beachball"
@@ -1605,11 +1770,5 @@
desc = "You can't resist."
// name = ""
-/obj/item/rubberduck
- name = "rubber duck"
- desc = "A rubber duck. Quack."
- icon = 'objects.dmi'
- icon_state = "rduck"
- item_state = "rduck"
- flags = FPRINT
- w_class = 1.0
+/obj/effect/spawner
+ name = "object spawner"
diff --git a/code/defines/obj/closet.dm b/code/defines/obj/closet.dm
index cd1f4b12c6..1e9d9c91d8 100644
--- a/code/defines/obj/closet.dm
+++ b/code/defines/obj/closet.dm
@@ -1,24 +1,19 @@
/obj/structure/closet
name = "closet"
desc = "It's a basic storage unit."
- icon = 'closet.dmi'
+ icon = 'icons/obj/closet.dmi'
icon_state = "closed"
density = 1
+ flags = FPRINT
var/icon_closed = "closed"
var/icon_opened = "open"
var/opened = 0
var/welded = 0
var/wall_mounted = 0 //never solid (You can always pass over it)
- flags = FPRINT
var/health = 100
var/lastbang
- var/lasttry = 0
- layer = 2.98
- var/quantity_max = 15
-
-/obj/structure/closet/detective
- name = "detective's closet"
- desc = "Holds the detective's clothes while his coat rack is being repaired."
+ var/storage_capacity = 20 //This is so that someone can't pack hundreds of items in a locker/crate
+ //then open it in a populated area to crash clients.
/obj/structure/closet/acloset
name = "strange closet"
@@ -34,10 +29,17 @@
icon_closed = "cabinet_closed"
icon_opened = "cabinet_open"
+/obj/structure/closet/cabinet/update_icon()
+ if(!opened)
+ icon_state = icon_closed
+ else
+ icon_state = icon_opened
+
+
/obj/effect/spresent
name = "strange present"
desc = "It's a ... present?"
- icon = 'items.dmi'
+ icon = 'icons/obj/items.dmi'
icon_state = "strangepresent"
density = 1
anchored = 0
@@ -64,6 +66,12 @@
icon_closed = "firecloset"
icon_opened = "fireclosetopen"
+/obj/structure/closet/firecloset/update_icon()
+ if(!opened)
+ icon_state = icon_closed
+ else
+ icon_state = icon_opened
+
/obj/structure/closet/hydrant //wall mounted fire closet
name = "fire-safety closet"
desc = "It's a storage unit for fire-fighting supplies."
@@ -84,6 +92,12 @@
density = 0
wall_mounted = 1
+/obj/structure/closet/medical_wall/update_icon()
+ if(!opened)
+ icon_state = icon_closed
+ else
+ icon_state = icon_opened
+
/obj/structure/closet/toolcloset
name = "tool closet"
desc = "It's a storage unit for tools."
@@ -104,12 +118,6 @@
icon_state = "mixed"
icon_closed = "mixed"
-/obj/structure/closet/jcloset2
- name = "cleaner's closet"
- desc = "It's a storage unit for various cleaning items."
- icon_state = "mixed"
- icon_closed = "mixed"
-
/obj/structure/closet/lawcloset
name = "legal closet"
desc = "It's a storage unit for courtroom apparel and items."
@@ -149,6 +157,12 @@
icon_closed = "coffin"
icon_opened = "coffin_open"
+/obj/structure/closet/coffin/update_icon()
+ if(!opened)
+ icon_state = icon_closed
+ else
+ icon_state = icon_opened
+
/obj/structure/closet/bombcloset
name = "\improper EOD closet"
desc = "It's a storage unit for explosion-protective suits."
@@ -259,7 +273,7 @@
/obj/structure/closet/wardrobe
name = "wardrobe"
- desc = "It's a storage unit for standard-issue NanoTrasen attire."
+ desc = "It's a storage unit for standard-issue Nanotrasen attire."
icon_state = "blue"
icon_closed = "blue"
@@ -270,7 +284,7 @@
/obj/structure/closet/wardrobe/chaplain_black
name = "chapel wardrobe"
- desc = "It's a storage unit for NanoTrasen-approved religious attire."
+ desc = "It's a storage unit for Nanotrasen-approved religious attire."
icon_state = "black"
icon_closed = "black"
@@ -286,7 +300,7 @@
/obj/structure/closet/wardrobe/orange
name = "prison wardrobe"
- desc = "It's a storage unit for NanoTrasen-regulation prisoner attire."
+ desc = "It's a storage unit for Nanotrasen-regulation prisoner attire."
icon_state = "orange"
icon_closed = "orange"
@@ -300,26 +314,16 @@
icon_state = "red"
icon_closed = "red"
-/obj/structure/closet/wardrobe/warden
- name = "Warden's wardrobe"
- icon_state = "red"
- icon_closed = "red"
-
-/obj/structure/closet/wardrobe/hos
- name = "Head of Security's wardrobe"
- icon_state = "red"
- icon_closed = "red"
-
-/obj/structure/closet/wardrobe/hop
- name = "Head of Personnel's wardrobe"
- icon_state = "blue"
- icon_closed = "blue"
-
/obj/structure/closet/wardrobe/white
name = "white wardrobe"
icon_state = "white"
icon_closed = "white"
+/obj/structure/closet/wardrobe/pjs
+ name = "Pajama wardrobe"
+ icon_state = "white"
+ icon_closed = "white"
+
/obj/structure/closet/wardrobe/toxins_white
name = "toxins wardrobe"
icon_state = "white"
@@ -330,11 +334,6 @@
icon_state = "black"
icon_closed = "black"
-/obj/structure/closet/wardrobe/medic_white
- name = "doctor's wardrobe"
- icon_state = "white"
- icon_closed = "white"
-
/obj/structure/closet/wardrobe/chemistry_white
name = "chemistry wardrobe"
icon_state = "white"
@@ -345,26 +344,6 @@
icon_state = "white"
icon_closed = "white"
-/obj/structure/closet/wardrobe/nurse
- name = "nurse's wardrobe"
- icon_state = "white"
- icon_closed = "white"
-
-/obj/structure/closet/wardrobe/cmo
- name = "Chief Medical Officer's wardrobe"
- icon_state = "white"
- icon_closed = "white"
-
-/obj/structure/closet/wardrobe/rd
- name = "Research Director's wardrobe"
- icon_state = "white"
- icon_closed = "white"
-
-/obj/structure/closet/wardrobe/scientist
- name = "scientist's wardrobe"
- icon_state = "white"
- icon_closed = "white"
-
/obj/structure/closet/wardrobe/virology_white
name = "virology wardrobe"
icon_state = "white"
@@ -380,11 +359,6 @@
icon_state = "yellow"
icon_closed = "yellow"
-/obj/structure/closet/wardrobe/robotics_yellow
- name = "robotics wardrobe"
- icon_state = "yellow"
- icon_closed = "yellow"
-
/obj/structure/closet/wardrobe/atmospherics_yellow
name = "atmospherics wardrobe"
icon_state = "yellow"
@@ -395,42 +369,10 @@
icon_state = "grey"
icon_closed = "grey"
-/obj/structure/closet/wardrobe/bartender_black
- name = "Bartender's wardrobe"
- icon_state = "black"
- icon_closed = "black"
-
-/obj/structure/closet/wardrobe/chef_white
- name = "Chef's wardrobe"
- icon_state = "white"
- icon_closed = "white"
-
-/obj/structure/closet/wardrobe/hydro_green
- name = "Hydroponics wardrobe"
- icon_state = "green"
- icon_closed = "green"
-
-/obj/structure/closet/wardrobe/librarian_red
- name = "Librarian's wardrobe"
- icon_state = "red"
- icon_closed = "red"
-
-/obj/structure/closet/wardrobe/cargo_yellow
- name = "Cargo Tech's wardrobe"
- icon_state = "yellow"
- icon_closed = "yellow"
-
-/obj/structure/closet/wardrobe/qm_yellow
- name = "Quartermaster's wardrobe"
- icon_state = "yellow"
- icon_closed = "yellow"
-
-
-
/obj/structure/closet/secure_closet
name = "secure locker"
desc = "It's an immobile card-locked storage unit."
- icon = 'closet.dmi'
+ icon = 'icons/obj/closet.dmi'
icon_state = "secure1"
density = 1
opened = 0
@@ -457,15 +399,24 @@
anchored = 1
density = 0
wall_mounted = 1
- req_access = list(ACCESS_MEDICAL)
+ req_access = list(access_medical)
+
+/obj/structure/closet/secure_closet/medical_wall/update_icon()
+ if(broken)
+ icon_state = icon_broken
+ else
+ if(!opened)
+ if(locked)
+ icon_state = icon_locked
+ else
+ icon_state = icon_closed
+ else
+ icon_state = icon_opened
/obj/structure/closet/secure_closet/personal
- desc = "It's a secure locker for personnel. The first card swiped gains control."
+ desc = "It's a secure locker for personell. The first card swiped gains control."
name = "personal closet"
-/obj/structure/closet/secure_closet/personal/patient
- name = "patient's closet"
-
/obj/structure/closet/secure_closet/personal/cabinet
icon_state = "cabinetdetective_locked"
icon_closed = "cabinetdetective"
@@ -474,47 +425,24 @@
icon_broken = "cabinetdetective_broken"
icon_off = "cabinetdetective_broken"
-/obj/structure/closet/secure_closet/kitchen
- name = "kitchen cabinet"
- req_access = list(ACCESS_KITCHEN)
-
-/obj/structure/closet/secure_closet/kitchen/mining
- req_access = list()
-
-/obj/structure/closet/secure_closet/meat
- name = "meat fridge"
- icon_state = "fridge1"
- icon_closed = "fridge"
- icon_locked = "fridge1"
- icon_opened = "fridgeopen"
- icon_broken = "fridgebroken"
- icon_off = "fridge1"
-
-/obj/structure/closet/secure_closet/fridge
- name = "refrigerator"
- icon_state = "fridge1"
- icon_closed = "fridge"
- icon_locked = "fridge1"
- icon_opened = "fridgeopen"
- icon_broken = "fridgebroken"
- icon_off = "fridge1"
-
-/obj/structure/closet/secure_closet/money_freezer
- name = "freezer"
- icon_state = "fridge1"
- icon_closed = "fridge"
- icon_locked = "fridge1"
- icon_opened = "fridgeopen"
- icon_broken = "fridgebroken"
- icon_off = "fridge1"
- req_access = list(ACCESS_HEADS_VAULT)
+/obj/structure/closet/secure_closet/personal/cabinet/update_icon()
+ if(broken)
+ icon_state = icon_broken
+ else
+ if(!opened)
+ if(locked)
+ icon_state = icon_locked
+ else
+ icon_state = icon_closed
+ else
+ icon_state = icon_opened
/obj/structure/closet/secure_closet/personal/patient
name = "patient's closet"
/obj/structure/closet/secure_closet/wall
name = "wall locker"
- req_access = list(ACCESS_SECURITY)
+ req_access = list(access_security)
icon_state = "wall-locker1"
density = 1
icon_closed = "wall-locker"
@@ -524,4 +452,23 @@
icon_off = "wall-lockeroff"
//too small to put a man in
- large = 0
\ No newline at end of file
+ large = 0
+
+/obj/structure/closet/secure_closet/wall/update_icon()
+ if(broken)
+ icon_state = icon_broken
+ else
+ if(!opened)
+ if(locked)
+ icon_state = icon_locked
+ else
+ icon_state = icon_closed
+ else
+ icon_state = icon_opened
+
+/obj/structure/closet/crate/critter
+ name = "critter crate"
+ desc = "A crate which can sustain life for a while."
+ icon_state = "critter"
+ icon_opened = "critteropen"
+ icon_closed = "critter"
\ No newline at end of file
diff --git a/code/modules/clothing/costume.dm b/code/defines/obj/clothing/costume.dm
similarity index 73%
rename from code/modules/clothing/costume.dm
rename to code/defines/obj/clothing/costume.dm
index edb854ee58..49bb4622b9 100644
--- a/code/modules/clothing/costume.dm
+++ b/code/defines/obj/clothing/costume.dm
@@ -20,7 +20,7 @@
/obj/effect/landmark/costume/madscientist/New()
new /obj/item/clothing/under/gimmick/rank/captain/suit(src.loc)
new /obj/item/clothing/head/flatcap(src.loc)
- new /obj/item/clothing/suit/storage/labcoat/mad(src.loc)
+ new /obj/item/clothing/suit/labcoat/mad(src.loc)
new /obj/item/clothing/glasses/gglasses(src.loc)
del(src)
@@ -44,7 +44,7 @@
del(src)
/obj/effect/landmark/costume/butler/New()
- new /obj/item/clothing/suit/storage/wcoat(src.loc)
+ new /obj/item/clothing/suit/wcoat(src.loc)
new /obj/item/clothing/under/suit_jacket(src.loc)
new /obj/item/clothing/head/that(src.loc)
del(src)
@@ -53,8 +53,8 @@
new /obj/item/clothing/gloves/white(src.loc)
new /obj/item/clothing/shoes/white(src.loc)
new /obj/item/clothing/under/scratch(src.loc)
-// if (prob(30))
-// new /obj/item/clothing/head/helmet/cueball(src.loc)
+ if (prob(30))
+ new /obj/item/clothing/head/cueball(src.loc)
del(src)
/obj/effect/landmark/costume/highlander/New()
@@ -63,9 +63,9 @@
del(src)
/obj/effect/landmark/costume/prig/New()
- new /obj/item/clothing/suit/storage/wcoat(src.loc)
+ new /obj/item/clothing/suit/wcoat(src.loc)
new /obj/item/clothing/glasses/monocle(src.loc)
- var/CHOICE= pick( /obj/item/clothing/head/bowlerhat, /obj/item/clothing/head/that)
+ var/CHOICE= pick( /obj/item/clothing/head/bowler, /obj/item/clothing/head/that)
new CHOICE(src.loc)
new /obj/item/clothing/shoes/black(src.loc)
new /obj/item/weapon/cane(src.loc)
@@ -87,7 +87,7 @@
new /obj/item/clothing/under/waiter(src.loc)
var/CHOICE= pick( /obj/item/clothing/head/kitty, /obj/item/clothing/head/rabbitears)
new CHOICE(src.loc)
- new /obj/item/clothing/suit/storage/apron(src.loc)
+ new /obj/item/clothing/suit/apron(src.loc)
del(src)
/obj/effect/landmark/costume/pirate/New()
@@ -102,15 +102,6 @@
new /obj/item/clothing/under/soviet(src.loc)
new /obj/item/clothing/head/ushanka(src.loc)
del(src)
-/*
-/obj/effect/landmark/costume/nurse/New()
- new /obj/item/clothing/under/rank/nursesuit(src.loc)
- new /obj/item/clothing/head/nursehat(src.loc)
- new /obj/item/clothing/glasses/regular(src.loc)
- new /obj/item/clothing/gloves/latex(src.loc)
- new /obj/item/clothing/mask/surgical(src.loc)
- del(src)*/
-
/obj/effect/landmark/costume/imperium_monk/New()
new /obj/item/clothing/suit/imperium_monk(src.loc)
@@ -122,18 +113,6 @@
new /obj/item/clothing/suit/holidaypriest(src.loc)
del(src)
-/*
-/obj/effect/landmark/costume/spiderman/New()
- new /obj/item/clothing/under/spiderman(src.loc)
- new /obj/item/clothing/mask/spiderman(src.loc)
- del(src)*/
-
-/*
-/obj/effect/landmark/costume/marisawizard/New()
- new /obj/item/clothing/head/wizard/marisa(src.loc)
- new/obj/item/clothing/suit/wizrobe/marisa(src.loc)
- del(src)*/
-
/obj/effect/landmark/costume/marisawizard/fake/New()
new /obj/item/clothing/head/wizard/marisa/fake(src.loc)
new/obj/item/clothing/suit/wizrobe/marisa/fake(src.loc)
@@ -154,20 +133,7 @@
new /obj/item/clothing/under/sexymime(src.loc)
del(src)
-
-/*
-/obj/effect/landmark/costume/cyborg/New()
- new /obj/item/clothing/mask/gas/cyborg(src.loc)
- new /obj/item/clothing/shoes/cyborg(src.loc)
- new /obj/item/clothing/suit/cyborg_suit(src.loc)
- new /obj/item/clothing/gloves/cyborg(src.loc)
-
- var/obj/item/weapon/card/id/W = new /obj/item/weapon/card/id(src.loc)
- var/name = "Cyborg"
- name += " [pick(rand(1, 999))]"
- W.name = "Fake Cyborg Card"
- W.access = list(ACCESS_THEATRE)
- W.assignment = "Kill all humans! Beep. Boop."
- W.registered_name = name
- del(src)
- */
\ No newline at end of file
+///obj/effect/landmark/costume/hidden/master/New()
+// var/list/templist = list()
+// templist += src
+// for(var/obj/effect/landmark/costume/hidden/H in z1
\ No newline at end of file
diff --git a/code/defines/obj/costume.dm b/code/defines/obj/costume.dm
new file mode 100644
index 0000000000..49bb4622b9
--- /dev/null
+++ b/code/defines/obj/costume.dm
@@ -0,0 +1,139 @@
+//Costume spawner
+
+/obj/effect/landmark/costume/New() //costume spawner, selects a random subclass and disappears
+
+ var/list/options = typesof(/obj/effect/landmark/costume)
+ var/PICK= options[rand(1,options.len)]
+ new PICK(src.loc)
+ del(src)
+
+//SUBCLASSES. Spawn a bunch of items and disappear likewise
+/obj/effect/landmark/costume/chicken/New()
+ new /obj/item/clothing/suit/chickensuit(src.loc)
+ del(src)
+
+/obj/effect/landmark/costume/gladiator/New()
+ new /obj/item/clothing/under/gladiator(src.loc)
+ new /obj/item/clothing/head/helmet/gladiator(src.loc)
+ del(src)
+
+/obj/effect/landmark/costume/madscientist/New()
+ new /obj/item/clothing/under/gimmick/rank/captain/suit(src.loc)
+ new /obj/item/clothing/head/flatcap(src.loc)
+ new /obj/item/clothing/suit/labcoat/mad(src.loc)
+ new /obj/item/clothing/glasses/gglasses(src.loc)
+ del(src)
+
+/obj/effect/landmark/costume/elpresidente/New()
+ new /obj/item/clothing/under/gimmick/rank/captain/suit(src.loc)
+ new /obj/item/clothing/head/flatcap(src.loc)
+ new /obj/item/clothing/mask/cigarette/cigar/havana(src.loc)
+ new /obj/item/clothing/shoes/jackboots(src.loc)
+ del(src)
+
+/obj/effect/landmark/costume/nyangirl/New()
+ new /obj/item/clothing/under/schoolgirl(src.loc)
+ new /obj/item/clothing/head/kitty(src.loc)
+ del(src)
+
+/obj/effect/landmark/costume/maid/New()
+ new /obj/item/clothing/under/blackskirt(src.loc)
+ var/CHOICE = pick( /obj/item/clothing/head/beret , /obj/item/clothing/head/rabbitears )
+ new CHOICE(src.loc)
+ new /obj/item/clothing/glasses/blindfold(src.loc)
+ del(src)
+
+/obj/effect/landmark/costume/butler/New()
+ new /obj/item/clothing/suit/wcoat(src.loc)
+ new /obj/item/clothing/under/suit_jacket(src.loc)
+ new /obj/item/clothing/head/that(src.loc)
+ del(src)
+
+/obj/effect/landmark/costume/scratch/New()
+ new /obj/item/clothing/gloves/white(src.loc)
+ new /obj/item/clothing/shoes/white(src.loc)
+ new /obj/item/clothing/under/scratch(src.loc)
+ if (prob(30))
+ new /obj/item/clothing/head/cueball(src.loc)
+ del(src)
+
+/obj/effect/landmark/costume/highlander/New()
+ new /obj/item/clothing/under/kilt(src.loc)
+ new /obj/item/clothing/head/beret(src.loc)
+ del(src)
+
+/obj/effect/landmark/costume/prig/New()
+ new /obj/item/clothing/suit/wcoat(src.loc)
+ new /obj/item/clothing/glasses/monocle(src.loc)
+ var/CHOICE= pick( /obj/item/clothing/head/bowler, /obj/item/clothing/head/that)
+ new CHOICE(src.loc)
+ new /obj/item/clothing/shoes/black(src.loc)
+ new /obj/item/weapon/cane(src.loc)
+ new /obj/item/clothing/under/sl_suit(src.loc)
+ new /obj/item/clothing/mask/fakemoustache(src.loc)
+ del(src)
+
+/obj/effect/landmark/costume/plaguedoctor/New()
+ new /obj/item/clothing/suit/bio_suit/plaguedoctorsuit(src.loc)
+ new /obj/item/clothing/head/plaguedoctorhat(src.loc)
+ del(src)
+
+/obj/effect/landmark/costume/nightowl/New()
+ new /obj/item/clothing/under/owl(src.loc)
+ new /obj/item/clothing/mask/owl_mask(src.loc)
+ del(src)
+
+/obj/effect/landmark/costume/waiter/New()
+ new /obj/item/clothing/under/waiter(src.loc)
+ var/CHOICE= pick( /obj/item/clothing/head/kitty, /obj/item/clothing/head/rabbitears)
+ new CHOICE(src.loc)
+ new /obj/item/clothing/suit/apron(src.loc)
+ del(src)
+
+/obj/effect/landmark/costume/pirate/New()
+ new /obj/item/clothing/under/pirate(src.loc)
+ new /obj/item/clothing/suit/pirate(src.loc)
+ var/CHOICE = pick( /obj/item/clothing/head/pirate , /obj/item/clothing/head/bandana )
+ new CHOICE(src.loc)
+ new /obj/item/clothing/glasses/eyepatch(src.loc)
+ del(src)
+
+/obj/effect/landmark/costume/commie/New()
+ new /obj/item/clothing/under/soviet(src.loc)
+ new /obj/item/clothing/head/ushanka(src.loc)
+ del(src)
+
+/obj/effect/landmark/costume/imperium_monk/New()
+ new /obj/item/clothing/suit/imperium_monk(src.loc)
+ if (prob(25))
+ new /obj/item/clothing/mask/gas/cyborg(src.loc)
+ del(src)
+
+/obj/effect/landmark/costume/holiday_priest/New()
+ new /obj/item/clothing/suit/holidaypriest(src.loc)
+ del(src)
+
+/obj/effect/landmark/costume/marisawizard/fake/New()
+ new /obj/item/clothing/head/wizard/marisa/fake(src.loc)
+ new/obj/item/clothing/suit/wizrobe/marisa/fake(src.loc)
+ del(src)
+
+/obj/effect/landmark/costume/fakewizard/New()
+ new /obj/item/clothing/suit/wizrobe/fake(src.loc)
+ new /obj/item/clothing/head/wizard/fake(src.loc)
+ del(src)
+
+/obj/effect/landmark/costume/sexyclown/New()
+ new /obj/item/clothing/mask/gas/sexyclown(src.loc)
+ new /obj/item/clothing/under/sexyclown(src.loc)
+ del(src)
+
+/obj/effect/landmark/costume/sexymime/New()
+ new /obj/item/clothing/mask/gas/sexymime(src.loc)
+ new /obj/item/clothing/under/sexymime(src.loc)
+ del(src)
+
+///obj/effect/landmark/costume/hidden/master/New()
+// var/list/templist = list()
+// templist += src
+// for(var/obj/effect/landmark/costume/hidden/H in z1
\ No newline at end of file
diff --git a/code/defines/obj/decal.dm b/code/defines/obj/decal.dm
index 885efaa665..cbf71a24dc 100644
--- a/code/defines/obj/decal.dm
+++ b/code/defines/obj/decal.dm
@@ -1,24 +1,8 @@
-/obj/effect/decal
- pass_flags = PASSBLOB
-
-/obj/effect/decal/ash
- name = "ashes"
- desc = "Ashes to ashes, dust to dust, and into space."
- gender = PLURAL
- icon = 'objects.dmi'
- icon_state = "ash"
- anchored = 1
-
-/obj/effect/decal/ash/attack_hand(mob/user as mob)
- usr << "\blue The ashes slip through your fingers."
- del(src)
- return
-
/obj/effect/decal/remains/human
name = "remains"
desc = "They look like human remains. They have a strange aura about them."
gender = PLURAL
- icon = 'blood.dmi'
+ icon = 'icons/effects/blood.dmi'
icon_state = "remains"
anchored = 1
@@ -26,7 +10,7 @@
name = "remains"
desc = "They look like the remains of something... alien. They have a strange aura about them."
gender = PLURAL
- icon = 'blood.dmi'
+ icon = 'icons/effects/blood.dmi'
icon_state = "remainsxeno"
anchored = 1
@@ -34,14 +18,14 @@
name = "remains"
desc = "They look like the remains of something mechanical. They have a strange aura about them."
gender = PLURAL
- icon = 'robots.dmi'
+ icon = 'icons/mob/robots.dmi'
icon_state = "remainsrobot"
anchored = 1
/obj/effect/decal/point
name = "arrow"
desc = "It's an arrow hanging in mid-air. There may be a wizard about."
- icon = 'screen1.dmi'
+ icon = 'icons/mob/screen1.dmi'
icon_state = "arrow"
layer = 16.0
anchored = 1
@@ -51,26 +35,33 @@
//HUMANS
+/obj/effect/decal/cleanable/ash
+ name = "ashes"
+ desc = "Ashes to ashes, dust to dust, and into space."
+ gender = PLURAL
+ icon = 'icons/obj/objects.dmi'
+ icon_state = "ash"
+ anchored = 1
+
/obj/effect/decal/cleanable/blood
name = "blood"
- desc = "It's red and disgusting."
+ desc = "It's red and gooey. Perhaps it's the chef's cooking?"
gender = PLURAL
density = 0
anchored = 1
layer = 2
- icon = 'blood.dmi'
+ icon = 'icons/effects/blood.dmi'
icon_state = "floor1"
random_icon_states = list("floor1", "floor2", "floor3", "floor4", "floor5", "floor6", "floor7")
var/list/viruses = list()
blood_DNA = list()
- var/datum/disease2/disease/virus2 = null
- var/OriginalMob = null
+ //var/datum/disease2/disease/virus2 = null
/obj/effect/decal/cleanable/blood/Del()
for(var/datum/disease/D in viruses)
D.cure(0)
..()
-/* //This breaks a few blood related things, thankfully we don't get too many decals -- Erthilo
+
/obj/effect/decal/cleanable/blood/New()
..()
if(istype(src, /obj/effect/decal/cleanable/blood/gibs))
@@ -79,36 +70,12 @@
for(var/obj/effect/decal/cleanable/blood/B in src.loc)
if(B != src)
del(B)
-*/
-
-/obj/effect/decal/cleanable/blood/drip
- name = "drips of blood"
- desc = "It's red."
- gender = PLURAL
- density = 0
- anchored = 1
- layer = 2
- icon = 'drip.dmi'
- icon_state = "1"
-// track_amt = 0
-
-/obj/effect/decal/cleanable/mucus
- name = "mucus"
- desc = "Disgusting mucus."
- gender = PLURAL
- density = 0
- anchored = 1
- layer = 2
- icon = 'blood.dmi'
- icon_state = "mucus"
- random_icon_states = list("mucus")
- var/datum/disease2/disease/virus2 = null
/obj/effect/decal/cleanable/blood/splatter
random_icon_states = list("gibbl1", "gibbl2", "gibbl3", "gibbl4", "gibbl5")
/obj/effect/decal/cleanable/blood/tracks
- icon_state = "blood"
+ icon_state = "tracks"
desc = "They look like tracks left by wheels."
gender = PLURAL
random_icon_states = null
@@ -120,7 +87,7 @@
density = 0
anchored = 0
layer = 2
- icon = 'blood.dmi'
+ icon = 'icons/effects/blood.dmi'
icon_state = "gibbl5"
random_icon_states = list("gib1", "gib2", "gib3", "gib4", "gib5", "gib6")
@@ -148,10 +115,11 @@
density = 0
anchored = 1
layer = 2
- icon = 'blood.dmi'
+ icon = 'icons/effects/blood.dmi'
icon_state = "xfloor1"
random_icon_states = list("xfloor1", "xfloor2", "xfloor3", "xfloor4", "xfloor5", "xfloor6", "xfloor7")
var/list/viruses = list()
+ blood_DNA = list()
Del()
for(var/datum/disease/D in viruses)
@@ -165,7 +133,7 @@
name = "xeno gibs"
desc = "Gnarly..."
gender = PLURAL
- icon = 'blood.dmi'
+ icon = 'icons/effects/blood.dmi'
icon_state = "xgib1"
random_icon_states = list("xgib1", "xgib2", "xgib3", "xgib4", "xgib5", "xgib6")
@@ -197,7 +165,7 @@
density = 0
anchored = 0
layer = 2
- icon = 'robots.dmi'
+ icon = 'icons/mob/robots.dmi'
icon_state = "gib1"
random_icon_states = list("gib1", "gib2", "gib3", "gib4", "gib5", "gib6", "gib7")
@@ -217,7 +185,7 @@
density = 0
anchored = 1
layer = 2
- icon = 'robots.dmi'
+ icon = 'icons/mob/robots.dmi'
icon_state = "floor1"
var/viruses = list()
random_icon_states = list("floor1", "floor2", "floor3", "floor4", "floor5", "floor6", "floor7")
@@ -239,7 +207,7 @@
density = 0
anchored = 1
layer = 2
- icon = 'objects.dmi'
+ icon = 'icons/obj/objects.dmi'
icon_state = "shards"
/obj/effect/decal/cleanable/dirt
@@ -249,17 +217,17 @@
density = 0
anchored = 1
layer = 2
- icon = 'effects.dmi'
+ icon = 'icons/effects/effects.dmi'
icon_state = "dirt"
/obj/effect/decal/cleanable/greenglow
name = "glowing goo"
- desc = "Eerie. This makes you feel creepy."
+ desc = "Jeez. I hope that's not for lunch."
gender = PLURAL
density = 0
anchored = 1
layer = 2
- icon = 'effects.dmi'
+ icon = 'icons/effects/effects.dmi'
icon_state = "greenglow"
/obj/effect/decal/cleanable/cobweb
@@ -268,7 +236,7 @@
density = 0
anchored = 1
layer = 3
- icon = 'effects.dmi'
+ icon = 'icons/effects/effects.dmi'
icon_state = "cobweb1"
/obj/effect/decal/cleanable/molten_item
@@ -277,7 +245,7 @@
density = 0
anchored = 1
layer = 3
- icon = 'chemical.dmi'
+ icon = 'icons/obj/chemical.dmi'
icon_state = "molten"
/obj/effect/decal/cleanable/cobweb2
@@ -286,7 +254,7 @@
density = 0
anchored = 1
layer = 3
- icon = 'effects.dmi'
+ icon = 'icons/effects/effects.dmi'
icon_state = "cobweb2"
// Used for spray that you spray at walls, tables, hydrovats etc
@@ -303,7 +271,7 @@
density = 0
anchored = 1
layer = 2
- icon = 'blood.dmi'
+ icon = 'icons/effects/blood.dmi'
icon_state = "vomit_1"
random_icon_states = list("vomit_1", "vomit_2", "vomit_3", "vomit_4")
var/list/viruses = list()
@@ -319,7 +287,7 @@
density = 0
anchored = 1
layer = 2
- icon = 'tomatodecal.dmi'
+ icon = 'icons/effects/tomatodecal.dmi'
random_icon_states = list("tomato_floor1", "tomato_floor2", "tomato_floor3")
/obj/effect/decal/cleanable/egg_smudge
@@ -328,7 +296,7 @@
density = 0
anchored = 1
layer = 2
- icon = 'tomatodecal.dmi'
+ icon = 'icons/effects/tomatodecal.dmi'
random_icon_states = list("smashed_egg1", "smashed_egg2", "smashed_egg3")
/obj/effect/decal/cleanable/pie_smudge //honk
@@ -337,15 +305,5 @@
density = 0
anchored = 1
layer = 2
- icon = 'tomatodecal.dmi'
+ icon = 'icons/effects/tomatodecal.dmi'
random_icon_states = list("smashed_pie")
-
-/obj/effect/decal/warning_stripes
- icon = 'decal_warning_stripes.dmi'
- layer = 2
-
-/obj/effect/decal/warning_stripes/New()
- ..()
-
- loc.overlays += src
- del src
\ No newline at end of file
diff --git a/code/defines/obj/hydro.dm b/code/defines/obj/hydro.dm
index 9cd7284772..90d765dd91 100644
--- a/code/defines/obj/hydro.dm
+++ b/code/defines/obj/hydro.dm
@@ -2,7 +2,7 @@
/obj/item/device/analyzer/plant_analyzer
name = "plant analyzer"
- icon = 'device.dmi'
+ icon = 'icons/obj/device.dmi'
icon_state = "hydro"
item_state = "analyzer"
@@ -15,7 +15,7 @@
/obj/item/seeds
name = "pack of seeds"
- icon = 'seeds.dmi'
+ icon = 'icons/obj/seeds.dmi'
icon_state = "seed" // unknown plant seed - these shouldn't exist in-game
flags = FPRINT | TABLEPASS
w_class = 1.0 // Makes them pocketable
@@ -73,7 +73,7 @@
var/ckey = null
var/realName = null
var/datum/mind/mind = null
- gender = "male"
+ gender = MALE
/obj/item/seeds/grapeseed
name = "pack of grape seeds"
@@ -419,6 +419,24 @@
plant_type = 0
growthstages = 3
+/obj/item/seeds/reishimycelium
+ name = "pack of reishi mycelium"
+ desc = "This mycelium grows into something relaxing."
+ icon_state = "mycelium-reishi"
+ mypath = "/obj/item/seeds/reishimycelium"
+ species = "reishi"
+ plantname = "Reishi"
+ productname = "/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/reishi"
+ lifespan = 35
+ endurance = 35
+ maturation = 10
+ production = 5
+ yield = 4
+ potency = 15 // Sleeping based on potency?
+ oneharvest = 1
+ growthstages = 4
+ plant_type = 2
+
/obj/item/seeds/amanitamycelium
name = "pack of fly amanita mycelium"
desc = "This mycelium grows into something horrible."
@@ -684,6 +702,24 @@
maturation = 6
production = 6
yield = 5
+ potency = 10
+ plant_type = 0
+ growthstages = 6
+
+/obj/item/seeds/goldappleseed
+ name = "pack of golden apple seeds"
+ desc = "These seeds grow into golden apple trees. Good thing there are no firebirds in space."
+ icon_state = "seed-goldapple"
+ mypath = "/obj/item/seeds/goldappleseed"
+ species = "goldapple"
+ plantname = "Golden Apple Tree"
+ productname = "/obj/item/weapon/reagent_containers/food/snacks/grown/goldapple"
+ lifespan = 55
+ endurance = 35
+ maturation = 10
+ production = 10
+ yield = 3
+ potency = 10
plant_type = 0
growthstages = 6
@@ -924,7 +960,7 @@
yield = 2
potency = 10
plant_type = 0
- growthstages = 6
+ growthstages = 5
/* // Maybe one day when I get it to work like a grenade which exlodes gibs.
/obj/item/seeds/gibtomatoseed
@@ -965,697 +1001,9 @@
*/
-
-
-// ***********************************************************
-// Foods that are produced from hydroponics ~~~~~~~~~~
-// Data from the seeds carry over to these grown foods
-// ***********************************************************
-
-//Grown foods
-/obj/item/weapon/reagent_containers/food/snacks/grown/ //New subclass so we can pass on values
- var/seed = ""
- var/plantname = ""
- var/productname = ""
- var/species = ""
- var/lifespan = 0
- var/endurance = 0
- var/maturation = 0
- var/production = 0
- var/yield = 0
- var/potency = -1
- var/plant_type = 0
- icon = 'harvest.dmi'
- New(newloc,newpotency)
- if (!isnull(newpotency))
- potency = newpotency
- ..()
- src.pixel_x = rand(-5.0, 5)
- src.pixel_y = rand(-5.0, 5)
-
-/obj/item/weapon/reagent_containers/food/snacks/grown/attackby(var/obj/item/O as obj, var/mob/user as mob)
- ..()
- if (istype(O, /obj/item/device/analyzer/plant_analyzer))
- var/msg
- msg = "*---------*\n This is \a [src]\n"
- switch(plant_type)
- if(0)
- msg += "- Plant type: Normal plant\n"
- if(1)
- msg += "- Plant type: Weed\n"
- if(2)
- msg += "- Plant type: Mushroom\n"
- msg += "- Potency: [potency]\n"
- msg += "- Yield: [yield]\n"
- msg += "- Maturation speed: [maturation]\n"
- msg += "- Production speed: [production]\n"
- msg += "- Endurance: [endurance]\n"
- msg += "- Healing properties: [reagents.get_reagent_amount("nutriment")]\n"
- msg += "*---------*"
- usr << msg
- return
-
-/obj/item/weapon/grown/attackby(var/obj/item/O as obj, var/mob/user as mob)
- ..()
- if (istype(O, /obj/item/device/analyzer/plant_analyzer))
- var/msg
- msg = "*---------*\n This is \a [src]\n"
- switch(plant_type)
- if(0)
- msg += "- Plant type: Normal plant\n"
- if(1)
- msg += "- Plant type: Weed\n"
- if(2)
- msg += "- Plant type: Mushroom\n"
- msg += "- Acid strength: [potency]\n"
- msg += "- Yield: [yield]\n"
- msg += "- Maturation speed: [maturation]\n"
- msg += "- Production speed: [production]\n"
- msg += "- Endurance: [endurance]\n"
- msg += "*---------*"
- usr << msg
- return
-
-/obj/item/weapon/reagent_containers/food/snacks/grown/corn
- seed = "/obj/item/seeds/cornseed"
- name = "cob of corn"
- desc = "Needs some butter!"
- icon_state = "corn"
- potency = 40
- On_Consume()
- if(!reagents.total_volume)
- var/mob/living/M = usr
- if(M)
- var/obj/item/weapon/corncob/W = new /obj/item/weapon/corncob( M )
- M << "You chew on the corn, leaving nothing behind but a cob."
- M.put_in_hand(W)
- W.add_fingerprint(M)
- New()
- ..()
- reagents.add_reagent("nutriment", 1+round((potency / 10), 1))
- bitesize = 1+round(reagents.total_volume / 2, 1)
-
-
-/obj/item/weapon/reagent_containers/food/snacks/grown/poppy
- seed = "/obj/item/seeds/poppyseed"
- name = "poppy"
- desc = "Long-used as a symbol of rest, peace, and death."
- icon_state = "poppy"
- potency = 30
- New()
- ..()
- reagents.add_reagent("nutriment", 1+round((potency / 20), 1))
- reagents.add_reagent("bicaridine", 1+round((potency / 10), 1))
- bitesize = 1+round(reagents.total_volume / 3, 1)
-
-/obj/item/weapon/reagent_containers/food/snacks/grown/harebell
- seed = "obj/item/seeds/harebellseed"
- name = "harebell"
- desc = "\"I'll sweeten thy sad grave: thou shalt not lack the flower that's like thy face, pale primrose, nor the azured hare-bell, like thy veins; no, nor the leaf of eglantine, whom not to slander, out-sweeten’d not thy breath.\""
- icon_state = "harebell"
- potency = 1
- New()
- ..()
- reagents.add_reagent("nutriment", 1+round((potency / 20), 1))
- bitesize = 1+round(reagents.total_volume / 3, 1)
-
-/obj/item/weapon/reagent_containers/food/snacks/grown/potato
- seed = "/obj/item/seeds/potatoseed"
- name = "potato"
- desc = "Boil 'em! Mash 'em! Stick 'em in a stew!"
- icon_state = "potato"
- potency = 25
- New()
- ..()
- reagents.add_reagent("nutriment", 1+round((potency / 10), 1))
- bitesize = reagents.total_volume
-
-/obj/item/weapon/reagent_containers/food/snacks/grown/grapes
- seed = "/obj/item/seeds/grapeseed"
- name = "bunch of grapes"
- desc = "Nutritious!"
- icon_state = "grapes"
- New()
- ..()
- reagents.add_reagent("nutriment", 1+round((potency / 10), 1))
- reagents.add_reagent("sugar", 1+round((potency / 5), 1))
- bitesize = 1+round(reagents.total_volume / 2, 1)
-
-/obj/item/weapon/reagent_containers/food/snacks/grown/greengrapes
- seed = "/obj/item/seeds/greengrapeseed"
- name = "bunch of green grapes"
- desc = "Nutritious!"
- icon_state = "greengrapes"
- potency = 25
- New()
- ..()
- reagents.add_reagent("nutriment", 1+round((potency / 10), 1))
- reagents.add_reagent("kelotane", 3+round((potency / 5), 1))
- bitesize = 1+round(reagents.total_volume / 2, 1)
-
-/obj/item/weapon/reagent_containers/food/snacks/grown/cabbage
- seed = "/obj/item/seeds/cabbageseed"
- name = "cabbage"
- desc = "Ewwwwwwwwww. Cabbage."
- icon_state = "cabbage"
- potency = 25
- New()
- ..()
- reagents.add_reagent("nutriment", 1+round((potency / 10), 1))
- bitesize = reagents.total_volume
-
-/obj/item/weapon/reagent_containers/food/snacks/grown/berries
- seed = "/obj/item/seeds/berryseed"
- name = "bunch of berries"
- desc = "Nutritious!"
- icon_state = "berrypile"
- New()
- ..()
- reagents.add_reagent("nutriment", 1+round((potency / 10), 1))
- bitesize = 1+round(reagents.total_volume / 2, 1)
-
-/obj/item/weapon/reagent_containers/food/snacks/grown/glowberries
- seed = "/obj/item/seeds/glowberryseed"
- name = "bunch of glow-berries"
- desc = "Nutritious!"
- var/on = 1
- var/brightness_on = 2 //luminosity when on
- icon_state = "glowberrypile"
- New()
- ..()
- reagents.add_reagent("nutriment", round((potency / 10), 1))
- reagents.add_reagent("radium", 3+round(potency / 5, 1))
- bitesize = 1+round(reagents.total_volume / 2, 1)
-
-/obj/item/weapon/reagent_containers/food/snacks/grown/glowberries/Del()
- if(istype(loc,/mob))
- loc.ul_SetLuminosity(loc.LuminosityRed - potency/5, loc.LuminosityGreen - potency/5, loc.LuminosityBlue - potency/5)
- ..()
-
-/obj/item/weapon/reagent_containers/food/snacks/grown/glowberries/pickup(mob/user)
- ul_SetLuminosity(0)
- user.ul_SetLuminosity(user.LuminosityRed + potency/5, user.LuminosityGreen + potency/5, user.LuminosityBlue + potency/5)
-
-/obj/item/weapon/reagent_containers/food/snacks/grown/glowberries/dropped(mob/user)
- user.ul_SetLuminosity(user.LuminosityRed - potency/5, user.LuminosityGreen - potency/5, user.LuminosityBlue - potency/5)
- ul_SetLuminosity(potency/5)
-
-/obj/item/weapon/reagent_containers/food/snacks/grown/cocoapod
- seed = "/obj/item/seeds/cocoapodseed"
- name = "cocoa pod"
- desc = "Fattening... Mmmmm... chucklate."
- icon_state = "cocoapod"
- potency = 50
- New()
- ..()
- reagents.add_reagent("nutriment", 1+round((potency / 10), 1))
- reagents.add_reagent("coco", 4+round((potency / 5), 1))
- bitesize = 1+round(reagents.total_volume / 2, 1)
-
-/obj/item/weapon/reagent_containers/food/snacks/grown/sugarcane
- seed = "/obj/item/seeds/sugarcaneseed"
- name = "sugarcane"
- desc = "Sickly sweet."
- icon_state = "sugarcane"
- potency = 50
- New()
- ..()
- reagents.add_reagent("sugar", 4+round((potency / 5), 1))
-
-/obj/item/weapon/reagent_containers/food/snacks/grown/poisonberries
- seed = "/obj/item/seeds/poisonberryseed"
- name = "bunch of poison-berries"
- desc = "Taste so good, you could die!"
- icon_state = "poisonberrypile"
- gender = PLURAL
- potency = 15
- New()
- ..()
- reagents.add_reagent("nutriment", 1)
- reagents.add_reagent("toxin", 3+round(potency / 5, 1))
- bitesize = 1+round(reagents.total_volume / 2, 1)
-
-/obj/item/weapon/reagent_containers/food/snacks/grown/deathberries
- seed = "/obj/item/seeds/deathberryseed"
- name = "bunch of death-berries"
- desc = "Taste so good, you could die!"
- icon_state = "deathberrypile"
- gender = PLURAL
- potency = 50
- New()
- ..()
- reagents.add_reagent("nutriment", 1)
- reagents.add_reagent("toxin", 3+round(potency / 3, 1))
- reagents.add_reagent("lexorin", 1+round(potency / 5, 1))
- bitesize = 1+round(reagents.total_volume / 2, 1)
-
-/obj/item/weapon/reagent_containers/food/snacks/grown/ambrosiavulgaris
- seed = "/obj/item/seeds/ambrosiavulgaris"
- name = "ambrosia vulgaris branch"
- desc = "This is a plant containing various healing chemicals."
- icon_state = "ambrosiavulgaris"
- potency = 10
- New()
- ..()
- reagents.add_reagent("nutriment", 1)
- reagents.add_reagent("space_drugs", 3+round(potency / 5, 1))
- reagents.add_reagent("kelotane", 3+round(potency / 5, 1))
- reagents.add_reagent("bicaridine", 3+round(potency / 5, 1))
- reagents.add_reagent("toxin", 3+round(potency / 5, 1))
- bitesize = 1+round(reagents.total_volume / 2, 1)
-
-/obj/item/weapon/reagent_containers/food/snacks/grown/ambrosiadeus
- seed = "/obj/item/seeds/ambrosiadeus"
- name = "ambrosia deus branch"
- desc = "Eating this makes you feel immortal!"
- icon_state = "ambrosiadeus"
- potency = 10
- New()
- ..()
- reagents.add_reagent("nutriment", 1)
- reagents.add_reagent("bicaridine", 3+round(potency / 5, 1))
- reagents.add_reagent("synaptizine", 3+round(potency / 5, 1))
- reagents.add_reagent("hyperzine", 3+round(potency / 8, 1))
- reagents.add_reagent("kelotane", 3+round(potency / 8, 1))
- reagents.add_reagent("toxin", 1+round(potency / 8, 1))
- bitesize = 1+round(reagents.total_volume / 2, 1)
-
-/obj/item/weapon/reagent_containers/food/snacks/grown/apple
- seed = "/obj/item/seeds/appleseed"
- name = "apple"
- desc = "It's a little piece of Eden."
- icon_state = "apple"
- potency = 15
- New()
- ..()
- reagents.add_reagent("nutriment", 1+round((potency / 10), 1))
- bitesize = 1+round(reagents.total_volume / 2, 1)
-
-/obj/item/weapon/reagent_containers/food/snacks/grown/watermelon
- seed = "/obj/item/seeds/watermelonseed"
- name = "watermelon"
- desc = "It's full of watery goodness."
- icon_state = "watermelon"
- potency = 10
- New()
- ..()
- reagents.add_reagent("nutriment", 1+round((potency / 6), 1))
- bitesize = 1+round(reagents.total_volume / 2, 1)
-
-/obj/item/weapon/reagent_containers/food/snacks/grown/pumpkin
- seed = "/obj/item/seeds/pumpkinseed"
- name = "pumpkin"
- desc = "It's large and scary."
- icon_state = "pumpkin"
- potency = 10
- New()
- ..()
- reagents.add_reagent("nutriment", 1+round((potency / 6), 1))
- bitesize = 1+round(reagents.total_volume / 2, 1)
-
-/obj/item/weapon/reagent_containers/food/snacks/grown/lime
- seed = "/obj/item/seeds/limeseed"
- name = "lime"
- desc = "It's so sour, your face will twist."
- icon_state = "lime"
- potency = 20
- New()
- ..()
- reagents.add_reagent("nutriment", 1+round((potency / 20), 1))
- bitesize = 1+round(reagents.total_volume / 2, 1)
-
-/obj/item/weapon/reagent_containers/food/snacks/grown/lemon
- seed = "/obj/item/seeds/lemonseed"
- name = "lemon"
- desc = "When life gives you lemons, be grateful they aren't limes."
- icon_state = "lemon"
- potency = 20
- New()
- ..()
- reagents.add_reagent("nutriment", 1+round((potency / 20), 1))
- bitesize = 1+round(reagents.total_volume / 2, 1)
-
-/obj/item/weapon/reagent_containers/food/snacks/grown/orange
- seed = "/obj/item/seeds/orangeseed"
- name = "orange"
- desc = "It's an tangy fruit."
- icon_state = "orange"
- potency = 20
- New()
- ..()
- reagents.add_reagent("nutriment", 1+round((potency / 20), 1))
- bitesize = 1+round(reagents.total_volume / 2, 1)
-
-/obj/item/weapon/reagent_containers/food/snacks/grown/whitebeet
- seed = "/obj/item/seeds/whitebeetseed"
- name = "white-beet"
- desc = "You can't beat white-beet."
- icon_state = "whitebeet"
- potency = 15
- New()
- ..()
- reagents.add_reagent("nutriment", round((potency / 20), 1))
- reagents.add_reagent("sugar", 1+round((potency / 5), 1))
- bitesize = 1+round(reagents.total_volume / 2, 1)
-
-/obj/item/weapon/reagent_containers/food/snacks/grown/banana
- seed = "/obj/item/seeds/bananaseed"
- name = "banana"
- desc = "It's an excellent prop for a clown."
- icon = 'items.dmi'
- icon_state = "banana"
- item_state = "banana"
- On_Consume()
- if(!reagents.total_volume)
- var/mob/M = usr
- var/obj/item/weapon/bananapeel/W = new /obj/item/weapon/bananapeel( M )
- M << "You peel the banana."
- M.put_in_hand(W)
- W.add_fingerprint(M)
- New()
- ..()
- reagents.add_reagent("banana", 1+round((potency / 10), 1))
- bitesize = 5
- src.pixel_x = rand(-5.0, 5)
- src.pixel_y = rand(-5.0, 5)
-
-/obj/item/weapon/reagent_containers/food/snacks/grown/chili
- seed = "/obj/item/seeds/chiliseed"
- name = "chili"
- desc = "It's spicy! Wait... IT'S BURNING ME!!"
- icon_state = "chilipepper"
- New()
- ..()
- reagents.add_reagent("nutriment", 1+round((potency / 25), 1))
- reagents.add_reagent("capsaicin", 3+round(potency / 5, 1))
- bitesize = 1+round(reagents.total_volume / 2, 1)
-
-/obj/item/weapon/reagent_containers/food/snacks/grown/chili/attackby(var/obj/item/O as obj, var/mob/user as mob)
- . = ..()
- if (istype(O, /obj/item/device/analyzer/plant_analyzer))
- user << "- Capsaicin: [reagents.get_reagent_amount("capsaicin")]%"
-
-/obj/item/weapon/reagent_containers/food/snacks/grown/eggplant
- seed = "/obj/item/seeds/eggplantseed"
- name = "eggplant"
- desc = "Maybe there's a chicken inside?"
- icon_state = "eggplant"
- New()
- ..()
- reagents.add_reagent("nutriment", 1+round((potency / 10), 1))
- bitesize = 1+round(reagents.total_volume / 2, 1)
-
-/obj/item/weapon/reagent_containers/food/snacks/grown/soybeans
- seed = "/obj/item/seeds/soyaseed"
- name = "soybeans"
- desc = "It's pretty bland, but oh the possibilities..."
- gender = PLURAL
- icon_state = "soybeans"
- New()
- ..()
- reagents.add_reagent("nutriment", 1+round((potency / 20), 1))
- bitesize = 1+round(reagents.total_volume / 2, 1)
-
-/obj/item/weapon/reagent_containers/food/snacks/grown/tomato
- seed = "/obj/item/seeds/tomatoseed"
- name = "tomato"
- desc = "I say to-mah-to, you say tom-mae-to."
- icon_state = "tomato"
- potency = 10
- New()
- ..()
- reagents.add_reagent("nutriment", 1+round((potency / 10), 1))
- bitesize = 1+round(reagents.total_volume / 2, 1)
-
- throw_impact(atom/hit_atom)
- ..()
- new/obj/effect/decal/cleanable/tomato_smudge(src.loc)
- src.visible_message("The [src.name] has been squashed.","You hear a smack.")
- del(src)
- return
-
-/obj/item/weapon/reagent_containers/food/snacks/grown/killertomato
- seed = "/obj/item/seeds/killertomatoseed"
- name = "killer-tomato"
- desc = "I say to-mah-to, you say tom-mae-to... OH GOD IT'S EATING MY LEGS!!"
- icon_state = "killertomato"
- potency = 10
- New()
- ..()
- reagents.add_reagent("nutriment", 1+round((potency / 10), 1))
- bitesize = 1+round(reagents.total_volume / 2, 1)
- if(istype(src.loc,/mob))
- pickup(src.loc)
- lifespan = 120
- endurance = 30
- maturation = 15
- production = 1
- yield = 3
- potency = 30
- plant_type = 2
-
-/obj/item/weapon/reagent_containers/food/snacks/grown/killertomato/attack_self(mob/user as mob)
- if(istype(user.loc,/turf/space))
- return
- new /obj/effect/critter/killertomato(user.loc)
-
- del(src)
-
- user << "You plant the killer-tomato."
-
-/obj/item/weapon/reagent_containers/food/snacks/grown/bloodtomato
- seed = "/obj/item/seeds/bloodtomatoseed"
- name = "blood-tomato"
- desc = "So bloody...so...very...bloody....AHHHH!!!!"
- icon_state = "bloodtomato"
- potency = 10
- New()
- ..()
- reagents.add_reagent("nutriment", 1+round((potency / 10), 1))
- reagents.add_reagent("blood", 1+round((potency / 5), 1))
- bitesize = 1+round(reagents.total_volume / 2, 1)
-
- throw_impact(atom/hit_atom)
- ..()
- new/obj/effect/decal/cleanable/blood/splatter(src.loc)
- src.visible_message("The [src.name] has been squashed.","You hear a smack.")
- src.reagents.reaction(get_turf(hit_atom))
- for(var/atom/A in get_turf(hit_atom))
- src.reagents.reaction(A)
- del(src)
- return
-
-/obj/item/weapon/reagent_containers/food/snacks/grown/bluetomato
- seed = "/obj/item/seeds/bluetomatoseed"
- name = "blue-tomato"
- desc = "I say blue-mah-to, you say blue-mae-to."
- icon_state = "bluetomato"
- potency = 10
- New()
- ..()
- reagents.add_reagent("nutriment", 1+round((potency / 20), 1))
- reagents.add_reagent("lube", 1+round((potency / 5), 1))
- bitesize = 1+round(reagents.total_volume / 2, 1)
-
- throw_impact(atom/hit_atom)
- ..()
- new/obj/effect/decal/cleanable/oil(src.loc)
- src.visible_message("The [src.name] has been squashed.","You hear a smack.")
- src.reagents.reaction(get_turf(hit_atom))
- for(var/atom/A in get_turf(hit_atom))
- src.reagents.reaction(A)
- del(src)
- return
-
-/obj/item/weapon/reagent_containers/food/snacks/grown/wheat
- seed = "/obj/item/seeds/wheatseed"
- name = "wheat"
- desc = "Sigh... wheat... a-grain?"
- gender = PLURAL
- icon_state = "wheat"
- New()
- ..()
- reagents.add_reagent("nutriment", 1+round((potency / 25), 1))
- bitesize = 1+round(reagents.total_volume / 2, 1)
-
-/obj/item/weapon/reagent_containers/food/snacks/grown/icepepper
- seed = "/obj/item/seeds/icepepperseed"
- name = "ice-pepper"
- desc = "It's a mutant strain of chili"
- icon_state = "icepepper"
- potency = 20
- New()
- ..()
- reagents.add_reagent("nutriment", 1+round((potency / 50), 1))
- reagents.add_reagent("frostoil", 3+round(potency / 5, 1))
- bitesize = 1+round(reagents.total_volume / 2, 1)
-
-/obj/item/weapon/reagent_containers/food/snacks/grown/icepepper/attackby(var/obj/item/O as obj, var/mob/user as mob)
- . = ..()
- if (istype(O, /obj/item/device/analyzer/plant_analyzer))
- user << "- Frostoil: [reagents.get_reagent_amount("frostoil")]%"
-
-/obj/item/weapon/reagent_containers/food/snacks/grown/carrot
- seed = "/obj/item/seeds/carrotseed"
- name = "carrot"
- desc = "It's good for the eyes!"
- icon_state = "carrot"
- potency = 10
- New()
- ..()
- reagents.add_reagent("nutriment", 1+round((potency / 20), 1))
- reagents.add_reagent("imidazoline", 3+round(potency / 5, 1))
- bitesize = 1+round(reagents.total_volume / 2, 1)
-
-/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/amanita
- seed = "/obj/item/seeds/amanitamycelium"
- name = "fly amanita"
- desc = "Amanita Muscaria: Learn poisonous mushrooms by heart. Only pick mushrooms you know."
- icon_state = "amanita"
- potency = 10
- New()
- ..()
- reagents.add_reagent("nutriment", 1)
- reagents.add_reagent("amatoxin", 3+round(potency / 3, 1))
- reagents.add_reagent("psilocybin", 1+round(potency / 25, 1))
- bitesize = 1+round(reagents.total_volume / 2, 1)
-
-/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/amanita/attackby(var/obj/item/O as obj, var/mob/user as mob)
- . = ..()
- if (istype(O, /obj/item/device/analyzer/plant_analyzer))
- user << "- Amatoxins: [reagents.get_reagent_amount("amatoxin")]%"
- user << "- Psilocybin: [reagents.get_reagent_amount("psilocybin")]%"
-
-/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/angel
- seed = "/obj/item/seeds/angelmycelium"
- name = "destroying angel"
- desc = "Amanita Virosa: Deadly poisonous basidiomycete fungus filled with alpha amatoxins."
- icon_state = "angel"
- potency = 35
- New()
- ..()
- reagents.add_reagent("nutriment", 1+round((potency / 50), 1))
- reagents.add_reagent("amatoxin", 13+round(potency / 3, 1))
- reagents.add_reagent("psilocybin", 1+round(potency / 25, 1))
- bitesize = 1+round(reagents.total_volume / 2, 1)
-
-/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/angel/attackby(var/obj/item/O as obj, var/mob/user as mob)
- . = ..()
- if (istype(O, /obj/item/device/analyzer/plant_analyzer))
- user << "- Amatoxins: [reagents.get_reagent_amount("amatoxin")]%"
- user << "- Psilocybin: [reagents.get_reagent_amount("psilocybin")]%"
-
-/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/libertycap
- seed = "/obj/item/seeds/libertymycelium"
- name = "liberty-cap"
- desc = "Psilocybe Semilanceata: Liberate yourself!"
- icon_state = "libertycap"
- potency = 15
- New()
- ..()
- reagents.add_reagent("nutriment", 1+round((potency / 50), 1))
- reagents.add_reagent("psilocybin", 3+round(potency / 5, 1))
- bitesize = 1+round(reagents.total_volume / 2, 1)
-
-/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/libertycap/attackby(var/obj/item/O as obj, var/mob/user as mob)
- . = ..()
- if (istype(O, /obj/item/device/analyzer/plant_analyzer))
- user << "- Psilocybin: [reagents.get_reagent_amount("psilocybin")]%"
-
-/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/plumphelmet
- seed = "/obj/item/seeds/plumpmycelium"
- name = "plump-helmet"
- desc = "Plumus Hellmus: Plump, soft and s-so inviting~"
- icon_state = "plumphelmet"
- New()
- ..()
- reagents.add_reagent("nutriment", 2+round((potency / 10), 1))
- bitesize = 1+round(reagents.total_volume / 2, 1)
-
-/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/walkingmushroom
- seed = "/obj/item/seeds/walkingmushroom"
- name = "walking mushroom"
- desc = "The beginging of the great walk."
- icon_state = "walkingmushroom"
- New()
- ..()
- reagents.add_reagent("nutriment", 2+round((potency / 10), 1))
- bitesize = 1+round(reagents.total_volume / 2, 1)
- if(istype(src.loc,/mob))
- pickup(src.loc)
- lifespan = 120
- endurance = 30
- maturation = 15
- production = 1
- yield = 3
- potency = 30
- plant_type = 2
-
-/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/walkingmushroom/attack_self(mob/user as mob)
- if(istype(user.loc,/turf/space))
- return
- new /obj/effect/critter/walkingmushroom(user.loc)
-
- del(src)
-
- user << "You plant the walking mushroom."
-
-/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/chanterelle
- seed = "/obj/item/seeds/chantermycelium"
- name = "chanterelle cluster"
- desc = "Cantharellus Cibarius: These jolly yellow little shrooms sure look tasty!"
- icon_state = "chanterelle"
- New()
- ..()
- reagents.add_reagent("nutriment",1+round((potency / 25), 1))
- bitesize = 1+round(reagents.total_volume / 2, 1)
-
-/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/glowshroom
- seed = "/obj/item/seeds/glowshroom"
- name = "glowshroom cluster"
- desc = "Glowshroom: This species of mushroom glows in the dark. Or does it?"
- icon_state = "glowshroom"
- New()
- ..()
- reagents.add_reagent("radium",1+round((potency / 20), 1))
- if(istype(src.loc,/mob))
- pickup(src.loc)
- else
- ul_SetLuminosity(potency/10)
- lifespan = 120 //ten times that is the delay
- endurance = 30
- maturation = 15
- production = 1
- yield = 3
- potency = 30
- plant_type = 2
-
-/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/glowshroom/attack_self(mob/user as mob)
- if(istype(user.loc,/turf/space))
- return
- var/obj/effect/glowshroom/planted = new /obj/effect/glowshroom(user.loc)
-
- planted.delay = lifespan * 50
- planted.endurance = endurance
- planted.yield = yield
- planted.potency = potency
-
- del(src)
-
- user << "You plant the glowshroom."
-
-/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/glowshroom/Del()
- if(istype(loc,/mob))
- loc.ul_SetLuminosity(loc.LuminosityRed - potency/10, loc.LuminosityGreen - potency/10, loc.LuminosityBlue - potency/10)
- ..()
-
-/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/glowshroom/pickup(mob/user)
- ul_SetLuminosity(0)
- user.ul_SetLuminosity(user.LuminosityRed + potency/10, user.LuminosityGreen + potency/10, user.LuminosityBlue + potency/10)
-
-/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/glowshroom/dropped(mob/user)
- user.ul_SetLuminosity(user.LuminosityRed - potency/10, user.LuminosityGreen - potency/10, user.LuminosityBlue - potency/10)
- ul_SetLuminosity(potency/10)
+// *****************oolokitthesefancystars********
+// Grown FOOD types moved to reagents
+// **********************
// **********************
// Other harvested materials from plants (that are not food)
@@ -1663,7 +1011,7 @@
/obj/item/weapon/grown // Grown weapons
name = "grown_weapon"
- icon = 'weapons.dmi'
+ icon = 'icons/obj/weapons.dmi'
var/seed = ""
var/plantname = ""
var/productname = ""
@@ -1686,7 +1034,7 @@
/obj/item/weapon/grown/log
name = "tower-cap log"
desc = "It's better than bad, it's good!"
- icon = 'harvest.dmi'
+ icon = 'icons/obj/harvest.dmi'
icon_state = "logs"
force = 5
flags = TABLEPASS
@@ -1697,6 +1045,7 @@
plant_type = 2
origin_tech = "materials=1"
seed = "/obj/item/seeds/towermycelium"
+ attack_verb = list("bashed", "battered", "bludgeoned", "whacked")
attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W, /obj/item/weapon/circular_saw) || istype(W, /obj/item/weapon/hatchet) || (istype(W, /obj/item/weapon/twohanded/fireaxe) && W:wielded) || istype(W, /obj/item/weapon/melee/energy))
@@ -1709,7 +1058,7 @@
/obj/item/weapon/grown/sunflower // FLOWER POWER!
name = "sunflower"
desc = "It's beautiful! A certain person might beat you to death if you trample these."
- icon = 'harvest.dmi'
+ icon = 'icons/obj/harvest.dmi'
icon_state = "sunflower"
damtype = "fire"
force = 0
@@ -1723,7 +1072,7 @@
/*
/obj/item/weapon/grown/gibtomato
desc = "A plump tomato."
- icon = 'harvest.dmi'
+ icon = 'icons/obj/harvest.dmi'
name = "Gib Tomato"
icon_state = "gibtomato"
damtype = "fire"
@@ -1747,7 +1096,7 @@
*/
/obj/item/weapon/grown/nettle // -- Skie
desc = "It's probably not wise to touch it with bare hands..."
- icon = 'weapons.dmi'
+ icon = 'icons/obj/weapons.dmi'
name = "nettle"
icon_state = "nettle"
damtype = "fire"
@@ -1762,13 +1111,14 @@
seed = "/obj/item/seeds/nettleseed"
New()
..()
- reagents.add_reagent("nutriment", 1+round((potency / 50), 1))
- reagents.add_reagent("acid", round(potency, 1))
- force = round((5+potency/5), 1)
+ spawn(5) //So potency can be set in the proc that creates these crops
+ reagents.add_reagent("nutriment", 1+round((potency / 50), 1))
+ reagents.add_reagent("sacid", round(potency, 1))
+ force = round((5+potency/5), 1)
/obj/item/weapon/grown/deathnettle // -- Skie
desc = "The \red glowing \black nettle incites \redrage\black in you just from looking at it!"
- icon = 'weapons.dmi'
+ icon = 'icons/obj/weapons.dmi'
name = "deathnettle"
icon_state = "deathnettle"
damtype = "fire"
@@ -1781,11 +1131,13 @@
plant_type = 1
seed = "/obj/item/seeds/deathnettleseed"
origin_tech = "combat=3"
+ attack_verb = list("stung")
New()
..()
- reagents.add_reagent("nutriment", 1+round((potency / 50), 1))
- reagents.add_reagent("pacid", round(potency, 1))
- force = round((5+potency/2.5), 1)
+ spawn(5) //So potency can be set in the proc that creates these crops
+ reagents.add_reagent("nutriment", 1+round((potency / 50), 1))
+ reagents.add_reagent("pacid", round(potency, 1))
+ force = round((5+potency/2.5), 1)
// *************************************
// Pestkiller defines for hydroponics
@@ -1793,7 +1145,7 @@
/obj/item/pestkiller
name = "bottle of pestkiller"
- icon = 'chemical.dmi'
+ icon = 'icons/obj/chemical.dmi'
icon_state = "bottle16"
flags = FPRINT | TABLEPASS
var/toxicity = 0
@@ -1804,7 +1156,7 @@
/obj/item/pestkiller/carbaryl
name = "bottle of carbaryl"
- icon = 'chemical.dmi'
+ icon = 'icons/obj/chemical.dmi'
icon_state = "bottle16"
flags = FPRINT | TABLEPASS
toxicity = 4
@@ -1815,7 +1167,7 @@
/obj/item/pestkiller/lindane
name = "bottle of lindane"
- icon = 'chemical.dmi'
+ icon = 'icons/obj/chemical.dmi'
icon_state = "bottle18"
flags = FPRINT | TABLEPASS
toxicity = 6
@@ -1826,7 +1178,7 @@
/obj/item/pestkiller/phosmet
name = "bottle of phosmet"
- icon = 'chemical.dmi'
+ icon = 'icons/obj/chemical.dmi'
icon_state = "bottle15"
flags = FPRINT | TABLEPASS
toxicity = 8
@@ -1839,24 +1191,9 @@
// Hydroponics Tools
// *************************************
-/obj/item/weapon/plantbgone // -- Skie
- desc = "Kill those pesky weeds!"
- icon = 'hydroponics.dmi'
- name = "bottle of Plant-B-Gone"
- icon_state = "plantbgone"
- item_state = "plantbgone"
- flags = TABLEPASS | OPENCONTAINER | FPRINT | USEDELAY
- slot_flags = SLOT_BELT
- throwforce = 3
- w_class = 2.0
- throw_speed = 2
- throw_range = 10
- var/empty = 0
-
-
/obj/item/weapon/weedspray // -- Skie
desc = "It's a toxic mixture, in spray form, to kill small weeds."
- icon = 'hydroponics.dmi'
+ icon = 'icons/obj/hydroponics.dmi'
name = "weed-spray"
icon_state = "weedspray"
item_state = "spray"
@@ -1871,7 +1208,7 @@
/obj/item/weapon/pestspray // -- Skie
desc = "It's some pest eliminator spray! Do not inhale!"
- icon = 'hydroponics.dmi'
+ icon = 'icons/obj/hydroponics.dmi'
name = "pest-spray"
icon_state = "pestspray"
item_state = "spray"
@@ -1887,7 +1224,7 @@
/obj/item/weapon/minihoe // -- Numbers
name = "mini hoe"
desc = "It's used for removing weeds or scratching your back."
- icon = 'weapons.dmi'
+ icon = 'icons/obj/weapons.dmi'
icon_state = "hoe"
item_state = "hoe"
flags = FPRINT | TABLEPASS | CONDUCT | USEDELAY
@@ -1895,6 +1232,7 @@
throwforce = 7.0
w_class = 2.0
m_amt = 50
+ attack_verb = list("slashed", "sliced", "cut", "clawed")
// *************************************
// Weedkiller defines for hydroponics
@@ -1902,7 +1240,7 @@
/obj/item/weedkiller
name = "bottle of weedkiller"
- icon = 'chemical.dmi'
+ icon = 'icons/obj/chemical.dmi'
icon_state = "bottle16"
flags = FPRINT | TABLEPASS
var/toxicity = 0
@@ -1910,7 +1248,7 @@
/obj/item/weedkiller/triclopyr
name = "bottle of glyphosate"
- icon = 'chemical.dmi'
+ icon = 'icons/obj/chemical.dmi'
icon_state = "bottle16"
flags = FPRINT | TABLEPASS
toxicity = 4
@@ -1918,7 +1256,7 @@
/obj/item/weedkiller/lindane
name = "bottle of triclopyr"
- icon = 'chemical.dmi'
+ icon = 'icons/obj/chemical.dmi'
icon_state = "bottle18"
flags = FPRINT | TABLEPASS
toxicity = 6
@@ -1926,7 +1264,7 @@
/obj/item/weedkiller/D24
name = "bottle of 2,4-D"
- icon = 'chemical.dmi'
+ icon = 'icons/obj/chemical.dmi'
icon_state = "bottle15"
flags = FPRINT | TABLEPASS
toxicity = 8
@@ -1938,7 +1276,7 @@
/obj/item/nutrient
name = "bottle of nutrient"
- icon = 'chemical.dmi'
+ icon = 'icons/obj/chemical.dmi'
icon_state = "bottle16"
flags = FPRINT | TABLEPASS
w_class = 1.0
@@ -1950,7 +1288,7 @@
/obj/item/nutrient/ez
name = "bottle of E-Z-Nutrient"
- icon = 'chemical.dmi'
+ icon = 'icons/obj/chemical.dmi'
icon_state = "bottle16"
flags = FPRINT | TABLEPASS
mutmod = 1
@@ -1961,7 +1299,7 @@
/obj/item/nutrient/l4z
name = "bottle of Left 4 Zed"
- icon = 'chemical.dmi'
+ icon = 'icons/obj/chemical.dmi'
icon_state = "bottle18"
flags = FPRINT | TABLEPASS
mutmod = 2
@@ -1972,7 +1310,7 @@
/obj/item/nutrient/rh
name = "bottle of Robust Harvest"
- icon = 'chemical.dmi'
+ icon = 'icons/obj/chemical.dmi'
icon_state = "bottle15"
flags = FPRINT | TABLEPASS
mutmod = 0
@@ -1981,98 +1319,3 @@
src.pixel_x = rand(-5.0, 5)
src.pixel_y = rand(-5.0, 5)
-
-// *************************************
-// Complex Grown Object Defines -
-// Putting these at the bottom so they don't clutter the list up. -Cheridan
-// *************************************
-
-//This object is just a transition object. All it does is make a grass tile and delete itself.
-/obj/item/weapon/reagent_containers/food/snacks/grown/grass
- seed = "/obj/item/seeds/grassseed"
- name = "grass"
- desc = "Green and lush."
- icon_state = "spawner"
- potency = 20
- New()
- new/obj/item/stack/tile/grass(src.loc)
- spawn(5) //Workaround to keep harvesting from working weirdly.
- del(src)
-
-//This object is just a transition object. All it does is make dosh and delete itself. -Cheridan
-/obj/item/weapon/reagent_containers/food/snacks/grown/money
- seed = "/obj/item/seeds/cashseed"
- name = "dosh"
- desc = "Green and lush."
- icon_state = "spawner"
- potency = 10
- New()
- switch(rand(1,100))//(potency) //It wants to use the default potency instead of the new, so it was always 10. Will try to come back to this later - Cheridan
- if(0 to 10)
- new/obj/item/weapon/money/(src.loc)
- if(11 to 20)
- new/obj/item/weapon/money/c10(src.loc)
- if(21 to 30)
- new/obj/item/weapon/money/c20(src.loc)
- if(31 to 40)
- new/obj/item/weapon/money/c50(src.loc)
- if(41 to 50)
- new/obj/item/weapon/money/c100(src.loc)
- if(51 to 60)
- new/obj/item/weapon/money/c200(src.loc)
- if(61 to 80)
- new/obj/item/weapon/money/c500(src.loc)
- else
- new/obj/item/weapon/money/c1000(src.loc)
- spawn(5) //Workaround to keep harvesting from working weirdly.
- del(src)
-
-/obj/item/weapon/reagent_containers/food/snacks/grown/bluespacetomato
- seed = "/obj/item/seeds/bluespacetomatoseed"
- name = "blue-space tomato"
- desc = "So lubricated, you might slip through space-time."
- icon_state = "bluespacetomato"
- potency = 10
- origin_tech = "bluespace=3"
- New()
- ..()
- reagents.add_reagent("nutriment", 1+round((potency / 20), 1))
- reagents.add_reagent("singulo", 1+round((potency / 5), 1))
- bitesize = 1+round(reagents.total_volume / 2, 1)
-
- throw_impact(atom/hit_atom)
- ..()
- var/mob/M = usr
- var/outer_teleport_radius = potency/10 //Plant potency determines radius of teleport.
- var/inner_teleport_radius = potency/15
- var/list/turfs = new/list()
- for(var/turf/T in orange(M,outer_teleport_radius))
- if(T in orange(M,inner_teleport_radius)) continue
- if(istype(T,/turf/space)) continue
- if(T.density) continue
- if(T.x>world.maxx-outer_teleport_radius || T.xworld.maxy-outer_teleport_radius || T.yThe [src.name] has been squashed, causing a distortion in space-time.","You hear a smack.")
- del(src)
- return
\ No newline at end of file
diff --git a/code/defines/obj/machinery.dm b/code/defines/obj/machinery.dm
index b1ef297411..d98da74794 100644
--- a/code/defines/obj/machinery.dm
+++ b/code/defines/obj/machinery.dm
@@ -1,8 +1,8 @@
-//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:04
+//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31
/obj/machinery
name = "machinery"
- icon = 'stationobjs.dmi'
+ icon = 'icons/obj/stationobjs.dmi'
var/stat = 0
var/emagged = 0
var/use_power = 0
@@ -43,8 +43,8 @@
/obj/machinery/camera
name = "security camera"
- desc = "It's used to monitor rooms."
- icon = 'monitors.dmi'
+ desc = "It's used to monitor rooms. It can see through walls."
+ icon = 'icons/obj/monitors.dmi'
icon_state = "camera"
var/network = "SS13"
layer = 5
@@ -62,7 +62,7 @@
/obj/machinery/dispenser
name = "tank storage unit"
desc = "A simple yet bulky one-way storage device for gas tanks. Holds 10 plasma and 10 oxygen tanks."
- icon = 'objects.dmi'
+ icon = 'icons/obj/objects.dmi'
icon_state = "dispenser"
density = 1
var/o2tanks = 10.0
@@ -75,7 +75,7 @@
/obj/machinery/dna_scanner
name = "\improper DNA scanner/implanter"
desc = "It scans DNA structures."
- icon = 'Cryogenic2.dmi'
+ icon = 'icons/obj/Cryogenic2.dmi'
icon_state = "scanner_0"
density = 1
var/locked = 0.0
@@ -88,7 +88,7 @@
/obj/machinery/dna_scannernew
name = "\improper DNA modifier"
desc = "It scans DNA structures."
- icon = 'Cryogenic2.dmi'
+ icon = 'icons/obj/Cryogenic2.dmi'
icon_state = "scanner_0"
density = 1
var/locked = 0.0
@@ -100,8 +100,8 @@
/obj/machinery/firealarm
name = "fire alarm"
- desc = "Pull this in case of emergency."
- icon = 'monitors.dmi'
+ desc = "\"Pull this in case of emergency\". Thus, keep pulling it forever."
+ icon = 'icons/obj/monitors.dmi'
icon_state = "fire0"
var/detecting = 1.0
var/working = 1.0
@@ -113,19 +113,18 @@
idle_power_usage = 2
active_power_usage = 6
power_channel = ENVIRON
- var/network
New()
if(z == 1)
if(security_level)
- src.overlays += image('monitors.dmi', "overlay_[get_security_level()]")
+ src.overlays += image('icons/obj/monitors.dmi', "overlay_[get_security_level()]")
else
- src.overlays += image('monitors.dmi', "overlay_green")
+ src.overlays += image('icons/obj/monitors.dmi', "overlay_green")
/obj/machinery/partyalarm
- name = "\improper Party Button"
+ name = "\improper PARTY BUTTON"
desc = "Cuban Pete is in the house!"
- icon = 'monitors.dmi'
+ icon = 'icons/obj/monitors.dmi'
icon_state = "fire0"
var/detecting = 1.0
var/working = 1.0
@@ -141,7 +140,7 @@
/obj/machinery/igniter
name = "igniter"
desc = "It's useful for igniting plasma."
- icon = 'stationobjs.dmi'
+ icon = 'icons/obj/stationobjs.dmi'
icon_state = "igniter1"
var/id = null
var/on = 1.0
@@ -153,7 +152,7 @@
/obj/machinery/injector
name = "injector"
desc = "It injects gas into a chamber."
- icon = 'stationobjs.dmi'
+ icon = 'icons/obj/stationobjs.dmi'
icon_state = "injector"
density = 1
anchored = 1.0
@@ -163,24 +162,10 @@
active_power_usage = 4
layer = TURF_LAYER
-/obj/machinery/mass_driver
- name = "mass driver"
- desc = "Shoots things into space."
- icon = 'stationobjs.dmi'
- icon_state = "mass_driver"
- var/power = 1.0
- var/code = 1.0
- var/id = 1.0
- anchored = 1.0
- var/drive_range = 50 //this is mostly irrelevant since current mass drivers throw into space, but you could make a lower-range mass driver for interstation transport or something I guess.
- use_power = 1
- idle_power_usage = 2
- active_power_usage = 50
-
/obj/machinery/meter
name = "meter"
desc = "It measures something."
- icon = 'meter.dmi'
+ icon = 'icons/obj/meter.dmi'
icon_state = "meterX"
var/obj/machinery/atmospherics/pipe/target = null
anchored = 1.0
@@ -193,7 +178,7 @@
/obj/machinery/restruct
name = "\improper DNA physical restructurization accelerator"
desc = "It looks ridiculously complex."
- icon = 'Cryogenic2.dmi'
+ icon = 'icons/obj/Cryogenic2.dmi'
icon_state = "restruct_0"
density = 1
var/locked = 0.0
@@ -206,7 +191,7 @@
/obj/machinery/scan_console
name = "\improper DNA Scanner Access Console"
desc = "It scans DNA structures."
- icon = 'computer.dmi'
+ icon = 'icons/obj/computer.dmi'
icon_state = "scanner"
density = 1
var/obj/item/weapon/card/data/scan = null
@@ -225,9 +210,41 @@
idle_power_usage = 10
active_power_usage = 400
+/obj/machinery/door_control
+ name = "remote door-control"
+ desc = "It controls doors, remotely."
+ icon = 'icons/obj/stationobjs.dmi'
+ icon_state = "doorctrl0"
+ desc = "A remote control-switch for a door."
+ var/id = null
+ var/range = 10
+ var/normaldoorcontrol = 0
+ var/desiredstate = 0 // Zero is closed, 1 is open.
+ var/specialfunctions = 1
+ /*
+ Bitflag, 1= open
+ 2= idscan,
+ 4= bolts
+ 8= shock
+ 16= door safties
+
+ */
+
+ var/exposedwires = 0
+ var/wires = 3
+ /*
+ Bitflag, 1=checkID
+ 2=Network Access
+ */
+
+ anchored = 1.0
+ use_power = 1
+ idle_power_usage = 2
+ active_power_usage = 4
+
/obj/machinery/driver_button
name = "mass driver button"
- icon = 'objects.dmi'
+ icon = 'icons/obj/objects.dmi'
icon_state = "launcherbtt"
desc = "A remote control switch for a mass driver."
var/id = null
@@ -239,7 +256,7 @@
/obj/machinery/ignition_switch
name = "ignition switch"
- icon = 'objects.dmi'
+ icon = 'icons/obj/objects.dmi'
icon_state = "launcherbtt"
desc = "A remote control switch for a mounted igniter."
var/id = null
@@ -252,7 +269,7 @@
/obj/machinery/flasher_button
name = "flasher button"
desc = "A remote control switch for a mounted flasher."
- icon = 'objects.dmi'
+ icon = 'icons/obj/objects.dmi'
icon_state = "launcherbtt"
var/id = null
var/active = 0
@@ -263,7 +280,7 @@
/obj/machinery/teleport
name = "teleport"
- icon = 'stationobjs.dmi'
+ icon = 'icons/obj/stationobjs.dmi'
density = 1
anchored = 1.0
var/lockeddown = 0
@@ -279,7 +296,7 @@
/obj/machinery/teleport/station
name = "station"
- desc = "The station's hub of a teleport system."
+ desc = "It's the station thingy of a teleport thingy." //seriously, wtf.
icon_state = "controller"
var/active = 0
var/engaged = 0
@@ -289,77 +306,16 @@
/*
/obj/machinery/wire
name = "wire"
- icon = 'power_cond_red.dmi'
+ icon = 'icons/obj/power_cond_red.dmi'
use_power = 1
idle_power_usage = 0
active_power_usage = 1
*/
-/obj/machinery/power
- name = null
- icon = 'power.dmi'
- anchored = 1.0
- var/datum/powernet/powernet = null
- var/netnum = 0
- var/directwired = 1 // by default, power machines are connected by a cable in a neighbouring turf
- // if set to 0, requires a 0-X cable on this turf
- use_power = 0
- idle_power_usage = 0
- active_power_usage = 0
-
-/obj/machinery/power/terminal
- name = "terminal"
- icon_state = "term"
- desc = "It's an underfloor wiring terminal for power equipment."
- level = 1
- layer = TURF_LAYER
- var/obj/machinery/power/master = null
- anchored = 1
- directwired = 0 // must have a cable on same turf connecting to terminal
- layer = 2.6 // a bit above wires
-
-/obj/machinery/power/generator
- name = "thermoelectric generator mark I"
- desc = "It's a high efficiency thermoelectric generator."
- icon_state = "teg"
- anchored = 1
- density = 1
-
- var/obj/machinery/atmospherics/binary/circulator/circ1
- var/obj/machinery/atmospherics/binary/circulator/circ2
-
- var/lastgen = 0
- var/lastgenlev = -1
-
-/obj/machinery/power/generator_type2
- name = "thermoelectric generator mark II"
- desc = "It's a high efficiency thermoelectric generator."
- icon_state = "teg"
- anchored = 1
- density = 1
-
- var/obj/machinery/atmospherics/unary/generator_input/input1
- var/obj/machinery/atmospherics/unary/generator_input/input2
-
- var/lastgen = 0
- var/lastgenlev = -1
-
-/obj/machinery/power/monitor
- name = "power monitoring computer"
- desc = "It monitors power levels across the station, and can remotely toggle main breakers."
- icon = 'computer.dmi'
- icon_state = "power"
- density = 1
- anchored = 1
- use_power = 2
- idle_power_usage = 20
- active_power_usage = 80
- var/control = 0
- req_access = list(ACCESS_ENGINE_EQUIP)
/obj/machinery/light_switch
name = "light switch"
desc = "It turns lights on and off. What are you, simple?"
- icon = 'power.dmi'
+ icon = 'icons/obj/power.dmi'
icon_state = "light1"
anchored = 1.0
var/on = 1
@@ -370,10 +326,10 @@
/obj/machinery/crema_switch
desc = "Burn baby burn!"
name = "crematorium igniter"
- icon = 'power.dmi'
+ icon = 'icons/obj/power.dmi'
icon_state = "crema_switch"
anchored = 1.0
- req_access = list(ACCESS_CREMATORIUM)
+ req_access = list(access_crematorium)
var/on = 0
var/area/area = null
var/otherarea = null
@@ -396,26 +352,16 @@
/obj/machinery/hologram/projector
name = "hologram projector"
desc = "It makes a hologram appear...with magnets or something..."
- icon = 'stationobjs.dmi'
+ icon = 'icons/obj/stationobjs.dmi'
icon_state = "hologram0"
/obj/machinery/hologram/proj_ai
name = "hologram projector platform"
desc = "It's used by the AI for fooling around."
- icon = 'stationobjs.dmi'
+ icon = 'icons/obj/stationobjs.dmi'
icon_state = "hologram0"
var/temp = null
var/lumens = 0.0
var/h_r = 245.0
var/h_g = 245.0
var/h_b = 245.0
-
-/obj/machinery/coatrack
- name = "coat rack"
- desc = "A fancy stand for the Detective's coat and hat."
- icon_state = "coatrack0"
- icon = 'coatrack.dmi'
- density = 1
- anchored = 1.0
- var/obj/item/clothing/suit/storage/det_suit/coat
- var/obj/item/clothing/head/det_hat/hat
diff --git a/code/defines/obj/spawner.dm b/code/defines/obj/spawner.dm
deleted file mode 100644
index d0ec0ef858..0000000000
--- a/code/defines/obj/spawner.dm
+++ /dev/null
@@ -1,3 +0,0 @@
-/obj/effect/spawner
- name = "object spawner"
-
diff --git a/code/defines/obj/storage.dm b/code/defines/obj/storage.dm
index ee4f024389..c52bd713cd 100644
--- a/code/defines/obj/storage.dm
+++ b/code/defines/obj/storage.dm
@@ -2,6 +2,7 @@
name = "backpack"
desc = "You wear this on your back and put items into it."
icon_state = "backpack"
+ item_state = "backpack"
w_class = 4.0
flags = FPRINT|TABLEPASS
slot_flags = SLOT_BACK //ERROOOOO
@@ -34,7 +35,7 @@
name = "pill bottle"
desc = "It's an airtight container for storing medication."
icon_state = "pill_canister"
- icon = 'chemical.dmi'
+ icon = 'icons/obj/chemical.dmi'
item_state = "contsolid"
w_class = 2.0
can_hold = list("/obj/item/weapon/reagent_containers/pill")
@@ -44,7 +45,7 @@
name = "pack of dice"
desc = "It's a small container with dice inside."
icon_state = "pill_canister"
- icon = 'chemical.dmi'
+ icon = 'icons/obj/chemical.dmi'
item_state = "contsolid"
w_class = 2.0
can_hold = list("/obj/item/weapon/dice")
@@ -57,18 +58,8 @@
/obj/item/weapon/storage/box/engineer
-/obj/item/weapon/storage/box/medic
- name = "anesthetic box"
- desc = "Full of masks and emergency anesthetic tanks."
-
/obj/item/weapon/storage/box/syndicate
-/obj/item/weapon/storage/box/ert
- name = "medical box"
- desc = "Full of goodness."
- icon_state = "implant"
- item_state = "syringe_kit"
-
/obj/item/weapon/storage/cupbox
name = "box of paper cups"
desc = "It has pictures of paper cups on the front."
@@ -103,31 +94,29 @@
name = "Giggles Von Honkerton"
desc = "It's a backpack made by Honk! Co."
icon_state = "clownpack"
+ item_state = "clownpack"
/obj/item/weapon/storage/backpack/medic
name = "medical backpack"
desc = "It's a backpack especially designed for use in a sterile environment."
icon_state = "medicalpack"
-
-/obj/item/weapon/storage/backpack/medic/full
-//Spawns with 2 boxes of ERT gear, a box of ERT gear and a hypo, and a box of anesthetic.
- New()
- ..()
- new /obj/item/weapon/reagent_containers/hypospray/ert(src)
- for(var/i = 1, i <=2, i++)
- new /obj/item/weapon/storage/box/ert(src)
- new /obj/item/weapon/storage/box/medic(src)
- new /obj/item/device/healthanalyzer(src)
- return
+ item_state = "medicalpack"
/obj/item/weapon/storage/backpack/security
name = "security backpack"
desc = "It's a very robust backpack."
icon_state = "securitypack"
+ item_state = "securitypack"
+
+/obj/item/weapon/storage/backpack/captain
+ name = "captain's backpack"
+ desc = "It's a special backpack made exclusively for Nanotrasen officers."
+ icon_state = "captainpack"
+ item_state = "captainpack"
/obj/item/weapon/storage/backpack/satchel
- name = "satchel"
- desc = "It's a very robust satchel to wear on your back."
+ name = "leather satchel"
+ desc = "It's a very fancy satchel made with fine leather."
icon_state = "satchel"
/obj/item/weapon/storage/backpack/satchel/withwallet
@@ -146,11 +135,13 @@
name = "industrial satchel"
desc = "A tough satchel with extra pockets."
icon_state = "satchel-eng"
+ item_state = "engiepack"
/obj/item/weapon/storage/backpack/satchel_med
name = "medical satchel"
desc = "A sterile satchel used in medical departments."
icon_state = "satchel-med"
+ item_state = "medicalpack"
/obj/item/weapon/storage/backpack/satchel_vir
name = "virologist satchel"
@@ -176,75 +167,29 @@
name = "security satchel"
desc = "A robust satchel for security related needs."
icon_state = "satchel-sec"
+ item_state = "securitypack"
/obj/item/weapon/storage/backpack/satchel_hyd
name = "hydroponics satchel"
desc = "A green satchel for plant related work."
icon_state = "satchel_hyd"
-
+/obj/item/weapon/storage/backpack/satchel_cap
+ name = "captain's satchel"
+ desc = "An exclusive satchel for Nanotrasen officers."
+ icon_state = "satchel-cap"
+ item_state = "captainpack"
/obj/item/weapon/storage/backpack/bandolier
name = "bandolier"
desc = "It's a very old bandolier to wear on your back."
icon_state = "bandolier"
-/obj/item/weapon/storage/backpack/medicalsatchel
- name = "medic's satchel"
- desc = "Easy to access medical satchel for quick responses."
- icon_state = "medicalsatchel"
-
/obj/item/weapon/storage/backpack/industrial
name = "industrial backpack"
desc = "It's a tough backpack for the daily grind of station life."
icon_state = "engiepack"
-
-/obj/item/weapon/storage/backpack/industrial/full
- name = "loaded industrial backpack"
- desc = "A tough backpack for the daily grind, full of gear"
- icon_state = "engiepack"
-
-//Spawns with 2 glass, 2 metal, 1 steel, and 2 special boxes.
- New()
- ..()
- for(var/i = 1, i <=2, i++)
- var/obj/item/stack/sheet/glass/G = new /obj/item/stack/sheet/glass(src)
- G.amount = 50
- G.loc = src
- for(var/i = 1, i <=2, i++)
- var/obj/item/stack/sheet/metal/G = new /obj/item/stack/sheet/metal(src)
- G.amount = 50
- G.loc = src
- var/obj/item/stack/sheet/plasteel/R = new /obj/item/stack/sheet/plasteel(src)
- R.amount = 50
- R.loc = src
- var/obj/item/weapon/storage/box/B1 = new /obj/item/weapon/storage/box(src)
- B1.name = "power and airlock circuit box"
- B1.desc = "Bursting with repair gear"
- B1.w_class = 2
- for(var/i = 1, i <= 7, i++)
- if(i < 4)
- var/obj/item/weapon/module/power_control/P = new /obj/item/weapon/module/power_control(B1)
- P.loc = B1
- if(i >= 4)
- var/obj/item/weapon/airlock_electronics/P = new /obj/item/weapon/airlock_electronics(B1)
- P.loc = B1
- var/obj/item/weapon/storage/box/B2 = new /obj/item/weapon/storage/box(src)
- B2.name = "power cells and wire box"
- B2.desc = "Bursting with repair gear"
- B2.w_class = 2
- var/color = pick("red","yellow","green","blue")
- for(var/i = 1, i <= 7, i++)
- if(i < 4)
- var/obj/item/weapon/cable_coil/P = new /obj/item/weapon/cable_coil(B2,30,color)
- P.loc = B2
- if(i >= 4)
- var/obj/item/weapon/cell/P = new /obj/item/weapon/cell(B2)
- P.maxcharge = 15000
- P.charge = 15000
- P.updateicon()
- P.loc = B2
- return
+ item_state = "engiepack"
/obj/item/weapon/storage/briefcase
name = "briefcase"
@@ -265,7 +210,7 @@
icon_state = "wallet"
w_class = 2
can_hold = list(
- "/obj/item/weapon/money",
+ "/obj/item/weapon/spacecash",
"/obj/item/weapon/card",
"/obj/item/clothing/mask/cigarette",
"/obj/item/device/flashlight/pen",
@@ -316,10 +261,10 @@
/obj/item/weapon/storage/wallet/random/New()
..()
- var/item1_type = pick( /obj/item/weapon/money/c10,/obj/item/weapon/money/c100,/obj/item/weapon/money/c1000,/obj/item/weapon/money/c20,/obj/item/weapon/money/c200,/obj/item/weapon/money/c50, /obj/item/weapon/money/c500)
+ var/item1_type = pick( /obj/item/weapon/spacecash/c10,/obj/item/weapon/spacecash/c100,/obj/item/weapon/spacecash/c1000,/obj/item/weapon/spacecash/c20,/obj/item/weapon/spacecash/c200,/obj/item/weapon/spacecash/c50, /obj/item/weapon/spacecash/c500)
var/item2_type
if(prob(50))
- item2_type = pick( /obj/item/weapon/money/c10,/obj/item/weapon/money/c100,/obj/item/weapon/money/c1000,/obj/item/weapon/money/c20,/obj/item/weapon/money/c200,/obj/item/weapon/money/c50, /obj/item/weapon/money/c500)
+ item2_type = pick( /obj/item/weapon/spacecash/c10,/obj/item/weapon/spacecash/c100,/obj/item/weapon/spacecash/c1000,/obj/item/weapon/spacecash/c20,/obj/item/weapon/spacecash/c200,/obj/item/weapon/spacecash/c50, /obj/item/weapon/spacecash/c500)
var/item3_type = pick( /obj/item/weapon/coin/silver, /obj/item/weapon/coin/silver, /obj/item/weapon/coin/gold, /obj/item/weapon/coin/iron, /obj/item/weapon/coin/iron, /obj/item/weapon/coin/iron )
spawn(2)
@@ -350,7 +295,7 @@
/obj/item/weapon/storage/firstaid
name = "first-aid kit"
- desc = "In case of injury."
+ desc = "It's an emergency medical kit for those serious boo-boos."
icon_state = "firstaid"
throw_speed = 2
throw_range = 8
@@ -358,7 +303,7 @@
/obj/item/weapon/storage/firstaid/fire
name = "fire first-aid kit"
- desc = "Contains burn treatments."
+ desc = "It's an emergency medical kit for when the toxins lab -spontaneously- burns down."
icon_state = "ointment"
item_state = "firstaid-ointment"
@@ -368,31 +313,25 @@
/obj/item/weapon/storage/syringes
name = "syringes"
desc = "A box full of syringes."
- desc = "A biohazard alert warning is printed on the box."
+ desc = "A biohazard alert warning is printed on the box"
icon_state = "syringe"
foldable = /obj/item/stack/sheet/cardboard //BubbleWrap
/obj/item/weapon/storage/firstaid/toxin
name = "toxin first aid"
- desc = "Contains anti-toxin medication."
+ desc = "Used to treat when you have a high amoutn of toxins in your body."
icon_state = "antitoxin"
item_state = "firstaid-toxin"
/obj/item/weapon/storage/firstaid/o2
name = "oxygen deprivation first aid"
- desc = "Contains oxygen deprivation medication."
+ desc = "A box full of oxygen goodies."
icon_state = "o2"
item_state = "firstaid-o2"
-/obj/item/weapon/storage/firstaid/adv
- name = "advanced first-aid kit"
- desc = "Contains advanced medical treatments."
- icon_state = "advfirstaid"
- item_state = "firstaid-advanced"
-
/obj/item/weapon/storage/flashbang_kit
name = "flashbangs (WARNING)"
- desc = ""
+ desc = "WARNING: These devices are extremely dangerous and can cause blindness or deafness in repeated use."
icon_state = "flashbang"
item_state = "syringe_kit"
foldable = /obj/item/stack/sheet/cardboard //BubbleWrap
@@ -406,7 +345,7 @@
/obj/item/weapon/storage/gl_kit
name = "Prescription Glasses"
- desc = "This box contains vison correcting glasses."
+ desc = "This box contains nerd glasses."
icon_state = "glasses"
item_state = "syringe_kit"
foldable = /obj/item/stack/sheet/cardboard //BubbleWrap
@@ -414,7 +353,7 @@
/obj/item/weapon/storage/seccart_kit
name = "Spare R.O.B.U.S.T. Cartridges"
desc = "A box full of R.O.B.U.S.T. Cartridges, used by Security."
- icon = 'pda.dmi'
+ icon = 'icons/obj/pda.dmi'
icon_state = "pdabox"
item_state = "syringe_kit"
foldable = /obj/item/stack/sheet/cardboard //BubbleWrap
@@ -428,7 +367,7 @@
/obj/item/weapon/storage/id_kit
name = "Spare IDs"
- desc = "Has many empty IDs."
+ desc = "Has so many empty IDs."
icon_state = "id"
item_state = "syringe_kit"
foldable = /obj/item/stack/sheet/cardboard //BubbleWrap
@@ -442,21 +381,21 @@
/obj/item/weapon/storage/injectbox
name = "DNA-Injectors"
- desc = "This box contains injectors."
+ desc = "This box contains injectors it seems."
icon_state = "box"
item_state = "syringe_kit"
foldable = /obj/item/stack/sheet/cardboard //BubbleWrap
/obj/item/weapon/storage/stma_kit
name = "Sterile Masks"
- desc = "This box contains masks of +2 constitution." //I made it better. --SkyMarshal
- icon_state = "mask"
+ desc = "This box contains masks of sterility."
+ icon_state = "sterile"
item_state = "syringe_kit"
foldable = /obj/item/stack/sheet/cardboard //BubbleWrap
/obj/item/weapon/storage/trackimp_kit
name = "Tracking Implant Kit"
- desc = "Box full of tracking implants."
+ desc = "Box full of scum-bag tracking utensils."
icon_state = "implant"
item_state = "syringe_kit"
foldable = /obj/item/stack/sheet/cardboard //BubbleWrap
@@ -468,124 +407,59 @@
item_state = "syringe_kit"
foldable = /obj/item/stack/sheet/cardboard //BubbleWrap
-/obj/item/weapon/storage/deathalarm_kit
- name = "Death Alarm Kit"
- desc = "Box of stuff used to implant death alarms."
- icon_state = "implant"
- item_state = "syringe_kit"
-
- New()
- ..()
- new /obj/item/weapon/implanter(src)
- new /obj/item/weapon/implantcase/death_alarm(src)
- new /obj/item/weapon/implantcase/death_alarm(src)
- new /obj/item/weapon/implantcase/death_alarm(src)
- new /obj/item/weapon/implantcase/death_alarm(src)
- new /obj/item/weapon/implantcase/death_alarm(src)
- new /obj/item/weapon/implantcase/death_alarm(src)
-
/obj/item/weapon/storage/toolbox
name = "toolbox"
- desc = "Danger. Very heavy."
- icon = 'storage.dmi'
+ desc = "Danger. Very robust."
+ icon = 'icons/obj/storage.dmi'
icon_state = "red"
item_state = "toolbox_red"
flags = FPRINT | TABLEPASS| CONDUCT
- force = 10.0
+ force = 5.0
throwforce = 10.0
throw_speed = 1
throw_range = 7
w_class = 4.0
origin_tech = "combat=1"
-
- var/selfdamage = 0
-
-/obj/item/weapon/storage/toolbox/afterattack(atom/target as mob|obj|turf|area, mob/user as mob)
- if(contents.len && istype(user.loc, /turf) && prob(10))
- // have a chance to swing open
- user.visible_message("\red \The [src] swings wide open and its contents are scattered on the floor!")
- for(var/obj/O in contents)
- O.loc = user.loc
- O.layer = OBJ_LAYER
- if(prob(50)) step_rand(O)
- ..()
+ attack_verb = list("robusted")
/obj/item/weapon/storage/toolbox/emergency
name = "emergency toolbox"
- desc = "A toolbox for emergencies"
icon_state = "red"
item_state = "toolbox_red"
/obj/item/weapon/storage/toolbox/mechanical
name = "mechanical toolbox"
- desc = "A toolbox for holding tools about machinery."
icon_state = "blue"
item_state = "toolbox_blue"
/obj/item/weapon/storage/toolbox/electrical
name = "electrical toolbox"
- desc = "A toolbox for holding tools about electronics."
icon_state = "yellow"
item_state = "toolbox_yellow"
-/obj/item/weapon/storage/PCMBox
- name = "spare power control modules"
- desc = "A box of spare power control module circuit boards."
- icon = 'storage.dmi'
- icon_state = "circuit"
- item_state = "syringe_kit"
-
-/obj/item/weapon/storage/AirlockBox
- name = "spare airlock electronics"
- desc = "A box of spare airlock circuit boards."
- icon = 'storage.dmi'
- icon_state = "circuit"
- item_state = "syringe_kit"
-
/obj/item/weapon/storage/toolbox/syndicate
- name = "red and black toolbox"
- desc = "An oddly coloured toolbox."
+ name = "suspicious looking toolbox"
icon_state = "syndicate"
item_state = "toolbox_syndi"
origin_tech = "combat=1;syndicate=1"
- force = 14.0
-
-/obj/item/weapon/storage/book
- name = "book"
- icon = 'library.dmi'
- icon_state ="book"
- throw_speed = 1
- throw_range = 5
- w_class = 2.0
- max_w_class = 1
- max_combined_w_class = 3
- storage_slots = 3
- flags = FPRINT | TABLEPASS
+ force = 7.0
/obj/item/weapon/storage/bible
name = "bible"
- desc = "Holds the word of religion."
+ desc = "Apply to head repeatedly."
icon_state ="bible"
throw_speed = 1
throw_range = 5
- w_class = 2.0
- max_w_class = 1
- max_combined_w_class = 7
- storage_slots = 7
+ w_class = 3.0
flags = FPRINT | TABLEPASS
var/mob/affecting = null
var/deity_name = "Christ"
/obj/item/weapon/storage/bible/booze
name = "bible"
- desc = "Holds the word of religion."
+ desc = "To be applied to the head repeatedly."
icon_state ="bible"
-/obj/item/weapon/storage/bible/tajaran
- name = "The Holy Book of S'rendarr"
- desc = "Holds the word of religion."
- icon_state ="koran"
-
/obj/item/weapon/storage/mousetraps
name = "box of Pest-B-Gon Mousetraps"
desc = "WARNING:Keep out of reach of children."
@@ -690,7 +564,7 @@
/obj/item/stack/sheet/plasma,
/obj/item/stack/sheet/uranium,
/obj/item/stack/sheet/diamond,
-// /obj/item/stack/sheet/clown,
+ /obj/item/stack/sheet/clown,
/obj/item/stack/sheet/plasteel,
/obj/item/stack/rods
@@ -704,3 +578,23 @@
R.amount = R.max_amount
return
+
+
+/obj/item/weapon/storage/satchel
+ name = "Mining Satchel"
+ desc = "This little bugger can be used to store and transport ores."
+ icon = 'icons/obj/mining.dmi'
+ icon_state = "satchel"
+ slot_flags = SLOT_BELT | SLOT_POCKET
+ w_class = 3
+ storage_slots = 50
+ max_combined_w_class = 200 //Doesn't matter what this is, so long as it's more or equal to storage_slots * ore.w_class
+ use_to_pickup = 1
+ max_w_class = 3
+ display_contents_with_number = 1
+ allow_quick_empty = 1
+ allow_quick_gather = 1
+
+ can_hold = list(
+ "/obj/item/weapon/ore"
+ )
\ No newline at end of file
diff --git a/code/defines/obj/supplypacks.dm b/code/defines/obj/supplypacks.dm
index 00781ec923..9d2fb25d00 100755
--- a/code/defines/obj/supplypacks.dm
+++ b/code/defines/obj/supplypacks.dm
@@ -3,6 +3,8 @@
//NOTE: hidden packs only show up when the computer has been hacked.
//ANOTER NOTE: Contraband is obtainable through modified supplycomp circuitboards.
//BIG NOTE: Don't add living things to crates, that's bad, it will break the shuttle.
+//NEW NOTE: Do NOT set the price of any crates below 7 points. Doing so allows infinite points.
+
/datum/supply_packs/specialops
name = "Special Ops supplies"
contains = list("/obj/item/weapon/storage/emp_kit",
@@ -10,195 +12,12 @@
"/obj/item/weapon/smokebomb",
"/obj/item/weapon/smokebomb",
"/obj/item/weapon/pen/paralysis",
- "/obj/item/weapon/chem_grenade/incendiary")
+ "/obj/item/weapon/grenade/chem_grenade/incendiary")
cost = 20
containertype = "/obj/structure/closet/crate"
containername = "Special Ops crate"
hidden = 1
-/datum/supply_packs/boxes
- name = "Empty Box supplies"
- contains = list("/obj/item/weapon/storage/box",
- "/obj/item/weapon/storage/box",
- "/obj/item/weapon/storage/box",
- "/obj/item/weapon/storage/box",
- "/obj/item/weapon/storage/box",
- "/obj/item/weapon/storage/box",
- "/obj/item/weapon/storage/box",
- "/obj/item/weapon/storage/box",
- "/obj/item/weapon/storage/box",
- "/obj/item/weapon/storage/box",)
- cost = 5
- containertype = "/obj/structure/closet/crate"
- containername = "Empty Box crate"
-
-/datum/supply_packs/pcm
- name = "APC and Airlock Electronics crate"
- contains = list("/obj/item/weapon/storage/PCMBox",
- "/obj/item/weapon/storage/AirlockBox")
- cost = 25
- containertype = "/obj/structure/closet/crate"
- containername = "Power Control Module crate"
- group = "Engineering"
-
-/datum/supply_packs/body_bags
- name = "Body Bag supplies"
- contains = list(
- "/obj/item/weapon/bodybag",
- "/obj/item/weapon/bodybag",
- "/obj/item/weapon/bodybag",
- "/obj/item/weapon/bodybag",
- )
- cost = 10
- containertype = "/obj/structure/closet/crate"
- containername = "Body Bag crate"
-
-/datum/supply_packs/stationary
- name = "Stationary supplies"
- contains = list("/obj/item/device/taperecorder",
- "/obj/item/weapon/packageWrap",
- "/obj/item/weapon/clipboard",
- "/obj/item/weapon/clipboard",
- "/obj/item/weapon/hand_labeler",
- "/obj/item/weapon/paper_bin",
- "/obj/item/weapon/pen",
- "/obj/item/weapon/pen",
- "/obj/item/weapon/pen",
- "/obj/item/weapon/stamp",
- "/obj/item/weapon/stamp/denied",
- "/obj/item/weapon/storage/diskbox",
- "/obj/item/weapon/storage/recordsbox",
- )
- cost = 5
- containertype = "/obj/structure/closet/crate"
- containername = "Stationary crate"
-
-/datum/supply_packs/artscrafts
- name = "Arts and Crafts supplies"
- contains = list("/obj/item/weapon/storage/crayonbox",
- "/obj/item/weapon/camera_test",
- "/obj/item/weapon/camera_film",
- "/obj/item/weapon/camera_film",
- "/obj/item/weapon/storage/photo_album",
- "/obj/item/weapon/packageWrap",
- "/obj/item/weapon/reagent_containers/glass/paint/red",
- "/obj/item/weapon/reagent_containers/glass/paint/green",
- "/obj/item/weapon/reagent_containers/glass/paint/blue",
- "/obj/item/weapon/reagent_containers/glass/paint/yellow",
- "/obj/item/weapon/reagent_containers/glass/paint/violet",
- "/obj/item/weapon/reagent_containers/glass/paint/black",
- "/obj/item/weapon/reagent_containers/glass/paint/white",
- "/obj/item/weapon/reagent_containers/glass/paint/remover",
- "/obj/item/weapon/wrapping_paper",
- "/obj/item/weapon/wrapping_paper",
- "/obj/item/weapon/wrapping_paper")
- cost = 5
- containertype = "/obj/structure/closet/crate"
- containername = "Arts and Crafts crate"
-
-/datum/supply_packs/empty
- name = "Empty crate"
- contains = list()
- cost = 5
- containertype = "/obj/structure/closet/crate"
- containername = "crate"
-
-/datum/supply_packs/charge
- cost = 10
- containertype = "/obj/structure/closet/crate"
- group = "Charges"
-
-/datum/supply_packs/charge/medical
- name = "Medical Charge"
- contains = list("/obj/item/weapon/vending_charge/medical")
- containername = "Medical charge crate"
-
-/datum/supply_packs/charge/chemistry
- name = "Chemistry Charge"
- contains = list("/obj/item/weapon/vending_charge/chemistry")
- containername = "Chemistry charge crate"
-
-/datum/supply_packs/charge/toxins
- name = "Toxins Research Charge"
- contains = list("/obj/item/weapon/vending_charge/toxins")
- containername = "Toxins Research charge crate"
-
-/* removed these for now, as to not confuse people (the machines are in the tg map)
-/datum/supply_packs/charge/genetics
- name = "Genetics Research Charge"
- contains = list("/obj/item/weapon/vending_charge/genetics")
- containername = "Genetics charge crate"
-
-/datum/supply_packs/charge/robotics
- name = "Robotics Charge"
- contains = list("/obj/item/weapon/vending_charge/robotics")
- containername = "Robotics charge crate"
-*/
-
-/datum/supply_packs/charge/bar
- name = "Bar Charge"
- contains = list("/obj/item/weapon/vending_charge/bar")
- containername = "Bar charge crate"
-
-/datum/supply_packs/charge/kitchen
- name = "Kitchen Charge"
- contains = list("/obj/item/weapon/vending_charge/kitchen")
- containername = "Kitchen charge crate"
-
-/datum/supply_packs/charge/engineering
- name = "Engineering Charge"
- contains = list("/obj/item/weapon/vending_charge/engineering")
- containername = "Engineering charge crate"
-
-/datum/supply_packs/charge/security
- name = "Security Charge"
- contains = list("/obj/item/weapon/vending_charge/security")
- containername = "Security charge crate"
-
-/datum/supply_packs/charge/coffee
- name = "Coffee Charge"
- contains = list("/obj/item/weapon/vending_charge/coffee")
- containername = "Coffee charge crate"
-
-/datum/supply_packs/charge/snack
- name = "Snack Charge"
- contains = list("/obj/item/weapon/vending_charge/snack")
- containername = "Snack charge crate"
-
-/datum/supply_packs/charge/liquidfood
- name = "\"LiquidFood\" Charge"
- contains = list("/obj/item/weapon/vending_charge/liquid")
- containername = "LiquidFood charge crate"
-
-/*
-/datum/supply_packs/charge/cart
- name = "PDA Cart Charge"
- contains = list("/obj/item/weapon/vending_charge/cart")
- containername = "PDA Cart charge crate"
-*/
-
-/datum/supply_packs/charge/cigarette
- name = "Cigarette Charge"
- contains = list("/obj/item/weapon/vending_charge/cigarette")
- containername = "Cigarette charge crate"
-
-/datum/supply_packs/charge/soda
- name = "Soda Charge"
- contains = list("/obj/item/weapon/vending_charge/soda")
- containername = "Soda machine charge crate"
-
-/datum/supply_packs/charge/hydroponics
- name = "Hydroponics Charge"
- contains = list("/obj/item/weapon/vending_charge/hydroponics")
- containername = "Hydroponics charge crate"
-
-/* Wrong toxins charge!
-/datum/supply_packs/charge/tl
- name = "Toxins Lab Charge"
- contains = list("/obj/item/weapon/vending_charge/toxinslab")
- containername = "Toxins Lab charge crate"
-*/
-
/datum/supply_packs/food
name = "Food crate"
contains = list("/obj/item/weapon/reagent_containers/food/snacks/flour",
@@ -208,35 +27,22 @@
"/obj/item/weapon/reagent_containers/food/snacks/flour",
"/obj/item/weapon/reagent_containers/food/drinks/milk",
"/obj/item/weapon/reagent_containers/food/drinks/milk",
- "/obj/item/kitchen/egg_box",
+ "/obj/item/weapon/storage/fancy/egg_box",
"/obj/item/weapon/reagent_containers/food/condiment/enzyme",
"/obj/item/weapon/reagent_containers/food/snacks/grown/banana",
"/obj/item/weapon/reagent_containers/food/snacks/grown/banana",
"/obj/item/weapon/reagent_containers/food/snacks/grown/banana")
- cost = 5
+ cost = 10
containertype = "/obj/structure/closet/crate/freezer"
containername = "Food crate"
- group = "Kitchen / Bar"
/datum/supply_packs/monkey
name = "Monkey crate"
- contains = list ("/obj/item/weapon/monkeycube_box")
+ contains = list ("/obj/item/weapon/storage/monkeycube_box")
cost = 20
containertype = "/obj/structure/closet/crate/freezer"
containername = "Monkey crate"
- group = "Medical / Science"
-/*
-/datum/supply_packs/shotgun
- name = "Shotgun crate"
- contains = list("/obj/item/weapon/gun/projectile/shotgun",
- "/obj/item/ammo_casing/shotgun/beanbag",
- "/obj/item/ammo_casing/shotgun/beanbag")
- cost = 25
- containertype = "/obj/structure/closet/crate"
- containername = "Shotgun crate"
-//APPARENTLY OP?
-*/
/datum/supply_packs/beanbagammo
name = "Beanbag shells"
@@ -253,7 +59,18 @@
cost = 10
containertype = "/obj/structure/closet/crate"
containername = "Beanbag shells"
- group = "Security"
+
+/datum/supply_packs/toner
+ name = "Toner Cartridges"
+ contains = list("/obj/item/device/toner",
+ "/obj/item/device/toner",
+ "/obj/item/device/toner",
+ "/obj/item/device/toner",
+ "/obj/item/device/toner",
+ "/obj/item/device/toner")
+ cost = 10
+ containertype = "/obj/structure/closet/crate"
+ containername = "Toner Cartridges"
/datum/supply_packs/party
name = "Party equipment"
@@ -270,52 +87,36 @@
cost = 20
containertype = "/obj/structure/closet/crate"
containername = "Party equipment"
- group = "Kitchen / Bar"
/datum/supply_packs/internals
name = "Internals crate"
- contains = list("/obj/item/clothing/mask/breath",
- "/obj/item/clothing/mask/breath",
- "/obj/item/clothing/mask/breath",
- "/obj/item/clothing/mask/breath",
- "/obj/item/clothing/mask/breath",
- "/obj/item/weapon/tank/air",
- "/obj/item/weapon/tank/air",
+ contains = list("/obj/item/clothing/mask/gas",
+ "/obj/item/clothing/mask/gas",
+ "/obj/item/clothing/mask/gas",
"/obj/item/weapon/tank/air",
"/obj/item/weapon/tank/air",
"/obj/item/weapon/tank/air")
- cost = 30
+ cost = 10
containertype = "/obj/structure/closet/crate/internals"
containername = "Internals crate"
-/datum/supply_packs/emergency_internals
- name = "Emergency Internals crate"
- contains = list("/obj/item/clothing/mask/breath",
- "/obj/item/clothing/mask/breath",
- "/obj/item/clothing/mask/breath",
- "/obj/item/clothing/mask/breath",
- "/obj/item/clothing/mask/breath",
- "/obj/item/weapon/tank/emergency_oxygen",
- "/obj/item/weapon/tank/emergency_oxygen",
- "/obj/item/weapon/tank/emergency_oxygen",
- "/obj/item/weapon/tank/emergency_oxygen",
- "/obj/item/weapon/tank/emergency_oxygen")
- cost = 10
- containertype = "/obj/structure/closet/crate/internals"
- containername = "Emergency Internals crate"
-
/datum/supply_packs/evacuation
name = "Emergency equipment"
- contains = list("/obj/item/weapon/tank/emergency_oxygen",
- "/obj/item/weapon/tank/emergency_oxygen",
+ contains = list("/obj/machinery/bot/floorbot",
+ "/obj/machinery/bot/floorbot",
+ "/obj/machinery/bot/medbot",
+ "/obj/machinery/bot/medbot",
+ "/obj/item/weapon/tank/air",
+ "/obj/item/weapon/tank/air",
+ "/obj/item/weapon/tank/air",
+ "/obj/item/weapon/tank/air",
+ "/obj/item/weapon/tank/air",
"/obj/item/clothing/mask/gas",
"/obj/item/clothing/mask/gas",
- "/obj/item/weapon/storage/toolbox/emergency",
- "/obj/item/weapon/storage/toolbox/emergency",
- "/obj/item/weapon/storage/toolbox/emergency",
- "/obj/item/weapon/chem_grenade/metalfoam",
- "/obj/item/weapon/chem_grenade/metalfoam")
- cost = 15
+ "/obj/item/clothing/mask/gas",
+ "/obj/item/clothing/mask/gas",
+ "/obj/item/clothing/mask/gas")
+ cost = 35
containertype = "/obj/structure/closet/crate/internals"
containername = "Emergency Crate"
@@ -329,9 +130,9 @@
"/obj/item/weapon/caution",
"/obj/item/weapon/caution",
"/obj/item/weapon/cleaner",
- "/obj/item/weapon/chem_grenade/cleaner",
- "/obj/item/weapon/chem_grenade/cleaner",
- "/obj/item/weapon/chem_grenade/cleaner",
+ "/obj/item/weapon/grenade/chem_grenade/cleaner",
+ "/obj/item/weapon/grenade/chem_grenade/cleaner",
+ "/obj/item/weapon/grenade/chem_grenade/cleaner",
"/obj/structure/mopbucket")
cost = 10
containertype = "/obj/structure/closet/crate"
@@ -342,7 +143,7 @@
contains = list("/obj/item/weapon/storage/lightbox/mixed",
"/obj/item/weapon/storage/lightbox/mixed",
"/obj/item/weapon/storage/lightbox/mixed")
- cost = 5
+ cost = 10
containertype = "/obj/structure/closet/crate"
containername = "Replacement lights"
@@ -363,8 +164,7 @@
cost = 10
containertype = "/obj/structure/closet/crate/secure"
containername = "Standard Costumes"
- access = ACCESS_THEATRE
- group = "Clothing"
+ access = access_theatre
/datum/supply_packs/wizard
name = "Wizard costume"
@@ -375,13 +175,12 @@
cost = 20
containertype = "/obj/structure/closet/crate"
containername = "Wizard costume crate"
- group = "Clothing"
/datum/supply_packs/mule
name = "MULEbot Crate"
contains = list("/obj/machinery/bot/mulebot")
cost = 20
- containertype = "/obj/structure/closet/crate"
+ containertype = "/obj/structure/largecrate/mule"
containername = "MULEbot Crate"
/datum/supply_packs/hydroponics // -- Skie
@@ -394,12 +193,11 @@
"/obj/item/weapon/minihoe",
"/obj/item/device/analyzer/plant_analyzer",
"/obj/item/clothing/gloves/botanic_leather",
- "/obj/item/clothing/suit/storage/apron") // Updated with new things
+ "/obj/item/clothing/suit/apron") // Updated with new things
cost = 10
- containertype = /obj/structure/closet/crate/hydroponics
+ containertype = "/obj/structure/closet/crate/hydroponics"
containername = "Hydroponics crate"
- access = ACCESS_HYDROPONICS
- group = "Hydroponics"
+ access = access_hydroponics
/datum/supply_packs/seeds
name = "Seeds Crate"
@@ -416,10 +214,10 @@
"/obj/item/seeds/potatoseed",
"/obj/item/seeds/sugarcaneseed")
cost = 10
- containertype = /obj/structure/closet/crate/hydroponics
+ containertype = "/obj/structure/closet/crate/hydroponics"
containername = "Seeds crate"
- access = ACCESS_HYDROPONICS
- group = "Hydroponics"
+ access = access_hydroponics
+
/datum/supply_packs/exoticseeds
name = "Exotic Seeds Crate"
@@ -430,13 +228,13 @@
"/obj/item/seeds/plumpmycelium",
"/obj/item/seeds/libertymycelium",
"/obj/item/seeds/amanitamycelium",
+ "/obj/item/seeds/reishimycelium",
"/obj/item/seeds/bananaseed",
"/obj/item/seeds/eggyseed")
cost = 15
- containertype = /obj/structure/closet/crate/hydroponics
+ containertype = "/obj/structure/closet/crate/hydroponics"
containername = "Exotic Seeds crate"
- access = ACCESS_HYDROPONICS
- group = "Hydroponics"
+ access = access_hydroponics
/datum/supply_packs/medical
name = "Medical crate"
@@ -444,18 +242,15 @@
"/obj/item/weapon/storage/firstaid/fire",
"/obj/item/weapon/storage/firstaid/toxin",
"/obj/item/weapon/storage/firstaid/o2",
- "/obj/item/weapon/storage/firstaid/adv",
"/obj/item/weapon/reagent_containers/glass/bottle/antitoxin",
"/obj/item/weapon/reagent_containers/glass/bottle/inaprovaline",
"/obj/item/weapon/reagent_containers/glass/bottle/stoxin",
- "/obj/item/weapon/storage/syringes",
- "/obj/item/weapon/reagent_containers/glass/large")
- cost = 20
+ "/obj/item/weapon/storage/syringes")
+ cost = 10
containertype = "/obj/structure/closet/crate/medical"
containername = "Medical crate"
- group = "Medical / Science"
-/* yay for new virus system
+
/datum/supply_packs/virus
name = "Virus crate"
contains = list("/obj/item/weapon/reagent_containers/glass/bottle/flu_virion",
@@ -471,9 +266,7 @@
cost = 20
containertype = "/obj/structure/closet/crate/secure/weapon"
containername = "Virus crate"
- access = ACCESS_CMO
- group = "Medical / Science"
-*/
+ access = access_cmo
/datum/supply_packs/metal50
name = "50 Metal Sheets"
@@ -482,7 +275,6 @@
cost = 10
containertype = "/obj/structure/closet/crate"
containername = "Metal sheets crate"
- group = "Engineering"
/datum/supply_packs/glass50
name = "50 Glass Sheets"
@@ -491,7 +283,6 @@
cost = 10
containertype = "/obj/structure/closet/crate"
containername = "Glass sheets crate"
- group = "Engineering"
/datum/supply_packs/electrical
name = "Electrical maintenance crate"
@@ -503,91 +294,58 @@
"/obj/item/weapon/cell",
"/obj/item/weapon/cell/high",
"/obj/item/weapon/cell/high")
- cost = 20
- containertype = "/obj/structure/closet/crate/secure"
+ cost = 15
+ containertype = "/obj/structure/closet/crate"
containername = "Electrical maintenance crate"
- access = ACCESS_ENGINE
- group = "Engineering"
/datum/supply_packs/mechanical
name = "Mechanical maintenance crate"
contains = list("/obj/item/weapon/storage/belt/utility/full",
"/obj/item/weapon/storage/belt/utility/full",
- "/obj/item/clothing/head/helmet/welding",
- "/obj/item/clothing/head/helmet/welding",
- "/obj/item/weapon/storage/toolbox/mechanical",
- "/obj/item/weapon/storage/toolbox/mechanical")
- cost = 15
- containertype = "/obj/structure/closet/crate/secure"
- containername = "Mechanical maintenance crate"
- access = ACCESS_ENGINE
- group = "Engineering"
-
-//"/obj/item/tape/engineering"
-
-/datum/supply_packs/safety_gear
- name = "Safety gear crate"
- contains = list("/obj/item/clothing/gloves/fingerless/black",
- "/obj/item/clothing/gloves/fingerless/black",
- "/obj/item/device/flashlight",
- "/obj/item/device/flashlight",
+ "/obj/item/weapon/storage/belt/utility/full",
"/obj/item/clothing/suit/hazardvest",
"/obj/item/clothing/suit/hazardvest",
- "/obj/item/clothing/head/helmet/hardhat",
- "/obj/item/clothing/head/helmet/hardhat")
+ "/obj/item/clothing/suit/hazardvest",
+ "/obj/item/clothing/head/welding",
+ "/obj/item/clothing/head/welding",
+ "/obj/item/clothing/head/hardhat")
cost = 10
- containertype = "/obj/structure/closet/crate/secure"
- containername = "Safety gear crate"
- group = "Engineering"
-
-/datum/supply_packs/firefighting
- name = "Firefighting equipment crate"
- contains = list("/obj/item/clothing/mask/gas",
- "/obj/item/clothing/mask/gas",
- "/obj/item/clothing/head/helmet/space/fire_helmet",
- "/obj/item/clothing/head/helmet/space/fire_helmet",
- "/obj/item/clothing/suit/fire/heavy",
- "/obj/item/clothing/suit/fire/heavy",
- "/obj/item/weapon/extinguisher",
- "/obj/item/weapon/extinguisher")
- cost = 20
containertype = "/obj/structure/closet/crate"
- containername = "Firefighting equipment crate"
- group = "Engineering"
- access = ACCESS_ATMOSPHERICS
+ containername = "Mechanical maintenance crate"
-/datum/supply_packs/waterfueltank
- name = "Water/Fuel tank crate"
- contains = list("/obj/structure/reagent_dispensers/watertank",
- "/obj/structure/reagent_dispensers/fueltank")
- cost = 15
- containertype = "/obj/structure/closet/crate"
- containername = "Water/Fuel tank crate"
+/datum/supply_packs/watertank
+ name = "Water tank crate"
+ contains = list("/obj/structure/reagent_dispensers/watertank")
+ cost = 8
+ containertype = "/obj/structure/largecrate"
+ containername = "water tank crate"
+
+/datum/supply_packs/fueltank
+ name = "Fuel tank crate"
+ contains = list("/obj/structure/reagent_dispensers/fueltank")
+ cost = 8
+ containertype = "/obj/structure/largecrate"
+ containername = "fuel tank crate"
/datum/supply_packs/engine
name = "Emitter crate"
contains = list("/obj/machinery/emitter",
"/obj/machinery/emitter",)
- cost = 15
+ cost = 10
containertype = "/obj/structure/closet/crate/secure"
containername = "Emitter crate"
- access = ACCESS_HEADS
- group = "Engineering"
+ access = access_heads
/datum/supply_packs/engine/field_gen
name = "Field Generator crate"
contains = list("/obj/machinery/field_generator",
"/obj/machinery/field_generator",)
containername = "Field Generator crate"
- cost = 15
- group = "Engineering"
/datum/supply_packs/engine/sing_gen
name = "Singularity Generator crate"
contains = list("/obj/machinery/the_singularitygen")
containername = "Singularity Generator crate"
- cost = 15
- group = "Engineering"
/datum/supply_packs/engine/collector
name = "Collector crate"
@@ -595,8 +353,6 @@
"/obj/machinery/power/rad_collector",
"/obj/machinery/power/rad_collector")
containername = "Collector crate"
- cost = 15
- group = "Engineering"
/datum/supply_packs/engine/PA
name = "Particle Accelerator crate"
@@ -609,7 +365,6 @@
"/obj/structure/particle_accelerator/power_box",
"/obj/structure/particle_accelerator/end_cap")
containername = "Particle Accelerator crate"
- group = "Engineering"
/datum/supply_packs/mecha_ripley
name = "Circuit Crate (\"Ripley\" APLU)"
@@ -619,49 +374,17 @@
cost = 30
containertype = "/obj/structure/closet/crate/secure"
containername = "APLU \"Ripley\" Circuit Crate"
- access = ACCESS_ROBOTICS
- group = "Robotics"
-
-/datum/supply_packs/surgery
- name = "Surgery crate"
- contains = list("/obj/item/weapon/cautery",
- "/obj/item/weapon/surgicaldrill",
- "/obj/item/clothing/mask/breath/medical",
- "/obj/item/weapon/tank/anesthetic",
- "/obj/item/weapon/hemostat",
- "/obj/item/weapon/scalpel",
- "/obj/item/weapon/surgical_tool/bonegel",
- "/obj/item/weapon/retractor",
- "/obj/item/weapon/surgical_tool/bonesetter",
- "/obj/item/weapon/circular_saw")
- cost = 25
- containertype = "/obj/structure/closet/crate/secure"
- containername = "Surgery crate"
- access = ACCESS_MEDICAL
- group = "Medical / Science"
-
-/datum/supply_packs/sterile
- name = "Sterile equipment crate"
- contains = list("/obj/item/clothing/under/rank/medical/green",
- "/obj/item/clothing/under/rank/medical/green",
- "/obj/item/weapon/storage/stma_kit",
- "/obj/item/weapon/storage/lglo_kit")
- cost = 10
- containertype = "/obj/structure/closet/crate"
- containername = "Sterile equipment crate"
- group = "Medical / Science"
+ access = access_robotics
/datum/supply_packs/mecha_odysseus
name = "Circuit Crate (\"Odysseus\")"
- contains = list(
- "/obj/item/weapon/circuitboard/mecha/odysseus/peripherals", //TEMPORARY due to lack of circuitboard printer
- "/obj/item/weapon/circuitboard/mecha/odysseus/main" //TEMPORARY due to lack of circuitboard printer
- )
+ contains = list("/obj/item/weapon/circuitboard/mecha/odysseus/peripherals", //TEMPORARY due to lack of circuitboard printer
+ "/obj/item/weapon/circuitboard/mecha/odysseus/main") //TEMPORARY due to lack of circuitboard printer
cost = 25
containertype = "/obj/structure/closet/crate/secure"
containername = "\"Odysseus\" Circuit Crate"
- access = ACCESS_ROBOTICS
- group = "Robotics"
+ access = access_robotics
+
/datum/supply_packs/robotics
name = "Robotics Assembly Crate"
@@ -678,8 +401,7 @@
cost = 10
containertype = "/obj/structure/closet/crate/secure/gear"
containername = "Robotics Assembly"
- access = ACCESS_ROBOTICS
- group = "Robotics"
+ access = access_robotics
/datum/supply_packs/plasma
name = "Plasma assembly crate"
@@ -698,8 +420,7 @@
cost = 10
containertype = "/obj/structure/closet/crate/secure/plasma"
containername = "Plasma assembly crate"
- access = ACCESS_TOX
- group = "Medical / Science"
+ access = access_tox
/datum/supply_packs/weapons
name = "Weapons crate"
@@ -714,8 +435,7 @@
cost = 30
containertype = "/obj/structure/closet/crate/secure/weapon"
containername = "Weapons crate"
- access = ACCESS_SECURITY
- group = "Security"
+ access = access_security
/datum/supply_packs/eweapons
name = "Experimental weapons crate"
@@ -723,14 +443,13 @@
"/obj/item/weapon/tank/plasma",
"/obj/item/weapon/tank/plasma",
"/obj/item/weapon/tank/plasma",
- "/obj/item/weapon/chem_grenade/incendiary",
- "/obj/item/weapon/chem_grenade/incendiary",
- "/obj/item/weapon/chem_grenade/incendiary")
+ "/obj/item/weapon/grenade/chem_grenade/incendiary",
+ "/obj/item/weapon/grenade/chem_grenade/incendiary",
+ "/obj/item/weapon/grenade/chem_grenade/incendiary")
cost = 25
containertype = "/obj/structure/closet/crate/secure/weapon"
containername = "Experimental weapons crate"
- access = ACCESS_HEADS
- group = "Security"
+ access = access_heads
/datum/supply_packs/armor
name = "Armor crate"
@@ -741,8 +460,7 @@
cost = 15
containertype = "/obj/structure/closet/crate/secure"
containername = "Armor crate"
- access = ACCESS_SECURITY
- group = "Security"
+ access = access_security
/datum/supply_packs/riot
name = "Riot gear crate"
@@ -767,8 +485,7 @@
cost = 60
containertype = "/obj/structure/closet/crate/secure"
containername = "Riot gear crate"
- access = ACCESS_ARMORY
- group = "Security"
+ access = access_armory
/datum/supply_packs/loyalty
name = "Loyalty implant crate"
@@ -776,8 +493,7 @@
cost = 60
containertype = "/obj/structure/closet/crate/secure"
containername = "Loyalty implant crate"
- access = ACCESS_ARMORY
- group = "Security"
+ access = access_armory
/datum/supply_packs/ballistic
name = "Ballistic gear crate"
@@ -788,8 +504,7 @@
cost = 50
containertype = "/obj/structure/closet/crate/secure"
containername = "Ballistic gear crate"
- access = ACCESS_ARMORY
- group = "Security"
+ access = access_armory
/datum/supply_packs/expenergy
name = "Experimental energy gear crate"
@@ -800,8 +515,7 @@
cost = 50
containertype = "/obj/structure/closet/crate/secure"
containername = "Experimental energy gear crate"
- access = ACCESS_ARMORY
- group = "Security"
+ access = access_armory
/datum/supply_packs/exparmor
name = "Experimental armor crate"
@@ -812,8 +526,7 @@
cost = 35
containertype = "/obj/structure/closet/crate/secure"
containername = "Experimental armor crate"
- access = ACCESS_ARMORY
- group = "Security"
+ access = access_armory
/datum/supply_packs/securitybarriers
name = "Security Barriers"
@@ -823,26 +536,7 @@
"/obj/machinery/deployable/barrier")
cost = 20
containertype = "/obj/structure/closet/crate/secure/gear"
- containername = "Secruity Barriers crate"
- group = "Security"
-
-/datum/supply_packs/randomised/New()
- var/list/tempContains = list()
- for(var/i = 0,i[] fires a cap gun at []!", user, target), 1, "\red You hear a gunshot", 2)
@@ -184,24 +183,25 @@
/obj/item/toy/sword
name = "toy sword"
desc = "A cheap, plastic replica of an energy sword. Realistic sounds! Ages 8 and up."
- icon = 'weapons.dmi'
+ icon = 'icons/obj/weapons.dmi'
icon_state = "sword0"
item_state = "sword0"
var/active = 0.0
w_class = 2.0
flags = FPRINT | TABLEPASS | NOSHIELD
+ attack_verb = list("attacked", "struck", "hit")
attack_self(mob/user as mob)
src.active = !( src.active )
if (src.active)
user << "\blue You extend the plastic blade with a quick flick of your wrist."
- playsound(user, 'saberon.ogg', 50, 1)
+ playsound(user, 'sound/weapons/saberon.ogg', 50, 1)
src.icon_state = "swordblue"
src.item_state = "swordblue"
src.w_class = 4
else
user << "\blue You push the plastic blade back down into the handle."
- playsound(user, 'saberoff.ogg', 50, 1)
+ playsound(user, 'sound/weapons/saberoff.ogg', 50, 1)
src.icon_state = "sword0"
src.item_state = "sword0"
src.w_class = 2
@@ -211,11 +211,12 @@
/obj/item/toy/crossbow
name = "foam dart crossbow"
desc = "A weapon favored by many overactive children. Ages 8 and up."
- icon = 'gun.dmi'
+ icon = 'icons/obj/gun.dmi'
icon_state = "crossbow"
item_state = "crossbow"
flags = FPRINT | TABLEPASS | USEDELAY
w_class = 2.0
+ attack_verb = list("attacked", "struck", "hit")
var/bullets = 5
examine()
@@ -247,7 +248,7 @@
bullets--
D.icon_state = "foamdart"
D.name = "foam dart"
- playsound(user.loc, 'syringeproj.ogg', 50, 1)
+ playsound(user.loc, 'sound/items/syringeproj.ogg', 50, 1)
for(var/i=0, i<6, i++)
if (D)
@@ -295,7 +296,7 @@
O.show_message(text("\red [] casually lines up a shot with []'s head and pulls the trigger!", user, M), 1, "\red You hear the sound of foam against skull", 2)
O.show_message(text("\red [] was hit in the head by the foam dart!", M), 1)
- playsound(user.loc, 'syringeproj.ogg', 50, 1)
+ playsound(user.loc, 'sound/items/syringeproj.ogg', 50, 1)
new /obj/item/toy/ammo/crossbow(M.loc)
src.bullets--
else if (M.lying && src.bullets == 0)
@@ -307,7 +308,7 @@
/obj/item/weapon/storage/crayonbox
name = "box of crayons"
desc = "A box of crayons for all your rune drawing needs."
- icon = 'crayons.dmi'
+ icon = 'icons/obj/crayons.dmi'
icon_state = "crayonbox"
w_class = 2.0
storage_slots = 6
@@ -318,9 +319,10 @@
/obj/item/toy/crayon
name = "crayon"
desc = "A colourful crayon. Looks tasty. Mmmm..."
- icon = 'crayons.dmi'
+ icon = 'icons/obj/crayons.dmi'
icon_state = "crayonred"
w_class = 1.0
+ attack_verb = list("attacked", "coloured")
var/colour = "#FF0000" //RGB
var/shadeColour = "#220000" //RGB
var/uses = 30 //0 for unlimited uses
@@ -330,17 +332,18 @@
/obj/item/toy/snappop
name = "snap pop"
desc = "Wow!"
- icon = 'toy.dmi'
+ icon = 'icons/obj/toy.dmi'
icon_state = "snappop"
+ w_class = 1
throw_impact(atom/hit_atom)
..()
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(3, 1, src)
s.start()
- new /obj/effect/decal/ash(src.loc)
+ new /obj/effect/decal/cleanable/ash(src.loc)
src.visible_message("\red The [src.name] explodes!","\red You hear a snap!")
- playsound(src, 'snap.ogg', 50, 1)
+ playsound(src, 'sound/effects/snap.ogg', 50, 1)
del(src)
/obj/item/toy/snappop/HasEntered(H as mob|obj)
@@ -352,47 +355,15 @@
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(2, 0, src)
s.start()
- new /obj/effect/decal/ash(src.loc)
+ new /obj/effect/decal/cleanable/ash(src.loc)
src.visible_message("\red The [src.name] explodes!","\red You hear a snap!")
- playsound(src, 'snap.ogg', 50, 1)
+ playsound(src, 'sound/effects/snap.ogg', 50, 1)
del(src)
-/obj/item/toy/snappopbox
- name = "snap pop box"
- desc = "Eight wrappers of fun! Ages 8 and up. Not suitable for children."
- icon = 'toy.dmi'
- icon_state = "spbox"
- var/amount = 8
-
- attack_hand(mob/user as mob, unused, flag)
- add_fingerprint(user)
-
- if(user.r_hand == src || user.l_hand == src)
- if(amount)
- var/obj/item/toy/snappop/M = new /obj/item/toy/snappop(src)
- if (user.hand)
- user.l_hand = M
- else
- user.r_hand = M
- M.loc = user
- M.layer = 20
- user.update_clothing()
- user << "You take a snap pop out of the box."
- amount--
- else
- user << "There are no snap pops left in the box."
- else
- ..()
-
- return
-
- attack_paw(mob/user as mob)
- return attack_hand(user)
-
/obj/item/toy/waterflower
name = "Water Flower"
desc = "A seemingly innocent sunflower...with a twist."
- icon = 'harvest.dmi'
+ icon = 'icons/obj/harvest.dmi'
icon_state = "sunflower"
item_state = "sunflower"
var/empty = 0
@@ -431,11 +402,11 @@
var/obj/effect/decal/D = new/obj/effect/decal/(get_turf(src))
D.name = "water"
- D.icon = 'chemical.dmi'
+ D.icon = 'icons/obj/chemical.dmi'
D.icon_state = "chempuff"
D.create_reagents(5)
src.reagents.trans_to(D, 1)
- playsound(src.loc, 'spray3.ogg', 50, 1, -6)
+ playsound(src.loc, 'sound/effects/spray3.ogg', 50, 1, -6)
spawn(0)
for(var/i=0, i<1, i++)
@@ -459,7 +430,7 @@
/obj/item/toy/balloon
name = "water balloon"
desc = "A translucent balloon. There's nothing in it."
- icon = 'toy.dmi'
+ icon = 'icons/obj/toy.dmi'
icon_state = "waterballoon-e"
item_state = "balloon-empty"
diff --git a/code/defines/obj/vending.dm b/code/defines/obj/vending.dm
index a46fe70716..ccbdde555c 100755
--- a/code/defines/obj/vending.dm
+++ b/code/defines/obj/vending.dm
@@ -1,7 +1,7 @@
/obj/machinery/vending
name = "Vendomat"
desc = "A generic vending machine."
- icon = 'vending.dmi'
+ icon = 'icons/obj/vending.dmi'
icon_state = "generic"
layer = 2.9
anchored = 1
@@ -11,13 +11,10 @@
var/vend_delay = 10 //How long does it take to vend?
var/product_paths = "" //String of product paths separated by semicolons. No spaces!
var/product_amounts = "" //String of product amounts separated by semicolons, must have amount for every path in product_paths
- var/points = 10
- var/product_prices = "" //String of product prices in Points separated by semicolons, must have amount for every path in product_paths
var/product_slogans = "" //String of slogans separated by semicolons, optional
var/product_ads = "" //String of small ad messages in the vending screen - random chance
var/product_hidden = "" //String of products that are hidden unless hacked.
var/product_hideamt = "" //String of hidden product amounts, separated by semicolons. Exact same as amounts. Must be left blank if hidden is.
- var/hidden_prices = "" //String of product prices for hidden items
var/product_coin = ""
var/product_coin_amt = ""
var/list/product_records = list()
@@ -34,12 +31,12 @@
//var/emagged = 0 //Ignores if somebody doesn't have card access to that machine.
var/seconds_electrified = 0 //Shock customers like an airlock.
var/shoot_inventory = 0 //Fire items at customers! We're broken!
- var/shut_up = 1 //Stop spouting those godawful pitches!
+ var/shut_up = 0 //Stop spouting those godawful pitches!
var/extended_inventory = 0 //can we access the hidden inventory?
var/panel_open = 0 //Hacking that vending machine. Gonna get a free candy bar.
var/wires = 15
var/obj/item/weapon/coin/coin
- var/charge_type
+
/*
/obj/machinery/vending/[vendors name here] // --vending machine template :)
@@ -61,7 +58,7 @@
/obj/machinery/vending/atmospherics //Commenting this out until someone ponies up some actual working, broken, and unpowered sprites - Quarxink
name = "Tank Vendor"
desc = "A vendor with a wide variety of masks and gas tanks."
- icon = 'objects.dmi'
+ icon = 'icons/obj/objects.dmi'
icon_state = "dispenser"
product_paths = "/obj/item/weapon/tank/oxygen;/obj/item/weapon/tank/plasma;/obj/item/weapon/tank/emergency_oxygen;/obj/item/weapon/tank/emergency_oxygen/engi;/obj/item/clothing/mask/breath"
product_amounts = "10;10;10;5;25"
@@ -72,27 +69,22 @@
name = "Booze-O-Mat"
desc = "A technological marvel, supposedly able to mix just the mixture you'd like to drink the moment you ask for one."
icon_state = "boozeomat" //////////////18 drink entities below, plus the glasses, in case someone wants to edit the number of bottles
+ icon_deny = "boozeomat-deny"
product_paths = "/obj/item/weapon/reagent_containers/food/drinks/bottle/gin;/obj/item/weapon/reagent_containers/food/drinks/bottle/whiskey;/obj/item/weapon/reagent_containers/food/drinks/bottle/tequilla;/obj/item/weapon/reagent_containers/food/drinks/bottle/vodka;/obj/item/weapon/reagent_containers/food/drinks/bottle/vermouth;/obj/item/weapon/reagent_containers/food/drinks/bottle/rum;/obj/item/weapon/reagent_containers/food/drinks/bottle/wine;/obj/item/weapon/reagent_containers/food/drinks/bottle/cognac;/obj/item/weapon/reagent_containers/food/drinks/bottle/kahlua;/obj/item/weapon/reagent_containers/food/drinks/beer;/obj/item/weapon/reagent_containers/food/drinks/ale;/obj/item/weapon/reagent_containers/food/drinks/bottle/orangejuice;/obj/item/weapon/reagent_containers/food/drinks/bottle/tomatojuice;/obj/item/weapon/reagent_containers/food/drinks/bottle/limejuice;/obj/item/weapon/reagent_containers/food/drinks/bottle/cream;/obj/item/weapon/reagent_containers/food/drinks/tonic;/obj/item/weapon/reagent_containers/food/drinks/cola;/obj/item/weapon/reagent_containers/food/drinks/sodawater;/obj/item/weapon/reagent_containers/food/drinks/drinkingglass;/obj/item/weapon/reagent_containers/food/drinks/ice"
-// product_amounts = "5;5;5;5;5;5;5;5;5;6;6;4;4;4;4;8;8;15;30;9"
- product_prices = "6;6;6;6;6;6;6;6;6;6;6;7;7;7;7;4;4;2;1;4"
+ product_amounts = "5;5;5;5;5;5;5;5;5;6;6;4;4;4;4;8;8;15;30;9"
vend_delay = 15
product_hidden = "/obj/item/weapon/reagent_containers/food/drinks/tea"
- hidden_prices = "4"
- points = 60
+ product_hideamt = "10"
product_slogans = "I hope nobody asks me for a bloody cup o' tea...;Alcohol is humanity's friend. Would you abandon a friend?;Quite delighted to serve you!;Is nobody thirsty on this station?"
product_ads = "Drink up!;Booze is good for you!;Alcohol is humanity's best friend.;Quite delighted to serve you!;Care for a nice, cold beer?;Nothing cures you like booze!;Have a sip!;Have a drink!;Have a beer!;Beer is good for you!;Only the finest alcohol!;Best quality booze since 2053!;Award-winning wine!;Maximum alcohol!;Man loves beer.;A toast for progress!"
- charge_type = "bar"
+ req_access_txt = "25"
/obj/machinery/vending/assist
- product_paths = "/obj/item/device/assembly/prox_sensor;/obj/item/device/assembly/igniter;/obj/item/device/assembly/signaler;/obj/item/weapon/wirecutters;/obj/item/weapon/cartridge/signal"
-// product_amounts = "5;3;4;1;4"
- product_prices = "2;3;3;10;3"
+ product_amounts = "5;3;4;1;4"
product_hidden = "/obj/item/device/flashlight;obj/item/device/assembly/timer"
-// product_hideamt = "5;2"
- hidden_prices = "2;5"
- points = 15
+ product_paths = "/obj/item/device/assembly/prox_sensor;/obj/item/device/assembly/igniter;/obj/item/device/assembly/signaler;/obj/item/weapon/wirecutters;/obj/item/weapon/cartridge/signal"
+ product_hideamt = "5;2"
product_ads = "Only the finest!;Have some tools.;The most robust equipment.;The finest gear in space!"
- charge_type = "engineering"
/obj/machinery/vending/coffee
name = "Hot Drinks machine"
@@ -100,72 +92,62 @@
icon_state = "coffee"
icon_vend = "coffee-vend"
product_paths = "/obj/item/weapon/reagent_containers/food/drinks/coffee;/obj/item/weapon/reagent_containers/food/drinks/tea;/obj/item/weapon/reagent_containers/food/drinks/h_chocolate"
- product_prices = "1;1;1"
+ product_amounts = "25;25;25"
vend_delay = 34
product_hidden = "/obj/item/weapon/reagent_containers/food/drinks/ice"
-// product_hideamt = "10"
- hidden_prices = "1"
product_ads = "Have a drink!;Drink up!;It's good for you!;Would you like a hot joe?;I'd kill for some coffee!;The best beans in the galaxy.;Only the finest brew for you.;Mmmm. Nothing like a coffee.;I like coffee, don't you?;Coffee helps you work!;Try some tea.;We hope you like the best!;Try our new chocolate!;Admin conspiracies"
- charge_type = "coffee"
+ product_hideamt = "10"
/obj/machinery/vending/snack
name = "Getmore Chocolate Corp"
desc = "A snack machine courtesy of the Getmore Chocolate Corporation, based out of Mars"
icon_state = "snack"
product_paths = "/obj/item/weapon/reagent_containers/food/snacks/candy;/obj/item/weapon/reagent_containers/food/drinks/dry_ramen;/obj/item/weapon/reagent_containers/food/snacks/chips;/obj/item/weapon/reagent_containers/food/snacks/sosjerky;/obj/item/weapon/reagent_containers/food/snacks/no_raisin;/obj/item/weapon/reagent_containers/food/snacks/spacetwinkie;/obj/item/weapon/reagent_containers/food/snacks/cheesiehonkers"
-// product_amounts = "6;6;6;6;6;6;6"
- product_prices = "1;1;1;1;1;1;1"
+ product_amounts = "6;6;6;6;6;6;6"
product_slogans = "Try our new nougat bar!;Twice the calories for half the price!"
product_hidden = "/obj/item/weapon/reagent_containers/food/snacks/syndicake"
-// product_hideamt = "10"
- hidden_prices = "1"
+ product_hideamt = "6"
product_ads = "The healthiest!;Award-winning chocolate bars!;Mmm! So good!;Oh my god it's so juicy!;Have a snack.;Snacks are good for you!;Have some more Getmore!;Best quality snacks straight from mars.;We love chocolate!;Try our new jerky!"
- charge_type = "snack"
+
/obj/machinery/vending/cola
name = "Robust Softdrinks"
desc = "A softdrink vendor provided by Robust Industries, LLC."
icon_state = "Cola_Machine"
- product_paths = "/obj/item/weapon/reagent_containers/food/drinks/cola;/obj/item/weapon/reagent_containers/food/drinks/space_mountain_wind;/obj/item/weapon/reagent_containers/food/drinks/dr_gibb;/obj/item/weapon/reagent_containers/food/drinks/starkist;/obj/item/weapon/reagent_containers/food/drinks/space_up;/obj/item/weapon/reagent_containers/food/drinks/waterbottle"
-// product_amounts = "10;10;10;10;10"
- product_prices = "1;1;1;1;1;1"
+ product_paths = "/obj/item/weapon/reagent_containers/food/drinks/cola;/obj/item/weapon/reagent_containers/food/drinks/space_mountain_wind;/obj/item/weapon/reagent_containers/food/drinks/dr_gibb;/obj/item/weapon/reagent_containers/food/drinks/starkist;/obj/item/weapon/reagent_containers/food/drinks/space_up"
+ product_amounts = "10;10;10;10;10"
product_slogans = "Robust Softdrinks: More robust then a toolbox to the head!"
product_hidden = "/obj/item/weapon/reagent_containers/food/drinks/thirteenloko"
product_hideamt = "5"
- hidden_prices = "2"
product_ads = "Refreshing!;Hope you're thirsty!;Over 1 million drinks sold!;Thirsty? Why not cola?;Please, have a drink!;Drink up!;The best drinks in space."
- charge_type = "soda"
+//This one's from bay12
/obj/machinery/vending/cart
name = "PTech"
desc = "Cartridges for PDAs"
icon_state = "cart"
icon_deny = "cart-deny"
product_paths = "/obj/item/weapon/cartridge/medical;/obj/item/weapon/cartridge/engineering;/obj/item/weapon/cartridge/security;/obj/item/weapon/cartridge/janitor;/obj/item/weapon/cartridge/signal/toxins;/obj/item/device/pda/heads;/obj/item/weapon/cartridge/captain;/obj/item/weapon/cartridge/quartermaster"
-// product_amounts = "10;10;10;10;10;10;3;10"
- product_prices = "1;1;1;1;1;3;1"
- product_slogans = ""
+ product_amounts = "10;10;10;10;10;10;3;10"
+ product_slogans = "Carts to go!"
product_hidden = ""
-// product_hideamt = ""
- hidden_prices = ""
- charge_type = "cart"
+ product_hideamt = ""
+ product_coin = ""
+ product_coin_amt = ""
/obj/machinery/vending/cigarette
name = "cigarette machine"
desc = "If you want to get cancer, might as well do it in style"
icon_state = "cigs"
- product_paths = "/obj/item/weapon/cigpacket;/obj/item/weapon/matchbox;/obj/item/weapon/lighter/random"
-// product_amounts = "10;10;4"
- product_prices = "1;1;2"
+ product_paths = "/obj/item/weapon/cigpacket;/obj/item/weapon/storage/matchbox;/obj/item/weapon/lighter/random"
+ product_amounts = "10;10;4"
product_slogans = "Space cigs taste good like a cigarette should.;I'd rather toolbox than switch.;Smoke!;Don't believe the reports - smoke today!"
vend_delay = 34
product_hidden = "/obj/item/weapon/lighter/zippo"
-// product_hideamt = "4"
- hidden_prices = "2"
+ product_hideamt = "4"
product_coin = "/obj/item/clothing/mask/cigarette/cigar/havana"
product_coin_amt = "2"
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."
- charge_type = "cigarette"
/obj/machinery/vending/medical
name = "NanoMed Plus"
@@ -173,15 +155,22 @@
icon_state = "med"
icon_deny = "med-deny"
req_access_txt = "5"
- product_paths = "/obj/item/clothing/under/rank/medical;/obj/item/clothing/under/rank/chemist;/obj/item/clothing/suit/storage/labcoat;/obj/item/clothing/shoes/white;/obj/item/weapon/reagent_containers/glass/bottle/antitoxin;/obj/item/weapon/reagent_containers/glass/bottle/inaprovaline;/obj/item/weapon/reagent_containers/glass/bottle/stoxin;/obj/item/weapon/reagent_containers/glass/bottle/toxin;/obj/item/weapon/reagent_containers/syringe/antiviral;/obj/item/weapon/reagent_containers/syringe;/obj/item/device/healthanalyzer;/obj/item/weapon/reagent_containers/glass/beaker;/obj/item/weapon/reagent_containers/dropper;/obj/item/stack/medical/bruise_pack;/obj/item/stack/medical/ointment;/obj/item/stack/medical/splint;/obj/item/stack/medical/advanced/bruise_pack;/obj/item/stack/medical/advanced/ointment"
-// product_amounts = "4;4;4;4;4;12;5;4;2"
- product_prices = "1;1;1;1;2;2;2;2;2;1;2;2;5;1;1;2;3;3"
+ product_paths = "/obj/item/weapon/reagent_containers/glass/bottle/antitoxin;/obj/item/weapon/reagent_containers/glass/bottle/inaprovaline;/obj/item/weapon/reagent_containers/glass/bottle/stoxin;/obj/item/weapon/reagent_containers/glass/bottle/toxin;/obj/item/weapon/reagent_containers/syringe/antiviral;/obj/item/weapon/reagent_containers/syringe;/obj/item/device/healthanalyzer;/obj/item/weapon/reagent_containers/glass/beaker;/obj/item/weapon/reagent_containers/dropper"
+ product_amounts = "4;4;4;4;4;12;5;4;2"
product_hidden = "/obj/item/weapon/reagent_containers/pill/tox;/obj/item/weapon/reagent_containers/pill/stox;/obj/item/weapon/reagent_containers/pill/antitox"
-// product_hideamt = "3;4;6"
- hidden_prices = "3;3;2"
- points = 25
-// product_ads = "Go save some lives!;The best stuff for your medbay.;Only the finest tools.;Natural chemicals!;This stuff saves lives.;Don't you want some?;Ping!"
- charge_type = "medical"
+ product_hideamt = "3;4;6"
+ product_ads = "Go save some lives!;The best stuff for your medbay.;Only the finest tools.;Natural chemicals!;This stuff saves lives.;Don't you want some?;Ping!"
+
+//This one's from bay12
+/obj/machinery/vending/plasmaresearch
+ name = "Toximate 3000"
+ desc = "All the fine parts you need in one vending machine!"
+ product_paths = "/obj/item/clothing/under/rank/scientist;/obj/item/clothing/suit/bio_suit;/obj/item/clothing/head/bio_hood;/obj/item/device/transfer_valve;/obj/item/device/assembly/signaler;/obj/item/device/assembly/prox_sensor;/obj/item/device/assembly/igniter;/obj/item/device/assembly/timer"
+ product_amounts = "6;6;6;6;6"
+ product_hidden = ""
+ product_hideamt = ""
+ product_coin = ""
+ product_coin_amt = ""
/obj/machinery/vending/wallmed1
name = "NanoMed"
@@ -190,15 +179,11 @@
icon_deny = "wallmed-deny"
req_access_txt = "5"
product_paths = "/obj/item/stack/medical/bruise_pack;/obj/item/stack/medical/ointment;/obj/item/weapon/reagent_containers/syringe/inaprovaline;/obj/item/device/healthanalyzer"
-// product_amounts = "2;2;4;1"
- product_prices = "1;1;2;2"
+ product_amounts = "2;2;4;1"
product_hidden = "/obj/item/weapon/reagent_containers/syringe/antitoxin;/obj/item/weapon/reagent_containers/syringe/antiviral;/obj/item/weapon/reagent_containers/pill/tox"
-// product_hideamt = "4;4;1"
- hidden_prices = "2;2;2"
- points = 5
+ product_hideamt = "4;4;1"
density = 0 //It is wall-mounted, and thus, not dense. --Superxpdude
product_ads = "Go save some lives!;The best stuff for your medbay.;Only the finest tools.;Natural chemicals!;This stuff saves lives.;Don't you want some?"
- charge_type = "medical"
/obj/machinery/vending/wallmed2
name = "NanoMed"
@@ -207,14 +192,10 @@
icon_deny = "wallmed-deny"
req_access_txt = "5"
product_paths = "/obj/item/weapon/reagent_containers/syringe/inaprovaline;/obj/item/weapon/reagent_containers/syringe/antitoxin;/obj/item/stack/medical/bruise_pack;/obj/item/stack/medical/ointment;/obj/item/device/healthanalyzer"
-// product_amounts = "5;3;3;3;3"
- product_prices = "2;2;1;1;2"
+ product_amounts = "5;3;3;3;3"
product_hidden = "/obj/item/weapon/reagent_containers/pill/tox"
-// product_hideamt = "3"
- hidden_prices = "2"
- points = 5
+ product_hideamt = "3"
density = 0 //It is wall-mounted, and thus, not dense. --Superxpdude
- charge_type = "medical"
/obj/machinery/vending/security
name = "SecTech"
@@ -222,15 +203,11 @@
icon_state = "sec"
icon_deny = "sec-deny"
req_access_txt = "1"
- product_paths = "/obj/item/clothing/under/color/red;/obj/item/clothing/under/ftech;/obj/item/clothing/under/det;/obj/item/clothing/suit/storage/det_suit;/obj/item/clothing/head/det_hat;/obj/item/clothing/head/helmet;/obj/item/clothing/suit/armor/vest;/obj/item/clothing/suit/storage/gearharness;/obj/item/weapon/storage/belt/security;/obj/item/device/radio/headset/security;/obj/item/weapon/handcuffs;/obj/item/weapon/flashbang;/obj/item/device/flash;/obj/item/weapon/reagent_containers/food/snacks/donut;/obj/item/weapon/storage/box/evidence"
-// product_amounts = "8;4;5;12;6"
- product_prices = "1;1;1;1;1;3;3;3;2;1;1;3;2;1;2"
- product_hidden = "/obj/item/clothing/glasses/sunglasses;/obj/item/kitchen/donut_box"
-// product_hideamt = "2;2"
- hidden_prices = "5;5"
- points = 15
+ product_paths = "/obj/item/weapon/handcuffs;/obj/item/weapon/grenade/flashbang;/obj/item/device/flash;/obj/item/weapon/reagent_containers/food/snacks/donut/normal;/obj/item/weapon/storage/box/evidence"
+ product_amounts = "8;4;5;12;6"
+ product_hidden = "/obj/item/clothing/glasses/sunglasses;/obj/item/weapon/storage/fancy/donut_box"
+ product_hideamt = "2;2"
product_ads = "Crack capitalist skulls!;Beat some heads in!;Don't forget - harm is good!;Your weapons are right here.;Handcuffs!;Freeze, scumbag!;Don't tase me bro!;Tase them, bro.;Why not have a donut?"
- charge_type = "security"
/obj/machinery/vending/hydronutrients
name = "NutriMax"
@@ -238,138 +215,97 @@
icon_state = "nutri"
icon_deny = "nutri-deny"
product_paths = "/obj/item/nutrient/ez;/obj/item/nutrient/l4z;/obj/item/nutrient/rh;/obj/item/weapon/pestspray;/obj/item/weapon/reagent_containers/syringe;/obj/item/weapon/plantbag"
-// product_amounts = "35;25;15;20;5;5"
- product_prices = "1;1;2;2;7;7"
+ product_amounts = "35;25;15;20;5;5"
product_slogans = "Aren't you glad you don't have to fertilize the natural way?;Now with 50% less stink!;Plants are people too!"
product_hidden = "/obj/item/weapon/reagent_containers/glass/bottle/ammonia;/obj/item/weapon/reagent_containers/glass/bottle/diethylamine"
-// product_hideamt = "10;5"
- hidden_prices = "1;2"
- points = 20
+ product_hideamt = "10;5"
product_ads = "We like plants!;Don't you want some?;The greenest thumbs ever.;We like big plants.;Soft soil..."
- charge_type = "hydroponics"
/obj/machinery/vending/hydroseeds
name = "MegaSeed Servitor"
desc = "When you need seeds fast!"
icon_state = "seeds"
- product_paths = "/obj/item/seeds/bananaseed;/obj/item/seeds/berryseed;/obj/item/seeds/carrotseed;/obj/item/seeds/chantermycelium;/obj/item/seeds/chiliseed;/obj/item/seeds/cornseed;/obj/item/seeds/eggplantseed;/obj/item/seeds/potatoseed;/obj/item/seeds/replicapod;/obj/item/seeds/soyaseed;/obj/item/seeds/sunflowerseed;/obj/item/seeds/tomatoseed;/obj/item/seeds/towermycelium;/obj/item/seeds/wheatseed;/obj/item/seeds/appleseed;/obj/item/seeds/poppyseed;/obj/item/seeds/ambrosiavulgarisseed;/obj/item/seeds/whitebeetseed;/obj/item/seeds/watermelonseed;/obj/item/seeds/limeseed;/obj/item/seeds/lemonseed;/obj/item/seeds/orangeseed;/obj/item/seeds/grassseed;/obj/item/seeds/sugarcaneseed;/obj/item/seeds/cocoapodseed;/obj/item/seeds/cabbageseed;/obj/item/seeds/grapeseed;/obj/item/seeds/pumpkinseed"
-// product_amounts = "3;2;2;2;2;2;2;2;3;2;2;2;2;2;3;5;4;3;3;3;3;3;3;3;3;3;3;3"
- product_prices = "3;5;5;5;5;5;5;5;3;5;5;5;5;5;3;2;3;3;3;3;3;3;3;3;3;3;3;3"
-// product_hidden = "/obj/item/seeds/amanitamycelium;/obj/item/seeds/glowshroom;/obj/item/seeds/libertymycelium;/obj/item/seeds/nettleseed;/obj/item/seeds/plumpmycelium"
- product_hideamt = "2;2;2;2;2"
- hidden_prices = "5;5;5;5;5"
+ product_paths = "/obj/item/seeds/bananaseed;/obj/item/seeds/berryseed;/obj/item/seeds/carrotseed;/obj/item/seeds/chantermycelium;/obj/item/seeds/chiliseed;/obj/item/seeds/cornseed;/obj/item/seeds/eggplantseed;/obj/item/seeds/potatoseed;/obj/item/seeds/replicapod;/obj/item/seeds/soyaseed;/obj/item/seeds/sunflowerseed;/obj/item/seeds/tomatoseed;/obj/item/seeds/towermycelium;/obj/item/seeds/wheatseed;/obj/item/seeds/appleseed;/obj/item/seeds/poppyseed;/obj/item/seeds/ambrosiavulgarisseed;/obj/item/seeds/whitebeetseed;/obj/item/seeds/watermelonseed;/obj/item/seeds/limeseed;/obj/item/seeds/lemonseed;/obj/item/seeds/orangeseed;/obj/item/seeds/grassseed;/obj/item/seeds/cocoapodseed;/obj/item/seeds/cabbageseed;/obj/item/seeds/grapeseed;/obj/item/seeds/pumpkinseed"
+ product_amounts = "3;2;2;2;2;2;2;2;3;2;2;2;2;2;3;5;4;3;3;3;3;3;3;3;3;3;3"
+ product_slogans = "THIS'S WHERE TH' SEEDS LIVE! GIT YOU SOME!;Hands down the best seed selection on the station!;Also certain mushroom varieties available, more for experts! Get certified today!"
+ product_hidden = "/obj/item/seeds/amanitamycelium;/obj/item/seeds/glowshroom;/obj/item/seeds/libertymycelium;/obj/item/seeds/nettleseed;/obj/item/seeds/plumpmycelium;/obj/item/seeds/reishimycelium"
+ product_hideamt = "2;2;2;2;2;2"
product_coin = "/obj/item/toy/waterflower"
product_coin_amt = "1"
- points = 40
product_ads = "We like plants!;Grow some crops!;Grow, baby, growww!;Aw h'yeah son!"
- product_slogans = "THIS'S WHERE TH' SEEDS LIVE! GIT YOU SOME!;Hands down the best seed selection on the station!;Also certain mushroom varieties available, more for experts! Get certified today!"
- charge_type = "hydroponics"
+
+/obj/machinery/vending/liquid
+ name = "LiquidRation Dispenser"
+ desc = "All the food you'll ever need to survive!"
+ icon_state = "liquidfood"
+ product_paths = "/obj/item/weapon/reagent_containers/food/snacks/liquidfood;/obj/item/weapon/flavor/red;/obj/item/weapon/flavor/blue"
+ product_amounts = "20;10;10"
+ product_slogans = "Enjoy your NanoTrasen \"LiquidFood\" Ration! Now with a choice of TWO delicious flavors!"
+ product_ads = "Think of it as free survival!;It's even healthy!;Take a quick break, enjoy your ration!"
/obj/machinery/vending/magivend
name = "MagiVend"
desc = "A magic vending machine."
icon_state = "MagiVend"
-// product_amounts = "1;1;1;1;1;2"
- product_prices = "10;10;10;10;10;5"
+ product_amounts = "1;1;1;1;1;2"
product_slogans = "Sling spells the proper way with MagiVend!;Be your own Houdini! Use MagiVend!"
product_paths = "/obj/item/clothing/head/wizard;/obj/item/clothing/suit/wizrobe;/obj/item/clothing/head/wizard/red;/obj/item/clothing/suit/wizrobe/red;/obj/item/clothing/shoes/sandal;/obj/item/weapon/staff"
vend_delay = 15
- points = 55
vend_reply = "Have an enchanted evening!"
product_hidden = "/obj/item/weapon/reagent_containers/glass/bottle/wizarditis" //No one can get to the machine to hack it anyways
-// product_hideamt = "1" //Just one, for the lulz, not like anyone can get it - Microwave
- hidden_prices = "10"
+ product_hideamt = "1" //Just one, for the lulz, not like anyone can get it - Microwave
product_ads = "FJKLFJSD;AJKFLBJAKL;1234 LOONIES LOL!;>MFW;Kill them fuckers!;GET DAT FUKKEN DISK;HONK!;EI NATH;Destroy the station!;Admin conspiracies since forever!;Space-time bending hardware!"
/obj/machinery/vending/dinnerware
name = "Dinnerware"
desc = "A kitchen and restaurant equipment vendor"
icon_state = "dinnerware"
- product_paths = "/obj/item/weapon/tray;/obj/item/weapon/kitchen/utensil/fork;/obj/item/weapon/kitchenknife;/obj/item/weapon/reagent_containers/food/drinks/drinkingglass;/obj/item/clothing/suit/storage/chef/classic"
-// product_amounts = "8;6;3;8;2"
- product_prices = "1;2;3;1;5"
+ product_paths = "/obj/item/weapon/tray;/obj/item/weapon/kitchen/utensil/fork;/obj/item/weapon/kitchenknife;/obj/item/weapon/reagent_containers/food/drinks/drinkingglass;/obj/item/clothing/suit/chef/classic"
+ product_amounts = "8;6;3;8;2"
//product_amounts = "8;5;4" Old totals
product_hidden = "/obj/item/weapon/kitchen/utensil/spoon;/obj/item/weapon/kitchen/utensil/knife;/obj/item/weapon/kitchen/rollingpin;/obj/item/weapon/butch"
-// product_hideamt = "2;2;2;2"
- hidden_prices = "5;5;5;5"
- points = 15
+ product_hideamt = "2;2;2;2"
product_ads = "Mm, food stuffs!;Food and food accessories.;Get your plates!;You like forks?;I like forks.;Woo, utensils.;You don't really need these..."
- charge_type = "kitchen"
+
/obj/machinery/vending/sovietsoda
name = "BODA"
desc = "Old sweet water vending machine"
icon_state = "sovietsoda"
product_paths = "/obj/item/weapon/reagent_containers/food/drinks/drinkingglass/soda"
-// product_amounts = "30"
- product_prices = "1"
+ product_amounts = "30"
//product_amounts = "8;5;4" Old totals
product_hidden = "/obj/item/weapon/reagent_containers/food/drinks/drinkingglass/cola"
-// product_hideamt = "20"
- hidden_prices = "1"
+ product_hideamt = "20"
product_ads = "For Tsar and Country.;Have you fulfilled your nutrition quota today?;Very nice!;We are simple people, for this is all we eat.;If there is a person, there is a problem. If there is no person, then there is no problem."
- charge_type = "soda"
-/obj/machinery/vending/tool//Who did this and why is it here? I don't even
+/obj/machinery/vending/tool
name = "YouTool"
desc = "Tools for tools."
icon_state = "tool"
icon_deny = "tool-deny"
req_access_txt = "12" //Maintenance access
product_paths = "/obj/item/weapon/cable_coil/random;/obj/item/weapon/crowbar;/obj/item/weapon/weldingtool;/obj/item/weapon/wirecutters;/obj/item/weapon/wrench;/obj/item/device/analyzer;/obj/item/device/t_scanner"
-// product_amounts = "10;5;3;5;5;5;5"
- product_prices = "1;2;3;2;2;2;2"
- product_prices = "1"
- product_hidden = "/obj/item/weapon/weldingtool/largetank;/obj/item/device/multitool"
-// product_hideamt = "2;2"
- hidden_prices = "4;4"
+ product_amounts = "10;5;3;5;5;5;5"
+ product_hidden = "/obj/item/weapon/weldingtool/hugeetank;/obj/item/clothing/gloves/fyellow"
+ product_hideamt = "2;2"
product_coin = "/obj/item/clothing/gloves/yellow"
product_coin_amt = "1"
- charge_type = "engineering"
-/obj/machinery/vending/engivend//Source of tools and what have you for Engineering (Needed on account of the public auto-lathe being removed) -Sieve
+/obj/machinery/vending/engivend
name = "Engi-Vend"
desc = "Spare tool vending. What? Did you expect some witty description?"
icon_state = "engivend"
icon_deny = "engivend-deny"
req_access_txt = "10" //Engineering access
- product_paths = "/obj/item/weapon/cable_coil/random;/obj/item/weapon/crowbar;/obj/item/weapon/weldingtool/largetank;/obj/item/weapon/wirecutters;/obj/item/weapon/wrench;/obj/item/device/t_scanner;/obj/item/device/multitool;/obj/item/weapon/airlock_electronics;/obj/item/weapon/module/power_control"
-// product_amounts = "5;3;5;3;5;5;5;2;3;3"
- product_prices = "2;2;3;2;2;2;4;2;2"
- product_hidden = "/obj/item/weapon/weldingtool/hugetank;/obj/item/clothing/gloves/fyellow"
-// product_hideamt = "2;2"
- hidden_prices = "4;4"
+ product_paths = "/obj/item/clothing/glasses/meson;/obj/item/device/multitool;/obj/item/weapon/airlock_electronics;/obj/item/weapon/module/power_control;/obj/item/weapon/cell/high"
+ product_amounts = "2;4;10;10;10"
+ product_hidden = "/obj/item/weapon/cell/potato"
+ product_hideamt = "3"
product_coin = "/obj/item/weapon/storage/belt/utility"
product_coin_amt = "3"
- charge_type = "engineering"
-
-/obj/machinery/vending/genetics
- name = "Genetics Dispenser"
- desc = "Medical drug dispenser."
- icon_state = "med"
- icon_deny = "med-deny"
- req_access_txt = "5"
- product_paths = "/obj/item/clothing/suit/storage/labcoat;/obj/item/clothing/under/rank/geneticist;/obj/item/weapon/reagent_containers/glass/bottle/antitoxin;/obj/item/weapon/reagent_containers/glass/bottle/inaprovaline;/obj/item/weapon/reagent_containers/glass/bottle/stoxin;/obj/item/weapon/reagent_containers/glass/bottle/toxin;/obj/item/weapon/reagent_containers/syringe"
-// product_amounts = "4;4;6;6;6;6;4"
- product_prices = "1;1;2;2;2;2;1"
- product_hidden = ""
- product_hideamt = ""
- charge_type = "genetics"
-
-/*/obj/machinery/vending/toxins
- name = "Toxins dispenser"
- desc = "Medical drug dispenser."
- icon = 'objects.dmi'
- icon_state = "dispenser"
- //icon_deny = "med-deny"
- req_access_txt = "7"
- product_paths = "/obj/item/clothing/under/rank/scientist;/obj/item/clothing/suit/bio_suit;/obj/item/clothing/head/bio_hood;/obj/item/weapon/screwdriver;/obj/item/weapon/wrench;/obj/item/weapon/tank/oxygen;/obj/item/weapon/tank/plasma;/obj/item/device/transfer_valve;/obj/item/device/igniter;/obj/item/device/timer;/obj/item/device/prox_sensor;/obj/item/device/radio/signaler;/obj/item/weapon/chem_grenade"
- product_amounts = "4;4;4;6;6;4;4;8;8;8;8;8;8"
- //product_prices = "1;2;2;1;1;1;2;3;2;2;2;2;2"
- product_hidden = ""
- product_hideamt = ""
- charge_type = "toxins"*/
+//This one's from bay12
/obj/machinery/vending/engineering
name = "Robco Tool Maker"
desc = "Everything you need for do-it-yourself station repair."
@@ -378,22 +314,12 @@
req_access_txt = "10"
product_paths = "/obj/item/clothing/under/rank/chief_engineer;/obj/item/clothing/under/rank/engineer;/obj/item/clothing/shoes/orange;/obj/item/clothing/head/helmet/hardhat;/obj/item/weapon/storage/belt/utility;/obj/item/clothing/glasses/meson;/obj/item/clothing/gloves/yellow;/obj/item/weapon/screwdriver;/obj/item/weapon/crowbar;/obj/item/weapon/wirecutters;/obj/item/device/multitool;/obj/item/weapon/wrench;/obj/item/device/t_scanner;/obj/item/weapon/CableCoil/power;/obj/item/weapon/circuitry;/obj/item/weapon/cell;/obj/item/weapon/weldingtool;/obj/item/clothing/head/helmet/welding;/obj/item/weapon/light/tube;/obj/item/clothing/suit/fire;/obj/item/weapon/stock_parts/scanning_module;/obj/item/weapon/stock_parts/micro_laser;/obj/item/weapon/stock_parts/matter_bin;/obj/item/weapon/stock_parts/manipulator;/obj/item/weapon/stock_parts/console_screen"
// product_amounts = "4;4;4;4;4;4;4;12;12;12;12;12;12;8;4;8;8;8;10;4"
- product_prices = "1;1;1;2;2;1;2;1;1;2;2;1;1;1;2;2;1;1;1;2;2;2;2;2;2"
product_hidden = ""
product_hideamt = ""
- charge_type = "engineering"
-
-/obj/machinery/vending/plasmaresearch
- name = "Toximate 3000"
- desc = "All the fine parts you need in one vending machine!"
- product_hidden = ""
- product_hideamt = ""
- points = 40
- product_paths = "/obj/item/clothing/under/rank/scientist;/obj/item/clothing/suit/bio_suit;/obj/item/clothing/head/bio_hood;/obj/item/device/transfer_valve;/obj/item/device/assembly/signaler;/obj/item/device/assembly/prox_sensor;/obj/item/device/assembly/igniter;/obj/item/device/assembly/timer"
-// product_amounts = "6;6;6;6;6"
- product_prices = "1;2;2;2;2;2;2;2"
- charge_type = "toxins"
+ product_coin = ""
+ product_coin_amt = ""
+//This one's from bay12
/obj/machinery/vending/robotics
name = "Robotech Deluxe"
desc = "All the tools you need to create your own robot army."
@@ -401,117 +327,8 @@
icon_deny = "robotics-deny"
req_access_txt = "29"
product_paths = "/obj/item/clothing/suit/storage/labcoat;/obj/item/clothing/under/rank/roboticist;/obj/item/weapon/cable_coil;/obj/item/device/flash;/obj/item/weapon/cell/high;/obj/item/device/assembly/prox_sensor;/obj/item/device/assembly/signaler;/obj/item/device/healthanalyzer;/obj/item/weapon/scalpel;/obj/item/weapon/circular_saw;/obj/item/weapon/tank/anesthetic;/obj/item/clothing/mask/medical;/obj/item/weapon/screwdriver;/obj/item/weapon/crowbar"
- //product_amounts = "4;4;4;4;12"
- product_prices = "1;1;1;1;3;2;2;2;4;4;2;1;1;1"
+ product_amounts = "4;4;4;4;12"
product_hidden = ""
- hidden_prices = ""
- charge_type = "robotics"
-
-/obj/machinery/vending/liquid
- name = "LiquidRation Dispenser"
- desc = "All the food you'll ever need to survive!"
- icon_state = "liquidfood"
- product_paths = "/obj/item/weapon/reagent_containers/food/snacks/liquidfood;/obj/item/weapon/flavor/red;/obj/item/weapon/flavor/blue"
-// product_amounts = "6;6;6;6;6;6;6"
- product_prices = "1;1;1"
- product_slogans = "Enjoy your NanoTrasen \"LiquidFood\" Ration! Now with a choice of TWO delicious flavors!"
- product_hidden = ""
-// product_hideamt = "10"
- hidden_prices = ""
- product_ads = "Think of it as free survival!;It's even healthy!;Take a quick break, enjoy your ration!"
- charge_type = "liquid"
-
-/obj/item/weapon/vending_charge
- name = "Vending Charge"
- var/charge_type = "generic"
- var/charge_amt = 10
- icon = 'vending.dmi'
- icon_state = "generic-charge"
-
-/obj/item/weapon/vending_charge/medical
- name = "Medical Charge"
- charge_type = "medical"
- icon_state = "medical-charge"
-
-/obj/item/weapon/vending_charge/chemistry
- name = "Chemistry Charge"
- charge_type = "chemistry"
- icon_state = "chemistry-charge"
- charge_amt = 25 // only used by chemistry now
-
-/obj/item/weapon/vending_charge/genetics
- name = "Genetics Charge"
- charge_type = "genetics"
- icon_state = "generic-charge"
-
-/obj/item/weapon/vending_charge/toxins
- name = "Toxins Charge"
- charge_type = "toxins"
- icon_state = "toxins-charge"
- charge_amt = 40
-
-/obj/item/weapon/vending_charge/robotics
- name = "Robotics Charge"
- charge_type = "robotics"
- icon_state = "robotics-charge"
-
-/obj/item/weapon/vending_charge/bar
- name = "Bar Charge"
- charge_type = "bar"
- icon_state = "bar-charge"
- charge_amt = 40
-
-/obj/item/weapon/vending_charge/kitchen
- name = "Kitchen Charge"
- charge_type = "kitchen"
- icon_state = "kitchen-charge"
-
-/obj/item/weapon/vending_charge/engineering
- name = "Engineering Charge"
- charge_type = "engineering"
- icon_state = "engineering-charge"
-
-/obj/item/weapon/vending_charge/security
- name = "Security Charge"
- charge_type = "security"
- icon_state = "security-charge"
-
-/obj/item/weapon/vending_charge/coffee
- name = "Coffee Charge"
- charge_type = "coffee"
- icon_state = "coffee-charge"
-
-/obj/item/weapon/vending_charge/snack
- name = "Snack Charge"
- charge_type = "snack"
- icon_state = "snack-charge"
-
-/obj/item/weapon/vending_charge/cart
- name = "Cart Charge"
- charge_type = "cart"
- icon_state = "cart-charge"
-
-/obj/item/weapon/vending_charge/cigarette
- name = "Cigarette Charge"
- charge_type = "cigarette"
- icon_state = "cigarette-charge"
-
-/obj/item/weapon/vending_charge/hydroponics
- name = "Hydroponics Charge"
- charge_type = "hydroponics"
- icon_state = "hydroponics-charge"
-
-/obj/item/weapon/vending_charge/soda
- name = "Soda Charge"
- charge_type = "soda"
- icon_state = "soda-charge"
-
-/*/obj/item/weapon/vending_charge/toxinslab
- name = "Toxins Lab Charge"
- charge_type = "toxinslab"
- icon_state = "toxinslab-charge"*/
-
-/obj/item/weapon/vending_charge/liquid
- name = "LiquidRation Charge"
- charge_type = "liquid"
- icon_state = "liquidfood-charge"
\ No newline at end of file
+ product_hideamt = ""
+ product_coin = ""
+ product_coin_amt = ""
diff --git a/code/defines/obj/weapon.dm b/code/defines/obj/weapon.dm
index 57232f0814..2971fad009 100644
--- a/code/defines/obj/weapon.dm
+++ b/code/defines/obj/weapon.dm
@@ -2,7 +2,7 @@
/obj/item/weapon
name = "weapon"
- icon = 'weapons.dmi'
+ icon = 'icons/obj/weapons.dmi'
/obj/item/weapon/shield
name = "shield"
@@ -10,7 +10,7 @@
/obj/item/weapon/shield/riot
name = "riot shield"
desc = "A shield adept at blocking blunt objects from connecting with the torso of the shield wielder."
- icon = 'weapons.dmi'
+ icon = 'icons/obj/weapons.dmi'
icon_state = "riot"
flags = FPRINT | TABLEPASS| CONDUCT
slot_flags = SLOT_BACK
@@ -22,6 +22,7 @@
g_amt = 7500
m_amt = 1000
origin_tech = "materials=2"
+ attack_verb = list("shoved", "bashed")
IsShield()
return 1
@@ -29,7 +30,7 @@
/obj/item/weapon/shield/energy
name = "energy combat shield"
desc = "A shield capable of stopping most projectile and melee attacks. It can be retracted, expanded, and stored anywhere."
- icon = 'weapons.dmi'
+ icon = 'icons/obj/weapons.dmi'
icon_state = "eshield0" // eshield1 for expanded
flags = FPRINT | TABLEPASS| CONDUCT
force = 3.0
@@ -38,6 +39,7 @@
throw_range = 4
w_class = 1
origin_tech = "materials=4;magnets=3;syndicate=4"
+ attack_verb = list("shoved", "bashed")
var/active = 0
@@ -48,53 +50,13 @@
item_state = "nullrod"
flags = FPRINT | TABLEPASS
slot_flags = SLOT_BELT
- force = 10
+ force = 15
throw_speed = 1
throw_range = 4
throwforce = 10
w_class = 1
-/obj/item/weapon/nullrod/attack(mob/M as mob, mob/living/user as mob)
-
- M.attack_log += text("\[[time_stamp()]\] Has been attacked with [src.name] by [user.name] ([user.ckey])")
- user.attack_log += text("\[[time_stamp()]\] Used the [src.name] to attack [M.name] ([M.ckey])")
-
- log_admin("ATTACK: [user] ([user.ckey]) attacked [M] ([M.ckey]) with [src].")
- message_admins("ATTACK: [user] ([user.ckey]) attacked [M] ([M.ckey]) with [src].")
- log_attack("[user.name] ([user.ckey]) attacked [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])")
-
- if (!(istype(user, /mob/living/carbon/human) || ticker) && ticker.mode.name != "monkey")
- user << "\red You don't have the dexterity to do this!"
- return
-
- if ((CLUMSY in user.mutations) && prob(50))
- user << "\red The rod slips out of your hand and hits your head."
- user.take_organ_damage(10)
- user.Paralyse(20)
- return
-
- if (M.stat !=2)
- if((M.mind in ticker.mode.cult) && prob(33))
- M << "\red The power of [src] clears your mind of the cult's influence!"
- user << "\red You wave [src] over [M]'s head and see their eyes become clear, their mind returning to normal."
- ticker.mode.remove_cultist(M.mind)
- for(var/mob/O in viewers(M, null))
- O.show_message(text("\red [] waves [] over []'s head.", user, src, M), 1)
- else if(prob(10))
- user << "\red The rod slips in your hand."
- ..()
- else
- user << "\red The rod appears to do nothing."
- for(var/mob/O in viewers(M, null))
- O.show_message(text("\red [] waves [] over []'s head.", user, src, M), 1)
- return
-
-/obj/item/weapon/nullrod/afterattack(atom/A, mob/user as mob)
- if (istype(A, /turf/simulated/floor))
- user << "\blue You hit the floor with the [src]."
- call(/obj/effect/rune/proc/revealrunes)(src)
-
-/*/obj/item/weapon/sord
+/obj/item/weapon/sord
name = "\improper SORD"
desc = "This thing is so unspeakably shitty you are having a hard time even holding it."
icon_state = "sord"
@@ -103,11 +65,12 @@
slot_flags = SLOT_BELT
force = 2
throwforce = 1
- w_class = 3*/
+ w_class = 3
+ attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
/obj/item/weapon/claymore
name = "claymore"
- desc = "BLOOD FOR THE BLOOD GOD." //SKULLS FOR THE SKULL THRONE. --SkyMarshal
+ desc = "What are you standing around staring at this for? Get to killing!"
icon_state = "claymore"
item_state = "claymore"
flags = FPRINT | TABLEPASS | CONDUCT
@@ -115,14 +78,31 @@
force = 40
throwforce = 10
w_class = 3
+ attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
IsShield()
return 1
+/obj/item/weapon/katana
+ name = "katana"
+ desc = "Woefully underpowered in D20"
+ icon_state = "katana"
+ item_state = "katana"
+ flags = FPRINT | TABLEPASS | CONDUCT
+ slot_flags = SLOT_BELT | SLOT_BACK
+ force = 40
+ throwforce = 10
+ w_class = 3
+ attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
+
+ IsShield()
+ return 1
+
+
/obj/item/weapon/bodybag
name = "body bag"
- desc = "A bag used to deal with a corpse."
- icon = 'closet.dmi'
+ desc = "A plastic bag designed for the storage and transportation of cadavers."
+ icon = 'icons/obj/closet.dmi'
icon_state = "bodybag"
force = 5.0
throwforce = 5.0
@@ -136,7 +116,7 @@
/obj/item/weapon/rsf
name = "\improper Rapid-Service-Fabricator"
desc = "A device used to rapidly deploy service items."
- icon = 'items.dmi'
+ icon = 'icons/obj/items.dmi'
icon_state = "rcd"
opacity = 0
density = 0
@@ -149,7 +129,7 @@
/obj/item/weapon/rsp
name = "\improper Rapid-Seed-Producer (RSP)"
desc = "A device used to rapidly deploy seeds."
- icon = 'items.dmi'
+ icon = 'icons/obj/items.dmi'
icon_state = "rcd"
opacity = 0
density = 0
@@ -162,7 +142,7 @@
/obj/item/weapon/rcd_ammo
name = "compressed matter cartridge"
desc = "Highly compressed matter for the RCD."
- icon = 'ammo.dmi'
+ icon = 'icons/obj/ammo.dmi'
icon_state = "rcd"
item_state = "rcdammo"
opacity = 0
@@ -171,17 +151,12 @@
origin_tech = "materials=2"
m_amt = 30000
g_amt = 15000
- var/ammo = 10
-/obj/item/weapon/rcd_ammo/large
- name = "super compressed matter cartridge"
- ammo = 30
-
-/obj/item/weapon/money
- name = "stack of credits"
- desc = "A pile of 1 credit."
+/obj/item/weapon/spacecash
+ name = "space cash"
+ desc = "It's worth 1 credit."
gender = PLURAL
- icon = 'items.dmi'
+ icon = 'icons/obj/items.dmi'
icon_state = "spacecash"
opacity = 0
density = 0
@@ -191,146 +166,37 @@
throw_speed = 1
throw_range = 2
w_class = 1.0
- var/currency
- var/worth
- var/split = 5
- var/round = 0.01
var/access = list()
- access = ACCESS_CRATE_CASH
+ access = access_crate_cash
-/obj/item/weapon/spacecash
- New() // Just in case
- spawn(1)
- new/obj/item/weapon/money(loc)
- del src
-
-/obj/item/weapon/money/proc/updatedesc()
- name = "stack of [currency]"
- desc = "A pile of [worth] [currency]"
-
-/obj/item/weapon/money/New(var/nloc, var/nworth=1,var/ncurrency = "credits")
- if(!worth)
- worth = nworth
- if(!currency)
- currency = ncurrency
- split = round(worth/2,round)
- updatedesc()
- return ..(nloc)
-
-/obj/item/weapon/money/c10
+/obj/item/weapon/spacecash/c10
icon_state = "spacecash10"
- access = ACCESS_CRATE_CASH
- desc = "A pile of 10 credits."
- worth = 10
-
-/obj/item/weapon/money/c20
+ access = access_crate_cash
+ desc = "It's worth 10 credits."
+/obj/item/weapon/spacecash/c20
icon_state = "spacecash20"
- access = ACCESS_CRATE_CASH
- desc = "A pile of 20 credits."
- worth = 20
-
-/obj/item/weapon/money/c50
+ access = access_crate_cash
+ desc = "It's worth 20 credits."
+/obj/item/weapon/spacecash/c50
icon_state = "spacecash50"
- access = ACCESS_CRATE_CASH
- desc = "A pile of 50 credits."
- worth = 50
-
-/obj/item/weapon/money/c100
+ access = access_crate_cash
+ desc = "It's worth 50 credits."
+/obj/item/weapon/spacecash/c100
icon_state = "spacecash100"
- access = ACCESS_CRATE_CASH
- desc = "A pile of 100 credits."
- worth = 100
-
-/obj/item/weapon/money/c200
+ access = access_crate_cash
+ desc = "It's worth 100 credits."
+/obj/item/weapon/spacecash/c200
icon_state = "spacecash200"
- access = ACCESS_CRATE_CASH
- desc = "A pile of 200 credits."
- worth = 200
-
-/obj/item/weapon/money/c500
+ access = access_crate_cash
+ desc = "It's worth 200 credits."
+/obj/item/weapon/spacecash/c500
icon_state = "spacecash500"
- access = ACCESS_CRATE_CASH
- desc = "A pile of 500 credits."
- worth = 500
-
-/obj/item/weapon/money/c1000
+ access = access_crate_cash
+ desc = "It's worth 500 credits."
+/obj/item/weapon/spacecash/c1000
icon_state = "spacecash1000"
- access = ACCESS_CRATE_CASH
- desc = "A pile of 1000 credits."
- worth = 1000
-
-/obj/item/weapon/money/attack_self(var/mob/user)
- interact(user)
-
-/obj/item/weapon/money/proc/interact(var/mob/user)
-
- user.machine = src
-
- var/dat
-
- dat += " [worth] [currency]"
- dat += " New pile:"
-
- dat += "-"
- dat += "-"
- if(round<=0.1)
- dat += "-"
- if(round<=0.01)
- dat += "-"
- dat += "[split]"
- if(round<=0.01)
- dat += "+"
- if(round<=0.1)
- dat += "+"
- dat += "+"
- dat += "+"
- dat += " split"
-
-
- user << browse(dat, "window=computer;size=400x500")
-
- onclose(user, "computer")
- return
-
-/obj/item/weapon/money/Topic(href, href_list)
- if ((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon)))
- usr.machine = src
-
- if (href_list["su"])
- var/samt = text2num(href_list["su"])
- if(split+samt0)
- split-=samt
- if(href_list["split"])
- new /obj/item/weapon/money(get_turf(src),split,currency)
- worth-=split
- split = round(worth/2,round)
- updatedesc()
-
-
- src.add_fingerprint(usr)
- src.updateUsrDialog()
- for (var/mob/M in viewers(1, src.loc))
- if (M.client && M.machine == src)
- src.attack_self(M)
- return
-
-/obj/item/weapon/money/attackby(var/obj/I as obj, var/mob/user as mob)
- if(istype(I,/obj/item/weapon/money))
- var/mob/living/carbon/c = user
- if(!uppertext(I:currency)==uppertext(currency))
- c<<"You can't mix currencies!"
- return ..()
- else
- worth+=I:worth
- c<<"You combine the piles."
- updatedesc()
- del I
- return ..()
-
+ access = access_crate_cash
+ desc = "It's worth 1000 credits."
/obj/item/device/mass_spectrometer
desc = "A hand-held mass spectrometer which identifies trace chemicals in a blood sample."
@@ -355,21 +221,6 @@
details = 1
origin_tech = "magnets=4;biotech=2"
-/*/obj/item/weapon/melee/chainofcommand
- name = "chain of command"
- desc = "The Captain is first and all other heads are last."
- icon_state = "chainofcommand"
- item_state = "chainofcommand"
- flags = FPRINT | TABLEPASS | CONDUCT
- slot_flags = SLOT_BELT
- force = 10
- throwforce = 7
- w_class = 3
- var/charges = 50.0
- var/maximum_charges = 50.0
- var/status = 1
- origin_tech = "combat=4"*/
-
/obj/item/weapon/melee/energy
var/active = 0
@@ -384,11 +235,12 @@
w_class = 3.0
flags = FPRINT | CONDUCT | NOSHIELD | TABLEPASS
origin_tech = "combat=3"
+ attack_verb = list("attacked", "chopped", "cleaved", "torn", "cut")
/obj/item/weapon/melee/energy/sword
color
name = "energy sword"
- desc = "It cuts AND cooks at the same time!"
+ desc = "May the force be within you."
icon_state = "sword0"
force = 3.0
throwforce = 5.0
@@ -397,11 +249,7 @@
w_class = 2.0
flags = FPRINT | TABLEPASS | NOSHIELD
origin_tech = "magnets=3;syndicate=4"
-
-/obj/item/weapon/melee/energy/sword/chainsword
- color = "chain"
- New()
- return
+ attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
/obj/item/weapon/melee/energy/sword/pirate
name = "energy cutlass"
@@ -412,18 +260,19 @@
name = "energy blade"
desc = "A concentrated beam of energy in the shape of a blade. Very stylish... and lethal."
icon_state = "blade"
- force = 40.0//Normal attacks deal very high damage.
+ force = 70.0//Normal attacks deal very high damage.
throwforce = 1//Throwing or dropping the item deletes it.
throw_speed = 1
throw_range = 1
w_class = 4.0//So you can't hide it in your pocket or some such.
flags = FPRINT | TABLEPASS | NOSHIELD
+ attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
var/datum/effect/effect/system/spark_spread/spark_system
/obj/item/weapon/bananapeel
name = "banana peel"
desc = "A peel from a banana."
- icon = 'items.dmi'
+ icon = 'icons/obj/items.dmi'
icon_state = "banana_peel"
item_state = "banana_peel"
w_class = 1.0
@@ -434,7 +283,7 @@
/obj/item/weapon/corncob
name = "corn cob"
desc = "A reminder of meals gone by."
- icon = 'harvest.dmi'
+ icon = 'icons/obj/harvest.dmi'
icon_state = "corncob"
item_state = "corncob"
w_class = 1.0
@@ -446,7 +295,7 @@
name = "soap"
desc = "A cheap bar of soap. Doesn't smell."
gender = PLURAL
- icon = 'items.dmi'
+ icon = 'icons/obj/items.dmi'
icon_state = "soap"
w_class = 1.0
throwforce = 0
@@ -454,11 +303,11 @@
throw_range = 20
/obj/item/weapon/soap/nanotrasen
- desc = "A NanoTrasen brand bar of soap. Smells of plasma."
+ desc = "A Nanotrasen brand bar of soap. Smells of plasma."
icon_state = "soapnt"
/obj/item/weapon/soap/deluxe
- desc = "A deluxe Waffle Co. brand bar of soap." //What is this I don't even. "Smells of comdoms." --SkyMarshal
+ desc = "A deluxe Waffle Co. brand bar of soap. Smells of condoms."
icon_state = "soapdeluxe"
/obj/item/weapon/soap/syndie
@@ -467,8 +316,8 @@
/obj/item/weapon/bedsheet
name = "bedsheet"
- desc = "Nice, linen bedsheet. Perfect to put on a bed."
- icon = 'items.dmi'
+ desc = "Nice, linen, bedsheet. Perfect to put on."
+ icon = 'icons/obj/items.dmi'
icon_state = "sheet"
layer = 4.0
item_state = "bedsheet"
@@ -545,13 +394,14 @@
/obj/item/weapon/bikehorn
name = "bike horn"
desc = "A horn off of a bicycle."
- icon = 'items.dmi'
+ icon = 'icons/obj/items.dmi'
icon_state = "bike_horn"
item_state = "bike_horn"
throwforce = 3
w_class = 1.0
throw_speed = 3
throw_range = 15
+ attack_verb = list("HONKED")
var/spam_flag = 0
/obj/item/stack/medical
@@ -627,8 +477,8 @@
/obj/item/weapon/c_tube
name = "cardboard tube"
- desc = "A tube made of cardboard."
- icon = 'items.dmi'
+ desc = "A tube... of cardboard."
+ icon = 'icons/obj/items.dmi'
icon_state = "c_tube"
throwforce = 1
w_class = 1.0
@@ -647,7 +497,7 @@
/obj/item/weapon/card
name = "card"
desc = "Does card things."
- icon = 'card.dmi'
+ icon = 'icons/obj/card.dmi'
w_class = 1.0
var/list/files = list( )
@@ -672,8 +522,8 @@
data = "Clown Land"
/obj/item/weapon/card/emag
- desc = "An identification card. Seems to have some funny chip on it, though."
- name = "modified identification card"
+ desc = "It's a card with a magnetic strip attached to some circuitry."
+ name = "cryptographic sequencer"
icon_state = "emag"
item_state = "card-id"
origin_tech = "magnets=2;syndicate=2"
@@ -681,21 +531,15 @@
/obj/item/weapon/card/id
name = "identification card"
- desc = "An identification card."
+ desc = "A card used to provide ID and determine access across the station."
icon_state = "id"
item_state = "card-id"
var/access = list()
var/registered_name = null // The name registered_name on the card
slot_flags = SLOT_ID
- var/pin = 0
- var/money = 0
+
var/assignment = null
- var/over_jumpsuit = 1 // If set to 0, it won't display on top of the mob's jumpsuit
var/dorm = 0 // determines if this ID has claimed a dorm already
- var/obj/item/weapon/credit_card/card
- var/blood_type = "\[UNSET\]"
- var/dna_hash = "\[UNSET\]"
- var/fingerprint_hash = "\[UNSET\]"
/obj/item/weapon/card/id/silver
name = "identification card"
@@ -705,14 +549,14 @@
/obj/item/weapon/card/id/gold
name = "identification card"
- desc = "A golden card which shows authority."
+ desc = "A golden card which shows power and might."
icon_state = "gold"
item_state = "gold_id"
/obj/item/weapon/card/id/syndicate
name = "agent card"
-// desc = "Shhhhh."
- access = list(ACCESS_MAINT_TUNNELS)
+ desc = "Shhhhh."
+ access = list(access_maint_tunnels)
origin_tech = "syndicate=3"
/obj/item/weapon/card/id/syndicate_command
@@ -720,11 +564,11 @@
desc = "An ID straight from the Syndicate."
registered_name = "Syndicate"
assignment = "Syndicate Overlord"
- access = list(ACCESS_SYNDICATE)
+ access = list(access_syndicate)
/obj/item/weapon/card/id/captains_spare
name = "captain's spare ID"
- desc = "The spare ID of the Captain himself."
+ desc = "The spare ID of the High Lord himself."
icon_state = "gold"
item_state = "gold_id"
registered_name = "Captain"
@@ -743,30 +587,10 @@
access = get_all_centcom_access()
..()
-
-/obj/item/weapon/clipboard
- name = "clipboard"
- desc = "Apply paper to this to write better. Can also hold pens."
- icon = 'items.dmi'
- icon_state = "clipboard00"
- var/obj/item/weapon/pen/pen = null
- item_state = "clipboard"
- throwforce = 0
- w_class = 2.0
- throw_speed = 3
- throw_range = 10
- flags = FPRINT | TABLEPASS
- slot_flags = SLOT_BELT
-
-/obj/item/weapon/clipboard/notebook
- name = "notebook"
- desc = "Holds paper and pens. Feels very noire."
- icon_state = "notebook00"
-
#define MAXCOIL 30
/obj/item/weapon/cable_coil
name = "cable coil"
- icon = 'power.dmi'
+ icon = 'icons/obj/power.dmi'
icon_state = "coil_red"
var/amount = MAXCOIL
color = "red"
@@ -780,6 +604,7 @@
flags = TABLEPASS | USEDELAY | FPRINT | CONDUCT
slot_flags = SLOT_BELT
item_state = "coil_red"
+ attack_verb = list("whipped", "lashed", "disciplined", "flogged")
/obj/item/weapon/cable_coil/cut
item_state = "coil_red2"
@@ -820,8 +645,8 @@
/obj/item/weapon/crowbar
name = "crowbar"
- desc = "Used to remove floor tiles."
- icon = 'items.dmi'
+ desc = "Used to hit floors"
+ icon = 'icons/obj/items.dmi'
icon_state = "crowbar"
flags = FPRINT | TABLEPASS| CONDUCT
slot_flags = SLOT_BELT
@@ -831,35 +656,33 @@
w_class = 2.0
m_amt = 50
origin_tech = "engineering=1"
+ attack_verb = list("attacked", "bashed", "battered", "bludgeoned", "whacked")
/obj/item/weapon/crowbar/red
- icon = 'items.dmi'
+ icon = 'icons/obj/items.dmi'
icon_state = "red_crowbar"
item_state = "crowbar_red"
/obj/item/weapon/cane
name = "cane"
- desc = "A cane used by a true gentlemen."
- icon = 'weapons.dmi'
+ desc = "A cane used by a true gentlemen. Or a clown."
+ icon = 'icons/obj/weapons.dmi'
icon_state = "cane"
+ item_state = "cane"
flags = FPRINT | TABLEPASS| CONDUCT
- force = 6.0
+ force = 5.0
throwforce = 7.0
- item_state = "browncane"
w_class = 2.0
m_amt = 50
-
-/obj/item/weapon/cane/browncane
- name = " browncane"
- icon_state = "browncane"
+ attack_verb = list("bludgeoned", "whacked", "disciplined", "thrashed")
/obj/item/weapon/disk
name = "disk"
- icon = 'items.dmi'
+ icon = 'icons/obj/items.dmi'
/obj/item/weapon/disk/nuclear
name = "nuclear authentication disk"
- desc = "Better keep this safe, it can activate the nuke."
+ desc = "Better keep this safe."
icon_state = "nucleardisk"
item_state = "card-id"
w_class = 1.0
@@ -873,19 +696,20 @@
/obj/item/weapon/extinguisher
name = "fire extinguisher"
desc = "A traditional red fire extinguisher."
- icon = 'items.dmi'
+ icon = 'icons/obj/items.dmi'
icon_state = "fire_extinguisher0"
var/last_use = 1.0
var/safety = 1
- hitsound = 'smash.ogg'
+ hitsound = 'sound/weapons/smash.ogg'
flags = FPRINT | USEDELAY | TABLEPASS | CONDUCT
throwforce = 10
w_class = 3.0
throw_speed = 2
throw_range = 10
- force = 15.0
+ force = 10.0
item_state = "fire_extinguisher"
m_amt = 90
+ attack_verb = list("slammed", "whacked", "bashed", "thunked", "battered", "bludgeoned", "thrashed")
/obj/item/weapon/extinguisher/mini
name = "fire extinguisher"
@@ -893,16 +717,16 @@
icon_state = "miniFE0"
hitsound = null //it is much lighter, after all.
flags = FPRINT | USEDELAY | TABLEPASS
- throwforce = 5
+ throwforce = 2
w_class = 2.0
- force = 6.0
+ force = 3.0
item_state = "miniFE"
m_amt = 0
/obj/item/weapon/f_card
name = "finger print card"
desc = "Used to take fingerprints."
- icon = 'card.dmi'
+ icon = 'icons/obj/card.dmi'
icon_state = "fingerprint0"
var/amount = 10.0
item_state = "paper"
@@ -914,14 +738,14 @@
/obj/item/weapon/fcardholder
name = "fingerprint card case"
- desc = "Holds fingerprint cards."
- icon = 'items.dmi'
+ desc = "Apply finger print card."
+ icon = 'icons/obj/items.dmi'
icon_state = "fcardholder0"
item_state = "clipboard"
/obj/item/weapon/flasks
name = "flask"
- icon = 'Cryogenic2.dmi'
+ icon = 'icons/obj/Cryogenic2.dmi'
var/oxygen = 0.0
var/plasma = 0.0
var/coolant = 0.0
@@ -941,9 +765,10 @@
icon_state = "plasma-c"
plasma = 500.0
+/*
/obj/item/weapon/game_kit
name = "Gaming Kit"
- icon = 'items.dmi'
+ icon = 'icons/obj/items.dmi'
icon_state = "game_kit"
var/selected = null
var/board_stat = null
@@ -951,11 +776,12 @@
var/base_url = "http://svn.slurm.us/public/spacestation13/misc/game_kit"
item_state = "sheet-metal"
w_class = 5.0
+*/
/obj/item/weapon/gift
name = "gift"
desc = "A wrapped item."
- icon = 'items.dmi'
+ icon = 'icons/obj/items.dmi'
icon_state = "gift3"
var/size = 3.0
var/obj/item/gift = null
@@ -965,7 +791,7 @@
/obj/item/weapon/hand_tele
name = "hand tele"
desc = "A portable item using blue-space technology."
- icon = 'device.dmi'
+ icon = 'icons/obj/device.dmi'
icon_state = "hand_tele"
item_state = "electronic"
throwforce = 5
@@ -979,7 +805,7 @@
name = "handcuffs"
desc = "Use this to keep prisoners in line."
gender = PLURAL
- icon = 'items.dmi'
+ icon = 'icons/obj/items.dmi'
icon_state = "handcuff"
flags = FPRINT | TABLEPASS | CONDUCT
slot_flags = SLOT_BELT
@@ -1026,10 +852,59 @@
dispenser = 1
+/obj/item/weapon/legcuffs
+ name = "legcuffs"
+ desc = "Use this to keep prisoners in line."
+ gender = PLURAL
+ icon = 'icons/obj/items.dmi'
+ icon_state = "handcuff"
+ flags = FPRINT | TABLEPASS | CONDUCT
+ throwforce = 0
+ w_class = 3.0
+ throw_speed = 2
+ throw_range = 0 //cannot be thrown
+ origin_tech = "materials=1"
+ var/breakouttime = 300 //Deciseconds = 30s = 0.5 minute
+
+/obj/item/weapon/legcuffs/beartrap
+ name = "bear trap"
+ icon_state = "beartrap"
+ desc = "A trap used to catch bears and other legged creatures."
+ breakouttime = 300 //Deciseconds = 30s = 0.5 minute
+ var/armed = 0
+
+/obj/item/weapon/legcuffs/beartrap/attack_self()
+ ..()
+ if(ishuman(usr) && !usr.stat && !usr.restrained())
+ armed = !armed
+ usr << "\blue \the [src] is now [(armed)?"armed":"disarmed"]"
+
+/obj/item/weapon/legcuffs/beartrap/HasEntered(AM as mob|obj)
+ if(armed)
+ if(ishuman(AM))
+ if(isturf(src.loc))
+ var/mob/living/carbon/H = AM
+ if(H.m_intent == "run")
+ armed = 0
+ usr.legcuffed = src
+ src.loc = usr
+ usr.update_inv_legcuffed()
+ H << "\red You step on \the [src]!"
+ feedback_add_details("handcuffs","B") //Yes, I know they're legcuffs. Don't change this, no need for an extra variable. The "B" is used to tell them apart.
+ for(var/mob/O in viewers(H, null))
+ if(O == H)
+ continue
+ O.show_message("\red [H] steps on \the [src].", 1)
+ if(isanimal(AM))
+ armed = 0
+ var/mob/living/simple_animal/SA = AM
+ SA.health = 0
+ ..()
+
/obj/item/weapon/locator
name = "locator"
desc = "Used to track those with locater implants."
- icon = 'device.dmi'
+ icon = 'icons/obj/device.dmi'
icon_state = "locator"
var/temp = null
var/frequency = 1451
@@ -1046,7 +921,7 @@
/obj/item/weapon/caution
desc = "Caution! Wet Floor!"
name = "wet floor sign"
- icon = 'janitor.dmi'
+ icon = 'icons/obj/janitor.dmi'
icon_state = "caution"
force = 1.0
throwforce = 3.0
@@ -1054,38 +929,18 @@
throw_range = 5
w_class = 2.0
flags = FPRINT | TABLEPASS
+ attack_verb = list("warned", "cautioned", "smashed")
/obj/item/weapon/caution/cone
desc = "This cone is trying to warn you of something!"
name = "warning cone"
icon_state = "cone"
-/obj/item/weapon/paper
- name = "\improper Paper"
- icon = 'paper.dmi'
- icon_state = "paper"
- var/info = null
- var/infoold = null
- throwforce = 0
- w_class = 1.0
- throw_speed = 3
- throw_range = 15
- layer = 4
- var/list/stamped
- see_face = 1
- body_parts_covered = HEAD
- slot_flags = SLOT_HEAD
- heat_transfer_coefficient = 0.99
- gas_transfer_coefficient = 1
- permeability_coefficient = 0.99
- siemens_coefficient = 0.80
- var/iteration
-
/obj/item/weapon/directions
name = "crumpled paper"
gender = PLURAL
desc = "This is a crumpled piece of paper."
- icon = 'weapons.dmi'
+ icon = 'icons/obj/weapons.dmi'
icon_state = "crumpled"
throwforce = 0
w_class = 1.0
@@ -1094,30 +949,19 @@
//layer = 4
/obj/item/weapon/paper/Court
- name = "paper - 'Judgement'"
+ name = "paper- 'Judgement'"
info = "For crimes against the station, the offender is sentenced to: \n \n"
-//Please resist giving this to people who have not survived game breaking bugs.
-/*Current recipients:
-Searif: Survived infinite cold bug, body temp was "-nan", still alive.
-eternal248: Found broken and buggy Z-levels 7-12, ended up leading to my discovery of that code and subsequent diking out.
-*/
-/obj/item/weapon/paper/certificate
- name = "paper - 'Certificate'"
- info = "Due to this person's unique actions in the past, we hereby certify that they are \"Well Qualified\"
----Central Command This paper has been stamped with the central command rubber stamp. "
- stamped = list(/obj/item/weapon/stamp/centcom)
- overlays = list("paper_stamped_cent")
-
/obj/item/weapon/paper/Toxin
- name = "paper - 'Chemical Information'"
+ name = "paper- 'Chemical Information'"
info = "Known Onboard Toxins: \n\tGrade A Semi-Liquid Plasma: \n\t\tHighly poisonous. You cannot sustain concentrations above 15 units. \n\t\tA gas mask fails to filter plasma after 50 units. \n\t\tWill attempt to diffuse like a gas. \n\t\tFiltered by scrubbers. \n\t\tThere is a bottled version which is very different \n\t\t\tfrom the version found in canisters! \n \n\t\tWARNING: Highly Flammable. Keep away from heat sources \n\t\texcept in a enclosed fire area! \n\t\tWARNING: It is a crime to use this without authorization. \nKnown Onboard Anti-Toxin: \n\tAnti-Toxin Type 01P: Works against Grade A Plasma. \n\t\tBest if injected directly into bloodstream. \n\t\tA full injection is in every regular Med-Kit. \n\t\tSpecial toxin Kits hold around 7. \n \nKnown Onboard Chemicals (other): \n\tRejuvenation T#001: \n\t\tEven 1 unit injected directly into the bloodstream \n\t\t\twill cure paralysis and sleep toxins. \n\t\tIf administered to a dying patient it will prevent \n\t\t\tfurther damage for about units*3 seconds. \n\t\t\tit will not cure them or allow them to be cured. \n\t\tIt can be administeredd to a non-dying patient \n\t\t\tbut the chemicals disappear just as fast. \n\tSleep Toxin T#054: \n\t\t5 units wilkl induce precisely 1 minute of sleep. \n\t\t\tThe effect are cumulative. \n\t\tWARNING: It is a crime to use this without authorization"
/obj/item/weapon/paper/courtroom
- name = "paper - 'A Crash Course in Legal SOP on SS13'"
+ name = "paper- 'A Crash Course in Legal SOP on SS13'"
info = "Roles: \nThe Detective is basically the investigator and prosecutor. \nThe Staff Assistant can perform these functions with written authority from the Detective. \nThe Captain/HoP/Warden is ct as the judicial authority. \nThe Security Officers are responsible for executing warrants, security during trial, and prisoner transport. \n \nInvestigative Phase: \nAfter the crime has been committed the Detective's job is to gather evidence and try to ascertain not only who did it but what happened. He must take special care to catalogue everything and don't leave anything out. Write out all the evidence on paper. Make sure you take an appropriate number of fingerprints. IF he must ask someone questions he has permission to confront them. If the person refuses he can ask a judicial authority to write a subpoena for questioning. If again he fails to respond then that person is to be jailed as insubordinate and obstructing justice. Said person will be released after he cooperates. \n \nONCE the FT has a clear idea as to who the criminal is he is to write an arrest warrant on the piece of paper. IT MUST LIST THE CHARGES. The FT is to then go to the judicial authority and explain a small version of his case. If the case is moderately acceptable the authority should sign it. Security must then execute said warrant. \n \nPre-Pre-Trial Phase: \nNow a legal representative must be presented to the defendant if said defendant requests one. That person and the defendant are then to be given time to meet (in the jail IS ACCEPTABLE). The defendant and his lawyer are then to be given a copy of all the evidence that will be presented at trial (rewriting it all on paper is fine). THIS IS CALLED THE DISCOVERY PACK. With a few exceptions, THIS IS THE ONLY EVIDENCE BOTH SIDES MAY USE AT TRIAL. IF the prosecution will be seeking the death penalty it MUST be stated at this time. ALSO if the defense will be seeking not guilty by mental defect it must state this at this time to allow ample time for examination. \nNow at this time each side is to compile a list of witnesses. By default, the defendant is on both lists regardless of anything else. Also the defense and prosecution can compile more evidence beforehand BUT in order for it to be used the evidence MUST also be given to the other side.\nThe defense has time to compile motions against some evidence here. \nPossible Motions: \n1. Invalidate Evidence- Something with the evidence is wrong and the evidence is to be thrown out. This includes irrelevance or corrupt security. \n2. Free Movement- Basically the defendant is to be kept uncuffed before and during the trial. \n3. Subpoena Witness- If the defense presents god reasons for needing a witness but said person fails to cooperate then a subpoena is issued. \n4. Drop the Charges- Not enough evidence is there for a trial so the charges are to be dropped. The FT CAN RETRY but the judicial authority must carefully reexamine the new evidence. \n5. Declare Incompetent- Basically the defendant is insane. Once this is granted a medical official is to examine the patient. If he is indeed insane he is to be placed under care of the medical staff until he is deemed competent to stand trial. \n \nALL SIDES MOVE TO A COURTROOM \nPre-Trial Hearings: \nA judicial authority and the 2 sides are to meet in the trial room. NO ONE ELSE BESIDES A SECURITY DETAIL IS TO BE PRESENT. The defense submits a plea. If the plea is guilty then proceed directly to sentencing phase. Now the sides each present their motions to the judicial authority. He rules on them. Each side can debate each motion. Then the judicial authority gets a list of crew members. He first gets a chance to look at them all and pick out acceptable and available jurors. Those jurors are then called over. Each side can ask a few questions and dismiss jurors they find too biased. HOWEVER before dismissal the judicial authority MUST agree to the reasoning. \n \nThe Trial: \nThe trial has three phases. \n1. Opening Arguments- Each side can give a short speech. They may not present ANY evidence. \n2. Witness Calling/Evidence Presentation- The prosecution goes first and is able to call the witnesses on his approved list in any order. He can recall them if necessary. During the questioning the lawyer may use the evidence in the questions to help prove a point. After every witness the other side has a chance to cross-examine. After both sides are done questioning a witness the prosecution can present another or recall one (even the EXACT same one again!). After prosecution is done the defense can call witnesses. After the initial cases are presented both sides are free to call witnesses on either list. \nFINALLY once both sides are done calling witnesses we move onto the next phase. \n3. Closing Arguments- Same as opening. \nThe jury then deliberates IN PRIVATE. THEY MUST ALL AGREE on a verdict. REMEMBER: They mix between some charges being guilty and others not guilty (IE if you supposedly killed someone with a gun and you unfortunately picked up a gun without authorization then you CAN be found not guilty of murder BUT guilty of possession of illegal weaponry.). Once they have agreed they present their verdict. If unable to reach a verdict and feel they will never they call a deadlocked jury and we restart at Pre-Trial phase with an entirely new set of jurors. \n \nSentencing Phase: \nIf the death penalty was sought (you MUST have gone through a trial for death penalty) then skip to the second part. \nI. Each side can present more evidence/witnesses in any order. There is NO ban on emotional aspects or anything. The prosecution is to submit a suggested penalty. After all the sides are done then the judicial authority is to give a sentence. \nII. The jury stays and does the same thing as I. Their sole job is to determine if the death penalty is applicable. If NOT then the judge selects a sentence. \n \nTADA you're done. Security then executes the sentence and adds the applicable convictions to the person's record. \n"
/obj/item/weapon/paper/hydroponics
- name = "paper - 'Greetings from Billy Bob'"
+ name = "paper- 'Greetings from Billy Bob'"
info = "Hey fellow botanist! \n \nI didn't trust the station folk so I left \na couple of weeks ago. But here's some \ninstructions on how to operate things here. \nYou can grow plants and each iteration they become \nstronger, more potent and have better yield, if you \nknow which ones to pick. Use your botanist's analyzer \nfor that. You can turn harvested plants into seeds \nat the seed extractor, and replant them for better stuff! \nSometimes if the weed level gets high in the tray \nmutations into different mushroom or weed species have \nbeen witnessed. On the rare occassion even weeds mutate! \n \nEither way, have fun! \n \nBest regards, \nBilly Bob Johnson. \n \nPS. \nHere's a few tips: \nIn nettles, potency = damage \nIn amanitas, potency = deadliness + side effect \nIn Liberty caps, potency = drug power + effect \nIn chilis, potency = heat \nNutrients keep mushrooms alive! \nWater keeps weeds such as nettles alive! \nAll other plants need both."
/obj/item/weapon/paper/flag
@@ -1126,7 +970,7 @@ eternal248: Found broken and buggy Z-levels 7-12, ended up leading to my discove
anchored = 1.0
/obj/item/weapon/paper/jobs
- name = "paper - 'Job Information'"
+ name = "paper- 'Job Information'"
info = "Information on all formal jobs that can be assigned on Space Station 13 can be found on this document. \nThe data will be in the following form. \nGenerally lower ranking positions come first in this list. \n \nJob Name general access>lab access-engine access-systems access (atmosphere control) \n\tJob Description \nJob Duties (in no particular order) \nTips (where applicable) \n \nResearch Assistant 1>1-0-0 \n\tThis is probably the lowest level position. Anyone who enters the space station after the initial job\nassignment will automatically receive this position. Access with this is restricted. Head of Personnel should\nappropriate the correct level of assistance. \n1. Assist the researchers. \n2. Clean up the labs. \n3. Prepare materials. \n \nStaff Assistant 2>0-0-0 \n\tThis position assists the security officer in his duties. The staff assisstants should primarily br\npatrolling the ship waiting until they are needed to maintain ship safety.\n(Addendum: Updated/Elevated Security Protocols admit issuing of low level weapons to security personnel) \n1. Patrol ship/Guard key areas \n2. Assist security officer \n3. Perform other security duties. \n \nTechnical Assistant 1>0-0-1 \n\tThis is yet another low level position. The technical assistant helps the engineer and the statian\ntechnician with the upkeep and maintenance of the station. This job is very important because it usually\ngets to be a heavy workload on station technician and these helpers will alleviate that. \n1. Assist Station technician and Engineers. \n2. Perform general maintenance of station. \n3. Prepare materials. \n \nMedical Assistant 1>1-0-0 \n\tThis is the fourth position yet it is slightly less common. This position doesn't have much power\noutside of the med bay. Consider this position like a nurse who helps to upkeep medical records and the\nmaterials (filling syringes and checking vitals) \n1. Assist the medical personnel. \n2. Update medical files. \n3. Prepare materials for medical operations. \n \nResearch Technician 2>3-0-0 \n\tThis job is primarily a step up from research assistant. These people generally do not get their own lab\nbut are more hands on in the experimentation process. At this level they are permitted to work as consultants to\nthe others formally. \n1. Inform superiors of research. \n2. Perform research alongside of official researchers. \n \nDetective 3>2-0-0 \n\tThis job is in most cases slightly boring at best. Their sole duty is to\nperform investigations of crine scenes and analysis of the crime scene. This\nalleviates SOME of the burden from the security officer. This person's duty\nis to draw conclusions as to what happened and testify in court. Said person\nalso should stroe the evidence ly. \n1. Perform crime-scene investigations/draw conclusions. \n2. Store and catalogue evidence properly. \n3. Testify to superiors/inquieries on findings. \n \nStation Technician 2>0-2-3 \n\tPeople assigned to this position must work to make sure all the systems aboard Space Station 13 are operable.\nThey should primarily work in the computer lab and repairing faulty equipment. They should work with the\natmospheric technician. \n1. Maintain SS13 systems. \n2. Repair equipment. \n \nAtmospheric Technician 3>0-0-4 \n\tThese people should primarily work in the atmospheric control center and lab. They have the very important\njob of maintaining the delicate atmosphere on SS13. \n1. Maintain atmosphere on SS13 \n2. Research atmospheres on the space station. (safely please!) \n \nEngineer 2>1-3-0 \n\tPeople working as this should generally have detailed knowledge as to how the propulsion systems on SS13\nwork. They are one of the few classes that have unrestricted access to the engine area. \n1. Upkeep the engine. \n2. Prevent fires in the engine. \n3. Maintain a safe orbit. \n \nMedical Researcher 2>5-0-0 \n\tThis position may need a little clarification. Their duty is to make sure that all experiments are safe and\nto conduct experiments that may help to improve the station. They will be generally idle until a new laboratory\nis constructed. \n1. Make sure the station is kept safe. \n2. Research medical properties of materials studied of Space Station 13. \n \nScientist 2>5-0-0 \n\tThese people study the properties, particularly the toxic properties, of materials handled on SS13.\nTechnically they can also be called Plasma Technicians as plasma is the material they routinly handle. \n1. Research plasma \n2. Make sure all plasma is properly handled. \n \nMedical Doctor (Officer) 2>0-0-0 \n\tPeople working this job should primarily stay in the medical area. They should make sure everyone goes to\nthe medical bay for treatment and examination. Also they should make sure that medical supplies are kept in\norder. \n1. Heal wounded people. \n2. Perform examinations of all personnel. \n3. Moniter usage of medical equipment. \n \nSecurity Officer 3>0-0-0 \n\tThese people should attempt to keep the peace inside the station and make sure the station is kept safe. One\nside duty is to assist in repairing the station. They also work like general maintenance personnel. They are not\ngiven a weapon and must use their own resources. \n(Addendum: Updated/Elevated Security Protocols admit issuing of weapons to security personnel) \n1. Maintain order. \n2. Assist others. \n3. Repair structural problems. \n \nHead of Security 4>5-2-2 \n\tPeople assigned as Head of Security should issue orders to the security staff. They should\nalso carefully moderate the usage of all security equipment. All security matters should be reported to this person. \n1. Oversee security. \n2. Assign patrol duties. \n3. Protect the station and staff. \n \nHead of Personnel 4>4-2-2 \n\tPeople assigned as head of personnel will find themselves moderating all actions done by personnel. \nAlso they have the ability to assign jobs and access levels. \n1. Assign duties. \n2. Moderate personnel. \n3. Moderate research. \n \nCaptain 5>5-5-5 (unrestricted station wide access) \n\tThis is the highest position youi can aquire on Space Station 13. They are allowed anywhere inside the\nspace station and therefore should protect their ID card. They also have the ability to assign positions\nand access levels. They should not abuse their power. \n1. Assign all positions on SS13 \n2. Inspect the station for any problems. \n3. Perform administrative duties. \n"
/obj/item/weapon/paper/photograph
@@ -1136,63 +980,13 @@ eternal248: Found broken and buggy Z-levels 7-12, ended up leading to my discove
item_state = "paper"
/obj/item/weapon/paper/sop
- name = "paper - 'Standard Operating Procedure'"
+ name = "paper- 'Standard Operating Procedure'"
info = "Alert Levels: \nBlue- Emergency \n\t1. Caused by fire \n\t2. Caused by manual interaction \n\tAction: \n\t\tClose all fire doors. These can only be opened by reseting the alarm \nRed- Ejection/Self Destruct \n\t1. Caused by module operating computer. \n\tAction: \n\t\tAfter the specified time the module will eject completely. \n \nEngine Maintenance Instructions: \n\tShut off ignition systems: \n\tActivate internal power \n\tActivate orbital balance matrix \n\tRemove volatile liquids from area \n\tWear a fire suit \n \n\tAfter \n\t\tDecontaminate \n\t\tVisit medical examiner \n \nToxin Laboratory Procedure: \n\tWear a gas mask regardless \n\tGet an oxygen tank. \n\tActivate internal atmosphere \n \n\tAfter \n\t\tDecontaminate \n\t\tVisit medical examiner \n \nDisaster Procedure: \n\tFire: \n\t\tActivate sector fire alarm. \n\t\tMove to a safe area. \n\t\tGet a fire suit \n\t\tAfter: \n\t\t\tAssess Damage \n\t\t\tRepair damages \n\t\t\tIf needed, Evacuate \n\tMeteor Shower: \n\t\tActivate fire alarm \n\t\tMove to the back of ship \n\t\tAfter \n\t\t\tRepair damage \n\t\t\tIf needed, Evacuate \n\tAccidental Reentry: \n\t\tActivate fire alrms in front of ship. \n\t\tMove volatile matter to a fire proof area! \n\t\tGet a fire suit. \n\t\tStay secure until an emergency ship arrives. \n \n\t\tIf ship does not arrive- \n\t\t\tEvacuate to a nearby safe area!"
-/obj/item/weapon/paper/armoury
- name = "paper - 'Armoury Inventory'"
- info = "
Armoury Inventory
Item
Stock
In Use
Notes
Ablative Armour Vest
1
0
-
Beanbag Shells
12
0
-
Body Bags
1
0
-
Bulletproof Vest
1
0
-
Chemical Implant Kit
1
0
-
Combat Shotguns
2
0
-
Deployable Barrier
9
0
-
Deployable Flashers
4
0
-
Energy Gun
6
0
-
Flashbangs
7
0
-
Gas Mask
3
0
-
Handcuffs
7
0
-
Ion Rifle
1
0
-
L3 Biohazard Suit
1
0
-
L4 EOD Suit
1
0
-
Laser Gun
1
0
-
Lockbox
1
0
-
Loyalty Implants Lockbox
1
0
-
Pepper Sprayers
2
0
-
RIG Helmet
1
0
-
RIG Suit
1
0
-
Riot Helmet
3
0
-
Riot Shield
3
0
-
Riot Suit
3
0
-
Stun Baton
5
0
-
Taser
3
0
-
Tracking Implant Kit
1
0
-
Officer Name
Items Withdrawn
Notes
-
-
-
List maintained by NSS Exodus, Warden,
"
-
-/obj/item/weapon/paper_bin
- name = "Paper Bin"
- desc = "This contains many papers."
- icon = 'paper.dmi'
- icon_state = "paper_bin1"
- var/amount = 30.0
- item_state = "sheet-metal"
- throwforce = 1
- w_class = 3.0
- throw_speed = 3
- throw_range = 7
-
-/obj/item/weapon/pen
- desc = "It's a normal black ink pen."
- name = "pen"
- icon = 'paper.dmi'
- icon_state = "pen"
- flags = FPRINT | TABLEPASS
- slot_flags = SLOT_BELT
- throwforce = 0
- w_class = 1.0
- throw_speed = 7
- throw_range = 15
- m_amt = 10
- var/text_size = 2
- var/text_color = "#000000"
- var/text_bold = 0
- var/text_italic = 0
- var/text_underline = 0
- var/text_break = 0
-
-/obj/item/weapon/pen/blue
- desc = "It's a normal blue ink pen."
- icon_state = "pen_blue"
- text_color = "#00000F"
-
-/obj/item/weapon/pen/red
- desc = "It's a normal red ink pen."
- icon_state = "pen_red"
- text_color = "#FF0000"
-
-/obj/item/weapon/pen/feather
- name = "feathery pen"
- desc = "A gold pen disguised as a quill. How quaint."
- icon_state = "featherpen"
-
/obj/item/weapon/banhammer
desc = "A banhammer"
name = "banhammer"
- icon = 'items.dmi'
+ icon = 'icons/obj/items.dmi'
icon_state = "toyhammer"
flags = FPRINT | TABLEPASS
slot_flags = SLOT_BELT
@@ -1200,9 +994,10 @@ eternal248: Found broken and buggy Z-levels 7-12, ended up leading to my discove
w_class = 1.0
throw_speed = 7
throw_range = 15
+ attack_verb = list("banned")
/obj/item/weapon/pen/sleepypen
- desc = "It's a normal black ink pen with a sharp point."
+ desc = "It's a normal black ink pen with a sharp point and a carefully engraved \"Waffle Co.\""
flags = FPRINT | TABLEPASS | OPENCONTAINER
slot_flags = SLOT_BELT
origin_tech = "materials=2;biotech=1;syndicate=7"
@@ -1216,7 +1011,7 @@ eternal248: Found broken and buggy Z-levels 7-12, ended up leading to my discove
/obj/item/weapon/rack_parts
name = "rack parts"
desc = "Parts of a rack."
- icon = 'items.dmi'
+ icon = 'icons/obj/items.dmi'
icon_state = "rack_parts"
flags = FPRINT | TABLEPASS| CONDUCT
m_amt = 3750
@@ -1224,15 +1019,15 @@ eternal248: Found broken and buggy Z-levels 7-12, ended up leading to my discove
/obj/item/weapon/rubber_chicken
name = "rubber chicken"
desc = "A rubber chicken, isn't that hilarious?"
- icon = 'items.dmi'
+ icon = 'icons/obj/items.dmi'
icon_state = "rubber_chicken"
item_state = "rubber_chicken"
w_class = 2.0
/obj/item/weapon/screwdriver
name = "screwdriver"
- desc = "Used for screwing."
- icon = 'items.dmi'
+ desc = "You can be totally screwwy with this."
+ icon = 'icons/obj/items.dmi'
icon_state = "screwdriver"
flags = FPRINT | TABLEPASS| CONDUCT
slot_flags = SLOT_BELT
@@ -1243,22 +1038,43 @@ eternal248: Found broken and buggy Z-levels 7-12, ended up leading to my discove
throw_range = 5
g_amt = 0
m_amt = 75
+ attack_verb = list("stabbed")
/obj/item/weapon/shard
name = "shard"
- icon = 'shards.dmi'
+ icon = 'icons/obj/shards.dmi'
icon_state = "large"
desc = "Could probably be used as ... a throwing weapon?"
w_class = 1.0
- force = 7.0
+ force = 5.0
throwforce = 15.0
item_state = "shard-glass"
g_amt = 3750
+ attack_verb = list("stabbed", "slashed", "sliced", "cut")
+
+/*/obj/item/weapon/syndicate_uplink
+ name = "station bounced radio"
+ desc = "Remain silent about this..."
+ icon = 'icons/obj/radio.dmi'
+ icon_state = "radio"
+ var/temp = null
+ var/uses = 10.0
+ var/selfdestruct = 0.0
+ var/traitor_frequency = 0.0
+ var/mob/currentUser = null
+ var/obj/item/device/radio/origradio = null
+ flags = FPRINT | TABLEPASS | CONDUCT | ONBELT
+ w_class = 2.0
+ item_state = "radio"
+ throw_speed = 4
+ throw_range = 20
+ m_amt = 100
+ origin_tech = "magnets=2;syndicate=3"*/
/obj/item/weapon/SWF_uplink
name = "station-bounced radio"
desc = "used to comunicate it appears."
- icon = 'radio.dmi'
+ icon = 'icons/obj/radio.dmi'
icon_state = "radio"
var/temp = null
var/uses = 4.0
@@ -1277,8 +1093,8 @@ eternal248: Found broken and buggy Z-levels 7-12, ended up leading to my discove
/obj/item/weapon/spellbook
name = "spell book"
- desc = "The legendary book of spells of a wizard."
- icon = 'library.dmi'
+ desc = "The legendary book of spells of the wizard."
+ icon = 'icons/obj/library.dmi'
icon_state ="book"
throw_speed = 1
throw_range = 5
@@ -1286,17 +1102,13 @@ eternal248: Found broken and buggy Z-levels 7-12, ended up leading to my discove
flags = FPRINT | TABLEPASS
var/uses = 5.0
var/temp = null
- var/spell_type = "verb"
var/max_uses = 5
var/op = 1
-/obj/item/weapon/spellbook/object_type_spells //used for giving out object spells as opposed to verb spells
- spell_type = "object"
-
/obj/item/weapon/staff
name = "wizards staff"
- desc = "Apparently a staff used by a wizard."
- icon = 'wizard.dmi'
+ desc = "Apparently a staff used by the wizard."
+ icon = 'icons/obj/wizard.dmi'
icon_state = "staff"
force = 3.0
throwforce = 5.0
@@ -1304,12 +1116,12 @@ eternal248: Found broken and buggy Z-levels 7-12, ended up leading to my discove
throw_range = 5
w_class = 2.0
flags = FPRINT | TABLEPASS | NOSHIELD
-
+ attack_verb = list("bludgeoned", "whacked", "disciplined")
/obj/item/weapon/staff/stick
name = "stick"
desc = "A great tool to drag someone else's drinks across the bar."
- icon = 'weapons.dmi'
+ icon = 'icons/obj/weapons.dmi'
icon_state = "stick"
item_state = "stick"
force = 3.0
@@ -1323,15 +1135,16 @@ eternal248: Found broken and buggy Z-levels 7-12, ended up leading to my discove
name = "table parts"
desc = "Parts of a table. Poor table."
gender = PLURAL
- icon = 'items.dmi'
+ icon = 'icons/obj/items.dmi'
icon_state = "table_parts"
m_amt = 3750
flags = FPRINT | TABLEPASS| CONDUCT
+ attack_verb = list("slammed", "bashed", "battered", "bludgeoned", "thrashed", "whacked")
/obj/item/weapon/table_parts/reinforced
name = "reinforced table parts"
desc = "Hard table parts. Well...harder..."
- icon = 'items.dmi'
+ icon = 'icons/obj/items.dmi'
icon_state = "reinf_tableparts"
m_amt = 7500
flags = FPRINT | TABLEPASS| CONDUCT
@@ -1345,7 +1158,7 @@ eternal248: Found broken and buggy Z-levels 7-12, ended up leading to my discove
/obj/item/weapon/teleportation_scroll
name = "scroll of teleportation"
desc = "A scroll for moving around."
- icon = 'wizard.dmi'
+ icon = 'icons/obj/wizard.dmi'
icon_state = "scroll"
var/uses = 4.0
flags = FPRINT | TABLEPASS
@@ -1358,29 +1171,30 @@ eternal248: Found broken and buggy Z-levels 7-12, ended up leading to my discove
/obj/item/weapon/wire
desc = "This is just a simple piece of regular insulated wire."
name = "wire"
- icon = 'power.dmi'
+ icon = 'icons/obj/power.dmi'
icon_state = "item_wire"
var/amount = 1.0
var/laying = 0.0
var/old_lay = null
m_amt = 40
+ attack_verb = list("whipped", "lashed", "disciplined", "tickled")
/obj/item/weapon/wrapping_paper
name = "wrapping paper"
desc = "You can use this to wrap items in."
- icon = 'items.dmi'
+ icon = 'icons/obj/items.dmi'
icon_state = "wrap_paper"
var/amount = 20.0
/obj/item/weapon/cell
name = "power cell"
desc = "A rechargable electrochemical power cell."
- icon = 'power.dmi'
+ icon = 'icons/obj/power.dmi'
icon_state = "cell"
item_state = "cell"
origin_tech = "powerstorage=1"
flags = FPRINT|TABLEPASS
- force = 10.0
+ force = 5.0
throwforce = 5.0
throw_speed = 3
throw_range = 5
@@ -1396,7 +1210,7 @@ eternal248: Found broken and buggy Z-levels 7-12, ended up leading to my discove
var/construction_time=100
/obj/item/weapon/cell/crap
- name = "\improper NanoTrasen Brand Rechargable AA Battery"
+ name = "\improper Nanotrasen brand rechargable AA battery"
desc = "You can't top the plasma top." //TOTALLY TRADEMARK INFRINGEMENT
origin_tech = "powerstorage=0"
maxcharge = 500
@@ -1464,8 +1278,8 @@ eternal248: Found broken and buggy Z-levels 7-12, ended up leading to my discove
name = "potato battery"
desc = "A rechargable starch based power cell."
origin_tech = "powerstorage=1"
- icon = 'power.dmi' //'harvest.dmi'
- icon_state = "cell" //"potato_battery"
+ icon = 'icons/obj/power.dmi' //'icons/obj/harvest.dmi'
+ icon_state = "potato_cell" //"potato_battery"
charge = 100
maxcharge = 300
m_amt = 0
@@ -1474,7 +1288,7 @@ eternal248: Found broken and buggy Z-levels 7-12, ended up leading to my discove
/obj/item/weapon/camera_bug/attack_self(mob/usr as mob)
var/list/cameras = new/list()
- for (var/obj/machinery/camera/C in world)
+ for (var/obj/machinery/camera/C in Cameras)
if (C.bugged && C.status)
cameras.Add(C)
if (length(cameras) == 0)
@@ -1486,7 +1300,7 @@ eternal248: Found broken and buggy Z-levels 7-12, ended up leading to my discove
for (var/obj/machinery/camera/C in cameras)
friendly_cameras.Add(C.c_tag)
- var/target = input("Select the camera to observe.", null) as null|anything in friendly_cameras
+ var/target = input("Select the camera to observe", null) as null|anything in friendly_cameras
if (!target)
return
for (var/obj/machinery/camera/C in cameras)
@@ -1499,7 +1313,7 @@ eternal248: Found broken and buggy Z-levels 7-12, ended up leading to my discove
/obj/item/weapon/module
- icon = 'module.dmi'
+ icon = 'icons/obj/module.dmi'
icon_state = "std_module"
w_class = 2.0
item_state = "electronic"
@@ -1515,8 +1329,6 @@ eternal248: Found broken and buggy Z-levels 7-12, ended up leading to my discove
name = "power control module"
icon_state = "power_mod"
desc = "Heavy-duty switching circuits for power control."
- m_amt = 50
- g_amt = 50
/obj/item/weapon/module/id_auth
name = "\improper ID authentication module"
@@ -1536,8 +1348,8 @@ eternal248: Found broken and buggy Z-levels 7-12, ended up leading to my discove
/obj/item/weapon/a_gift
name = "gift"
- desc = "A gift, it appears."
- icon = 'items.dmi'
+ desc = "A gift it appears."
+ icon = 'icons/obj/items.dmi'
icon_state = "gift"
item_state = "gift"
pressure_resistance = 70
@@ -1545,7 +1357,7 @@ eternal248: Found broken and buggy Z-levels 7-12, ended up leading to my discove
/obj/item/weapon/camera_bug
name = "camera bug"
- icon = 'device.dmi'
+ icon = 'icons/obj/device.dmi'
icon_state = "flash"
w_class = 1.0
item_state = "electronic"
@@ -1554,21 +1366,22 @@ eternal248: Found broken and buggy Z-levels 7-12, ended up leading to my discove
/obj/item/weapon/kitchen
- icon = 'kitchen.dmi'
+ icon = 'icons/obj/kitchen.dmi'
/obj/item/weapon/kitchen/rollingpin
name = "rolling pin"
- desc = "Used to flatten dough."
+ desc = "Used to knock out the Bartender."
icon_state = "rolling_pin"
force = 8.0
throwforce = 10.0
throw_speed = 2
throw_range = 7
w_class = 3.0
+ attack_verb = list("bashed", "battered", "bludgeoned", "thrashed", "whacked") //I think the rollingpin attackby will end up ignoring this anyway.
/obj/item/weapon/kitchenknife
name = "kitchen knife"
- icon = 'kitchen.dmi'
+ icon = 'icons/obj/kitchen.dmi'
icon_state = "knife"
desc = "A general purpose Chef's Knife made by SpaceCook Incorporated. Guaranteed to stay sharp for years to come."
flags = FPRINT | TABLEPASS | CONDUCT
@@ -1579,12 +1392,13 @@ eternal248: Found broken and buggy Z-levels 7-12, ended up leading to my discove
throw_range = 6
m_amt = 12000
origin_tech = "materials=1"
+ attack_verb = list("slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
/obj/item/weapon/butch
- name = "butcher's cleaver"
- icon = 'kitchen.dmi'
+ name = "butcher's Cleaver"
+ icon = 'icons/obj/kitchen.dmi'
icon_state = "butch"
- desc = "A huge thing used for chopping and chopping up meat."
+ desc = "A huge thing used for chopping and chopping up meat. This includes clowns and clown-by-products."
flags = FPRINT | TABLEPASS | CONDUCT
force = 15.0
w_class = 2.0
@@ -1593,10 +1407,11 @@ eternal248: Found broken and buggy Z-levels 7-12, ended up leading to my discove
throw_range = 6
m_amt = 12000
origin_tech = "materials=1"
+ attack_verb = list("cleaved", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
/obj/item/weapon/tray
name = "tray"
- icon = 'food.dmi'
+ icon = 'icons/obj/food.dmi'
icon_state = "tray"
desc = "A metal tray to lay food on."
throwforce = 12.0
@@ -1635,13 +1450,13 @@ eternal248: Found broken and buggy Z-levels 7-12, ended up leading to my discove
throw_range = 5
flags = FPRINT | TABLEPASS | CONDUCT
origin_tech = "materials=1"
+ attack_verb = list("attacked", "stabbed", "poked")
/obj/item/weapon/kitchen/utensil/fork
name = "fork"
desc = "Pointy."
icon_state = "fork"
- var/obj/item/weapon/reagent_containers/food/snacks/bite
/obj/item/weapon/kitchen/utensil/knife
name = "knife"
@@ -1654,11 +1469,12 @@ eternal248: Found broken and buggy Z-levels 7-12, ended up leading to my discove
name = "spoon"
desc = "SPOON!"
icon_state = "spoon"
+ attack_verb = list("attacked", "poked")
/obj/item/weapon/scalpel
name = "scalpel"
desc = "Cut, cut, and once more cut."
- icon = 'surgery.dmi'
+ icon = 'icons/obj/surgery.dmi'
icon_state = "scalpel"
flags = FPRINT | TABLEPASS | CONDUCT
force = 10.0
@@ -1669,12 +1485,15 @@ eternal248: Found broken and buggy Z-levels 7-12, ended up leading to my discove
m_amt = 10000
g_amt = 5000
origin_tech = "materials=1;biotech=1"
+ attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
/obj/item/weapon/retractor
name = "retractor"
desc = "Retracts stuff."
- icon = 'surgery.dmi'
+ icon = 'icons/obj/surgery.dmi'
icon_state = "retractor"
+ m_amt = 10000
+ g_amt = 5000
flags = FPRINT | TABLEPASS | CONDUCT
w_class = 1.0
origin_tech = "materials=1;biotech=1"
@@ -1682,38 +1501,47 @@ eternal248: Found broken and buggy Z-levels 7-12, ended up leading to my discove
/obj/item/weapon/hemostat
name = "hemostat"
desc = "You think you have seen this before."
- icon = 'surgery.dmi'
+ icon = 'icons/obj/surgery.dmi'
icon_state = "hemostat"
+ m_amt = 5000
+ g_amt = 2500
flags = FPRINT | TABLEPASS | CONDUCT
w_class = 1.0
origin_tech = "materials=1;biotech=1"
+ attack_verb = list("attacked", "pinched")
/obj/item/weapon/cautery
name = "cautery"
desc = "This stops bleeding."
- icon = 'surgery.dmi'
+ icon = 'icons/obj/surgery.dmi'
icon_state = "cautery"
+ m_amt = 5000
+ g_amt = 2500
flags = FPRINT | TABLEPASS | CONDUCT
w_class = 1.0
origin_tech = "materials=1;biotech=1"
+ attack_verb = list("burnt")
/obj/item/weapon/surgicaldrill
name = "surgical drill"
desc = "You can drill using this item. You dig?"
- icon = 'surgery.dmi'
+ icon = 'icons/obj/surgery.dmi'
icon_state = "drill"
- hitsound = 'circsawhit.ogg'
+ hitsound = 'sound/weapons/circsawhit.ogg'
+ m_amt = 15000
+ g_amt = 10000
flags = FPRINT | TABLEPASS | CONDUCT
force = 15.0
w_class = 1.0
origin_tech = "materials=1;biotech=1"
+ attack_verb = list("drilled")
/obj/item/weapon/circular_saw
name = "circular saw"
desc = "For heavy duty cutting."
- icon = 'surgery.dmi'
+ icon = 'icons/obj/surgery.dmi'
icon_state = "saw3"
- hitsound = 'circsawhit.ogg'
+ hitsound = 'sound/weapons/circsawhit.ogg'
flags = FPRINT | TABLEPASS | CONDUCT
force = 15.0
w_class = 1.0
@@ -1723,20 +1551,12 @@ eternal248: Found broken and buggy Z-levels 7-12, ended up leading to my discove
m_amt = 20000
g_amt = 10000
origin_tech = "materials=1;biotech=1"
-
-/obj/item/weapon/autopsy_scanner
- name = "autopsy scanner"
- desc = "Extracts information on wounds."
- icon = 'autopsy_scanner.dmi'
- icon_state = ""
- flags = FPRINT | TABLEPASS | CONDUCT
- w_class = 1.0
- origin_tech = "materials=1;biotech=1"
+ attack_verb = list("attacked", "slashed", "sawed", "cut")
/obj/item/weapon/syntiflesh
name = "syntiflesh"
desc = "Meat that appears...strange..."
- icon = 'food.dmi'
+ icon = 'icons/obj/food.dmi'
icon_state = "meat"
flags = FPRINT | TABLEPASS | CONDUCT
w_class = 1.0
@@ -1745,7 +1565,7 @@ eternal248: Found broken and buggy Z-levels 7-12, ended up leading to my discove
/obj/item/weapon/hatchet
name = "hatchet"
desc = "A very sharp axe blade upon a short fibremetal handle. It has a long history of chopping things, but now it is used for chopping wood."
- icon = 'weapons.dmi'
+ icon = 'icons/obj/weapons.dmi'
icon_state = "hatchet"
flags = FPRINT | TABLEPASS | CONDUCT
force = 12.0
@@ -1755,84 +1575,26 @@ eternal248: Found broken and buggy Z-levels 7-12, ended up leading to my discove
throw_range = 4
m_amt = 15000
origin_tech = "materials=2;combat=1"
+ attack_verb = list("chopped", "torn", "cut")
-/obj/item/weapon/stamp
- desc = "A rubber stamp for stamping important documents."
- name = "rubber stamp"
- icon = 'paper.dmi'
- icon_state = "stamp-qm"
- item_state = "stamp"
- flags = FPRINT | TABLEPASS
- throwforce = 0
- w_class = 1.0
- throw_speed = 7
- throw_range = 15
- m_amt = 60
- color = "cargo"
-
-/obj/item/weapon/stamp/captain
- name = "captain's rubber stamp"
- icon_state = "stamp-cap"
- color = "captain"
-
-/obj/item/weapon/stamp/hop
- name = "head of personnel's rubber stamp"
- icon_state = "stamp-hop"
- color = "hop"
-
-/obj/item/weapon/stamp/hos
- name = "head of security's rubber stamp"
- icon_state = "stamp-hos"
- color = "hosred"
-
-/obj/item/weapon/stamp/ce
- name = "chief engineer's rubber stamp"
- icon_state = "stamp-ce"
- color = "chief"
-
-/obj/item/weapon/stamp/rd
- name = "research director's rubber stamp"
- icon_state = "stamp-rd"
- color = "director"
-
-/obj/item/weapon/stamp/cmo
- name = "chief medical officer's rubber stamp"
- icon_state = "stamp-cmo"
- color = "medical"
-
-/obj/item/weapon/stamp/denied
- name = "DENIED rubber stamp"
- icon_state = "stamp-qm"
- color = "redcoat"
-
-/obj/item/weapon/stamp/clown
- name = "clown's rubber stamp"
- icon_state = "stamp-clown"
- color = "clown"
-
-/obj/item/weapon/stamp/centcom
- name = "central command rubber stamp"
- icon_state = "stamp-cent"
- color = "centcom"
/*
/obj/item/weapon/cigarpacket
name = "Pete's Cuban Cigars"
desc = "The most robust cigars on the planet."
- icon = 'cigarettes.dmi'
+ icon = 'icons/obj/cigarettes.dmi'
icon_state = "cigarpacket"
item_state = "cigarpacket"
w_class = 1
throwforce = 2
var/cigarcount = 6
- flags = TABLEPASS
- slot_flags = SLOT_BELT*/
+ flags = ONBELT | TABLEPASS */
/obj/item/weapon/mousetrap
name = "mousetrap"
desc = "A handy little spring-loaded trap for catching pesty rodents."
- icon = 'weapons.dmi'
+ icon = 'icons/obj/weapons.dmi'
icon_state = "mousetrap"
item_state = "mousetrap"
w_class = 1
@@ -1845,18 +1607,11 @@ eternal248: Found broken and buggy Z-levels 7-12, ended up leading to my discove
icon_state = "mousetraparmed"
armed = 1
-/obj/item/weapon/dice/d4 // -- SkyMarshal
- name = "d4"
- desc = "A dice with four sides."
- sides = 4
- icon_state = "d20"
- item_state = "dice"
-
/obj/item/weapon/dice // -- TLE
name = "d6"
desc = "A dice with six sides."
var/sides = 6
- icon = 'dice.dmi'
+ icon = 'icons/obj/dice.dmi'
icon_state = "d66"
/obj/item/weapon/dice/New()
@@ -1868,32 +1623,19 @@ eternal248: Found broken and buggy Z-levels 7-12, ended up leading to my discove
sides = 20
icon_state = "d2020"
-/obj/item/weapon/dice/d8 // -- SkyMarshal
- name = "d8"
- desc = "A dice with eight sides."
- sides = 8
- icon_state = "d20"
- item_state = "dice"
-
-/obj/item/weapon/dice/d12 // -- SkyMarshal
- name = "d12"
- desc = "A dice with twelve sides."
- sides = 12
- icon_state = "d20"
- item_state = "dice"
-
/obj/item/weapon/pai_cable
desc = "A flexible coated cable with a universal jack on one end."
name = "data cable"
- icon = 'power.dmi'
+ icon = 'icons/obj/power.dmi'
icon_state = "wire1"
+
var/obj/machinery/machine
/obj/item/weapon/plastique
name = "plastic explosives"
- desc = "Used to put holes in specific areas without too much extra hole. Does not work on people."
+ desc = "Used to put holes in specific areas without too much extra hole."
gender = PLURAL
- icon = 'assemblies.dmi'
+ icon = 'icons/obj/assemblies.dmi'
icon_state = "plastic-explosive0"
item_state = "plasticx"
flags = FPRINT | TABLEPASS | USEDELAY
@@ -1908,7 +1650,7 @@ eternal248: Found broken and buggy Z-levels 7-12, ended up leading to my discove
name = "stock part"
desc = "What?"
gender = PLURAL
- icon = 'stock_parts.dmi'
+ icon = 'icons/obj/stock_parts.dmi'
w_class = 2.0
var/rating = 1
New()
@@ -2106,55 +1848,12 @@ eternal248: Found broken and buggy Z-levels 7-12, ended up leading to my discove
name = "ectoplasm"
desc = "spooky"
gender = PLURAL
- icon = 'wizard.dmi'
+ icon = 'icons/obj/wizard.dmi'
icon_state = "ectoplasm"
/obj/item/weapon/research//Makes testing much less of a pain -Sieve
name = "research"
- icon = 'stock_parts.dmi'
+ icon = 'icons/obj/stock_parts.dmi'
icon_state = "capacitor"
desc = "A debug item for research."
origin_tech = "materials=8;programming=8;magnets=8;powerstorage=8;bluespace=8;combat=8;biotech=8;syndicate=8"
-
-/obj/item/weapon/appendix
- name = "appendix"
- desc = "An appendix which looks perfectly healthy."
- icon = 'food.dmi'
- icon_state = "appendix"
-
-/obj/item/weapon/appendixinflamed
- name = "inflamed appendix"
- desc = "An appendix which appears to be inflamed."
- icon = 'food.dmi'
- icon_state = "appendixinflamed"
-
-/obj/item/weapon/megaphone
- name = "megaphone"
- desc = "A device used to project your voice. Loudly."
- icon = 'items.dmi'
- icon_state = "megaphone"
- var/cooldown = 0
-
-/obj/item/weapon/flavor
- name = "bland flavoring packet"
- desc = "A sachet of flavoring, designed to be used with \"LiquidFood\" rations. The flavor is indeterminable."
- icon = 'food_ingredients.dmi'
- var/descriptor = "disturbingly beige" //Description shown to onlookers.
- color = "beige" //Color the icon should take on when this is applied. Also shown when it is mixed in.
- var/newDesc = "It posesses a strange and unidentifiable taste. You try not to think to hard about it." //What gets pegged onto the description.
-
-/obj/item/weapon/flavor/red
- name = "cherry flavoring packet"
- desc = "A sachet of cherry flavoring, designed to be used with \"LiquidFood\" rations."
- icon_state = "flavor-red"
- descriptor = "garrishly red"
- color = "red"
- newDesc = "It has a faintly cherry taste, but still is hard to stomach. Reminds you of cough syrup."
-
-/obj/item/weapon/flavor/blue
- name = "berry flavoring packet"
- desc = "A sachet of berry flavoring, designed to be used with \"LiquidFood\" rations."
- icon_state = "flavor-blue"
- descriptor = "molted blue"
- color = "blue"
- newDesc = "It has a faint bitter berry taste, but still is hard to stomach. Strangely crunchy."
diff --git a/code/defines/obj/window.dm b/code/defines/obj/window.dm
index 5b4bdf2969..509380f4a2 100644
--- a/code/defines/obj/window.dm
+++ b/code/defines/obj/window.dm
@@ -1,6 +1,6 @@
/obj/structure/window
name = "window"
- icon = 'structures.dmi'
+ icon = 'icons/obj/structures.dmi'
desc = "A window."
density = 1
layer = 3.2//Just above doors
diff --git a/code/defines/procs/AStar.dm b/code/defines/procs/AStar.dm
index 059a11b95b..0af47ba12c 100644
--- a/code/defines/procs/AStar.dm
+++ b/code/defines/procs/AStar.dm
@@ -1,4 +1,4 @@
-//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:04
+//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31
/*
A Star pathfinding algorithm
@@ -121,7 +121,7 @@ proc
var/closed[] = new()
var/path[]
start = get_turf(start)
- if(!start || !end) return 0
+ if(!start) return 0
open.Enqueue(new /PathNode(start,null,0,call(start,dist)(end)))
diff --git a/code/defines/procs/command_alert.dm b/code/defines/procs/command_alert.dm
index d7a97fe254..23ee3c1119 100644
--- a/code/defines/procs/command_alert.dm
+++ b/code/defines/procs/command_alert.dm
@@ -1,5 +1,5 @@
-/proc/command_alert(var/text, var/title = "", var/maintitle = "NanoTrasen Update")
- world << "
[maintitle]
"
+/proc/command_alert(var/text, var/title = "")
+ world << "
[command_name()] Update
"
if (title && length(title) > 0)
world << "
[html_encode(title)]
"
diff --git a/code/defines/procs/command_name.dm b/code/defines/procs/command_name.dm
index 0225517894..255c3947db 100644
--- a/code/defines/procs/command_name.dm
+++ b/code/defines/procs/command_name.dm
@@ -3,8 +3,23 @@ var/command_name = null
if (command_name)
return command_name
- var/name = "NanoTrasen"
+ var/name = "Central Command"
+/*
+ if (prob(10))
+ name += pick("Super", "Ultra")
+ name += " "
+ // Prefix
+ if (name)
+ name += pick("", "Central", "System", "Home", "Primary", "Alpha", "Friend", "Science", "Renegade")
+ else
+ name += pick("Central", "System", "Home", "Primary", "Alpha", "Friend", "Science", "Renegade")
+ if (name)
+ name += " "
+
+ // Suffix
+ name += pick("Federation", "Command", "Alliance", "Unity", "Empire", "Confederation", "Kingdom", "Monarchy", "Complex", "Protectorate", "Commonwealth", "Imperium", "Republic")
+*/
command_name = name
return name
diff --git a/code/defines/procs/dbcore.dm b/code/defines/procs/dbcore.dm
index a517134d32..5da9d19fa5 100644
--- a/code/defines/procs/dbcore.dm
+++ b/code/defines/procs/dbcore.dm
@@ -1,42 +1,37 @@
-//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:04
+//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31
//cursors
-#define Default_Cursor 0
-#define Client_Cursor 1
-#define Server_Cursor 2
-
-
+#define Default_Cursor 0
+#define Client_Cursor 1
+#define Server_Cursor 2
//conversions
-#define TEXT_CONV 1
-#define RSC_FILE_CONV 2
-#define NUMBER_CONV 3
-
-
+#define TEXT_CONV 1
+#define RSC_FILE_CONV 2
+#define NUMBER_CONV 3
//column flag values:
-#define IS_NUMERIC 1
-#define IS_BINARY 2
-#define IS_NOT_NULL 4
-#define IS_PRIMARY_KEY 8
-#define IS_UNSIGNED 16
-
-
+#define IS_NUMERIC 1
+#define IS_BINARY 2
+#define IS_NOT_NULL 4
+#define IS_PRIMARY_KEY 8
+#define IS_UNSIGNED 16
//types
-#define TINYINT 1
-#define SMALLINT 2
-#define MEDIUMINT 3
-#define INTEGER 4
-#define BIGINT 5
-#define DECIMAL 6
-#define FLOAT 7
-#define DOUBLE 8
-#define DATE 9
-#define DATETIME 10
-#define TIMESTAMP 11
-#define TIME 12
-#define STRING 13
-#define BLOB 14
+#define TINYINT 1
+#define SMALLINT 2
+#define MEDIUMINT 3
+#define INTEGER 4
+#define BIGINT 5
+#define DECIMAL 6
+#define FLOAT 7
+#define DOUBLE 8
+#define DATE 9
+#define DATETIME 10
+#define TIMESTAMP 11
+#define TIME 12
+#define STRING 13
+#define BLOB 14
// TODO: Investigate more recent type additions and see if I can handle them. - Nadrew
+
// Deprecated! See global.dm for new configuration vars
/*
var/DB_SERVER = "" // This is the location of your MySQL server (localhost is USUALLY fine)
@@ -52,6 +47,8 @@ DBConnection
_db_con = _dm_db_new_con()
proc
Connect(dbi_handler=src.dbi,user_handler=src.user,password_handler=src.password,cursor_handler)
+ if(!sqllogging)
+ return 0
if(!src) return 0
cursor_handler = src.default_cursor
if(!cursor_handler) cursor_handler = Default_Cursor
@@ -59,7 +56,10 @@ DBConnection
Disconnect() return _dm_db_close(_db_con)
- IsConnected() return _dm_db_is_connected(_db_con)
+ IsConnected()
+ if(!sqllogging) return 0
+ var/success = _dm_db_is_connected(_db_con)
+ return success
Quote(str) return _dm_db_quote(_db_con,str)
@@ -178,3 +178,30 @@ DBColumn
if(TIME) return "TIME"
if(STRING) return "STRING"
if(BLOB) return "BLOB"
+
+
+#undef Default_Cursor
+#undef Client_Cursor
+#undef Server_Cursor
+#undef TEXT_CONV
+#undef RSC_FILE_CONV
+#undef NUMBER_CONV
+#undef IS_NUMERIC
+#undef IS_BINARY
+#undef IS_NOT_NULL
+#undef IS_PRIMARY_KEY
+#undef IS_UNSIGNED
+#undef TINYINT
+#undef SMALLINT
+#undef MEDIUMINT
+#undef INTEGER
+#undef BIGINT
+#undef DECIMAL
+#undef FLOAT
+#undef DOUBLE
+#undef DATE
+#undef DATETIME
+#undef TIMESTAMP
+#undef TIME
+#undef STRING
+#undef BLOB
diff --git a/code/defines/procs/forum_activation.dm b/code/defines/procs/forum_activation.dm
index 88e9705e5e..cd7008cf12 100644
--- a/code/defines/procs/forum_activation.dm
+++ b/code/defines/procs/forum_activation.dm
@@ -77,7 +77,7 @@
dbcon.Disconnect()
return
- query = dbcon.NewQuery("UPDATE [forumsqldb].phpbb_user_group SET group_id = '[forum_authenticated_group]' WHERE user_id = '[uid]' AND group_id = '[forum_activated_group]'") // Replace 'Registered Users' group with 'Activated Users'
+ query = dbcon.NewQuery("UPDATE [forumsqldb].phpbb_user_group SET group_id = '[forum_authenticated_group]' WHERE user_id = '[uid]' AND group_id = '[forum_activated_group]'") // Replace 'registered_name Users' group with 'Activated Users'
if(!query.Execute())
src << "Unable to move account into authenticated group. This error shouldn't occur, contact an administrator for help. Authentication failed."
dbcon.Disconnect()
diff --git a/code/defines/procs/gamehelpers.dm b/code/defines/procs/gamehelpers.dm
index 5db2e698d8..1490e73a25 100644
--- a/code/defines/procs/gamehelpers.dm
+++ b/code/defines/procs/gamehelpers.dm
@@ -1,4 +1,4 @@
-//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:04
+//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31
/proc/dopage(src,target)
var/href_list
@@ -27,30 +27,46 @@
return A
return 0
-/proc/get_random_turf(var/atom/A, var/list/L)
- while(L.len > 0)
- var/dir = pick(L)
- L -= dir
- var/turf/T = get_step(A,dir)
- var/possible = 1
-
- if(T.density == 0)
- for(var/obj/I in T)
- if(I.density == 1)
- possible = 0
- break
-
- if(possible)
- return T
-
- return
-
/proc/in_range(source, user)
if(get_dist(source, user) <= 1)
return 1
return 0 //not in range and not telekinetic
+// Like view but bypasses luminosity check
+
+/proc/hear(var/range, var/atom/source)
+
+ var/lum = source.luminosity
+ source.luminosity = 6
+
+ var/list/heard = view(range, source)
+ source.luminosity = lum
+
+ return heard
+
+
+
+
+//Magic constants obtained by using linear regression on right-angled triangles of sides 0=b)
+ return (k1*a) + (k2*b) //No sqrt or powers :)
+ else
+ return (k1*b) + (k2*a)
+#undef k1
+#undef k2
+
/proc/circlerange(center=usr,radius=3)
var/turf/centerturf = get_turf(center)
@@ -69,17 +85,17 @@
/proc/circleview(center=usr,radius=3)
var/turf/centerturf = get_turf(center)
- var/list/turfs = new/list()
+ var/list/atoms = new/list()
var/rsq = radius * (radius+0.5)
- for(var/atom/T in view(radius, centerturf))
- var/dx = T.x - centerturf.x
- var/dy = T.y - centerturf.y
+ for(var/atom/A in view(radius, centerturf))
+ var/dx = A.x - centerturf.x
+ var/dy = A.y - centerturf.y
if(dx*dx + dy*dy <= rsq)
- turfs += T
+ atoms += A
//turfs += centerturf
- return turfs
+ return atoms
/proc/get_dist_euclidian(atom/Loc1 as turf|mob|obj,atom/Loc2 as turf|mob|obj)
var/dx = Loc1.x - Loc2.x
@@ -102,7 +118,7 @@
turfs += T
return turfs
-/proc/circleviewturfs(center=usr,radius=3)
+/proc/circleviewturfs(center=usr,radius=3) //Is there even a diffrence between this proc and circlerangeturfs()?
var/turf/centerturf = get_turf(center)
var/list/turfs = new/list()
@@ -115,16 +131,7 @@
turfs += T
return turfs
-// Like view but bypasses luminosity check
-/proc/hear(var/range, var/atom/source)
- var/lum = source.luminosity
- source.luminosity = 6
-
- var/list/heard = view(range, source)
- source.luminosity = lum
-
- return heard
//var/debug_mob = 0
@@ -132,26 +139,30 @@
// It will keep doing this until it checks every content possible. This will fix any problems with mobs, that are inside objects,
// being unable to hear people due to being in a box within a bag.
-/proc/recursive_mob_check(var/atom/O, var/list/L = list(), var/client_check = 1, var/sight_check = 1, var/include_radio = 1, var/max_depth = 3)
+/proc/recursive_mob_check(var/atom/O, var/list/L = list(), var/recursion_limit = 3, var/client_check = 1, var/sight_check = 1, var/include_radio = 1)
//debug_mob += O.contents.len
- if(max_depth < 1)
+ if(!recursion_limit)
return L
+ for(var/atom/A in O.contents)
- for(var/atom/A in O)
if(ismob(A))
var/mob/M = A
if(client_check && !M.client)
- L = recursive_mob_check(A, L, 1, 1, max_depth - 1)
+ L = recursive_mob_check(A, L, recursion_limit - 1, client_check, sight_check, include_radio)
continue
if(sight_check && !isInSight(A, O))
continue
- L += M
+ L |= M
+ //world.log << "[recursion_limit] = [M] - [get_turf(M)] - ([M.x], [M.y], [M.z])"
else if(include_radio && istype(A, /obj/item/device/radio))
- if(sight_check && isInSight(A, O))
- L += A
- L = recursive_mob_check(A, L, 1, 1, max_depth - 1)
+ if(sight_check && !isInSight(A, O))
+ continue
+ L |= A
+
+ if(isobj(A) || ismob(A))
+ L = recursive_mob_check(A, L, recursion_limit - 1, client_check, sight_check, include_radio)
return L
// The old system would loop through lists for a total of 5000 per function call, in an empty server.
@@ -164,14 +175,41 @@
var/list/hear = list()
var/list/range = hear(R, T)
- //debug_mob += range.len
- for(var/turf/A in range)
- hear += recursive_mob_check(A)
- //world.log << "NEW: [debug_mob]"
- //debug_mob = 0
+ for(var/atom/A in range)
+ if(ismob(A))
+ var/mob/M = A
+ if(M.client)
+ hear += M
+ //world.log << "Start = [M] - [get_turf(M)] - ([M.x], [M.y], [M.z])"
+ else if(istype(A, /obj/item/device/radio))
+ hear += A
+
+ if(isobj(A) || ismob(A))
+ hear = recursive_mob_check(A, hear, 3, 1, 0, 1)
return hear
+
+/proc/get_mobs_in_radio_ranges(var/list/obj/item/device/radio/radios, var/level = 0)
+ . = list()
+
+ // Returns a list of mobs who can hear any of the radios given in @radios
+ var/list/speaker_coverage = list()
+ for(var/obj/item/device/radio/R in radios)
+ var/turf/speaker = get_turf(R)
+ if(speaker)
+ for(var/turf/T in hear(R.canhear_range,speaker))
+ speaker_coverage += T
+
+ // Try to find all the players who can hear the message
+ for(var/mob/M in player_list)
+ var/turf/ear = get_turf(M)
+ if(ear && (isnull(level) || level == ear.z))
+ if(ear in speaker_coverage)
+ . += M
+
+ return .
+
#define SIGN(X) ((X<0)?-1:1)
proc
@@ -204,6 +242,7 @@ proc
if(T.opacity)
return 0
return 1
+#undef SIGN
proc/isInSight(var/atom/A, var/atom/B)
var/turf/Aturf = get_turf(A)
@@ -216,153 +255,4 @@ proc/isInSight(var/atom/A, var/atom/B)
return 1
else
- return 0
-
-
-proc/doafterattack(obj/target , obj/source)
-
- if (istype(target, /obj/item/weapon/storage/ ))
- return 0
-
- else if (locate (/obj/structure/table, source.loc))
- return 0
-
- else if (!istype(target.loc, /turf/))
- return 0
-
- else
- return 1
-
-proc/check_can_reach(atom/user, atom/target)
- if(!in_range(user,target))
- return 0
- return CanReachThrough(get_turf(user), get_turf(target), target)
-
-//cael - not sure if there's an equivalent proc, but if there is i couldn't find it
-//searches to see if M contains O somewhere
-proc/is_carrying(var/M as mob, var/O as obj)
- while(!istype(O,/area))
- if(O:loc == M)
- return 1
- O = O:loc
- return 0
-
- //hackcopy from a ZAS function, first created for use with intertial_damper/new shielding
-proc/CircleFloodFill(turf/start, var/radius = 3)
- if(!istype(start))
- return list()
- var
- list
- open = list(start)
- closed = list()
- possibles = circlerange(start,radius)
-
- while(open.len)
- for(var/turf/T in open)
- //Stop if there's a door, even if it's open. These are handled by indirect connection.
- if(!T.HasDoor())
-
- for(var/d in cardinal)
- var/turf/O = get_step(T,d)
- //Simple pass check.
- if(O.ZCanPass(T, 1) && !(O in open) && !(O in closed) && O in possibles)
- open += O
-
- open -= T
- closed += T
-
- return closed
-
-//floods in a square area, flowing around any shielding but including all other turf types
-//created initially for explosion / shield interaction
-proc/ExplosionFloodFill(turf/start, var/radius = 3)
- if(!istype(start))
- return list()
- var
- list
- open = list(start)
- closed = list()
- possibles = range(start,radius)
-
- while(open.len)
- for(var/turf/T in open)
- for(var/turf/O in range(T,1))
- if( !(O in possibles) || O in open || O in closed )
- continue
- var/shield_here = 0
- for(var/obj/effect/energy_field/E in O)
- if(E.density)
- shield_here = 1
- break
- if(!shield_here)
- open += O
-
- open -= T
- closed += T
-
- return closed
-
-/*
-
-/obj/machinery/shield_gen/external/get_shielded_turfs()
- var
- list
- open = list(get_turf(src))
- closed = list()
-
- while(open.len)
- for(var/turf/T in open)
- for(var/turf/O in orange(1, T))
- if(get_dist(O,src) > field_radius)
- continue
- var/add_this_turf = 0
- if(istype(O,/turf/space))
- for(var/turf/simulated/G in orange(1, O))
- add_this_turf = 1
- break
- for(var/obj/structure/S in orange(1, O))
- add_this_turf = 1
- break
- for(var/obj/structure/S in O)
- add_this_turf = 0
- break
-
- if(add_this_turf && !(O in open) && !(O in closed))
- open += O
- open -= T
- closed += T
-
- return closed
-*/
-
-//floods in a circular area, flowing around any shielding but including all other turf types
-//created initially for explosion / shield interaction
-proc/ExplosionCircleFloodFill(turf/start, var/radius = 3)
- if(!istype(start))
- return list()
- var
- list
- open = list(start)
- closed = list()
- possibles = circlerange(start,radius)
-
- while(open.len)
- for(var/turf/T in open)
- for(var/turf/O in range(T,1))
- if(get_dist(O,start) > radius)
- continue
-
- if( !(O in possibles) || O in open || O in closed )
- continue
- var/shield_here = 0
- for(var/obj/effect/energy_field/E in O)
- if(E.density)
- shield_here = 1
- break
- if(!shield_here && (O in possibles) && !(O in open) && !(O in closed))
- open += O
-
- open -= T
- closed += T
-
- return closed
\ No newline at end of file
+ return 0
\ No newline at end of file
diff --git a/code/defines/procs/global_lists.dm b/code/defines/procs/global_lists.dm
new file mode 100644
index 0000000000..7d03659385
--- /dev/null
+++ b/code/defines/procs/global_lists.dm
@@ -0,0 +1,145 @@
+//Since it didn't really belong in any other category, I'm putting this here
+//This is for procs to replace all the goddamn 'in world's that are chilling around the code
+
+var/global/list/player_list = list() //List of all logged in players (Based on mob reference)
+var/global/list/admin_list = list() //List of all logged in admins (Based on mob reference)
+var/global/list/mob_list = list() //List of all mobs, including clientless
+var/global/list/living_mob_list = list() //List of all living mobs, including clientless
+var/global/list/dead_mob_list = list() //List of all dead mobs, including clientless
+var/global/list/client_list = list() //List of all clients, based on ckey
+var/global/list/cable_list = list() //Index for all cables, so that powernets don't have to look through the entire world all the time
+var/global/list/hair_styles_list = list() //stores /datum/sprite_accessory/hair indexed by name
+var/global/list/facial_hair_styles_list = list() //stores /datum/sprite_accessory/facial_hair indexed by name
+var/global/list/chemical_reactions_list //list of all /datum/chemical_reaction datums. Used during chemical reactions
+var/global/list/chemical_reagents_list //list of all /datum/reagent datums indexed by reagent id. Used by chemistry stuff
+
+//////////////////////////
+/////Initial Building/////
+//////////////////////////
+//Realistically, these should never be run, but ideally, they should only be run once at round-start
+
+/proc/make_datum_references_lists()
+ var/list/paths
+ //Hair - Initialise all /datum/sprite_accessory/hair into an list indexed by hair-style name
+ paths = typesof(/datum/sprite_accessory/hair) - /datum/sprite_accessory/hair
+ for(var/path in paths)
+ var/datum/sprite_accessory/hair/H = new path()
+ hair_styles_list[H.name] = H
+ //Facial Hair - Initialise all /datum/sprite_accessory/facial_hair into an list indexed by facialhair-style name
+ paths = typesof(/datum/sprite_accessory/facial_hair) - /datum/sprite_accessory/facial_hair
+ for(var/path in paths)
+ var/datum/sprite_accessory/facial_hair/H = new path()
+ facial_hair_styles_list[H.name] = H
+
+proc/make_player_list()//Global proc that rebuilds the player list
+ for(var/mob/p in player_list)//Clears out everyone that logged out
+ if(!(p.client))
+ player_list -= p
+ for(var/mob/M in world)//Adds everyone that has logged in
+ if(M.client)
+ player_list += M
+
+proc/make_admin_list()//Rebuild that shit to try and avoid issues with stealthmins
+ admin_list = list()
+ for(var/client/C in client_list)
+ if(C && C.holder)
+ admin_list += C
+
+proc/make_mob_list()
+ for(var/mob/p in mob_list)
+ if(!p)//If it's a null reference, remove it
+ mob_list -= p
+ for(var/mob/M in world)
+ mob_list += M
+
+proc/make_extra_mob_list()
+ for(var/mob/p in living_mob_list)
+ if(!p)
+ living_mob_list -= p
+ if(p.stat == DEAD)//Transfer
+ living_mob_list -= p
+ dead_mob_list += p
+ for(var/mob/p in dead_mob_list)
+ if(!p)
+ dead_mob_list -= p
+ if(p.stat != DEAD)
+ dead_mob_list -= p
+ living_mob_list += p
+ for(var/mob/M in world)
+ if(M.stat == DEAD)
+ living_mob_list += M
+ else
+ dead_mob_list += M
+
+
+//Alright, this proc should NEVER be called in the code, ever. This is more of an 'oh god everything is broken'-emergency button.
+proc/rebuild_mob_lists()
+ player_list = list()
+ admin_list = list()
+ mob_list = list()
+ living_mob_list = list()
+ dead_mob_list = list()
+ client_list = list()
+ for(var/mob/M in world)
+ mob_list += M
+ if(M.client)
+ player_list += M
+ if(M.stat != DEAD)
+ living_mob_list += M
+ else
+ dead_mob_list += M
+ for(var/client/C)
+ client_list += C.ckey
+ if(C.holder)
+ admin_list += C
+
+proc/add_to_mob_list(var/mob/A)//Adds an individual mob
+ if(A)
+ mob_list |= A
+ if(istype(A,/mob/new_player))//New players are only on the mob list, but not the dead/living
+ return
+ else
+ if(A.stat == 2)
+ dead_mob_list |= A
+ if(A.stat != 2)
+ living_mob_list |= A
+// if(A.client)
+// player_list |= A
+
+proc/remove_from_mob_list(var/mob/R)//Removes an individual mob
+ mob_list -= R
+ if(R.stat == 2)
+ dead_mob_list -= R
+ if(R.stat != 2)
+ living_mob_list -= R
+// if(R.client)
+// player_list -= R
+
+proc/make_client_list()//Rebuilds client list
+ for(var/mob/c in client_list)
+ if(!c.client)
+ client_list -= c.ckey
+ for(var/mob/M in world)
+ if(M.client)
+ client_list += M.ckey
+
+
+
+/*/obj/item/listdebug//Quick debugger for the global lists
+ icon = 'icons/obj/assemblies.dmi'
+ icon_state = "radio-igniter-tank"
+
+/obj/item/listdebug/attack_self()
+ switch(input("Which list?") in list("Players","Admins","Mobs","Living Mobs","Dead Mobs", "Clients"))
+ if("Players")
+ usr << dd_list2text(player_list,",")
+ if("Admins")
+ usr << dd_list2text(admin_list,",")
+ if("Mobs")
+ usr << dd_list2text(mob_list,",")
+ if("Living Mobs")
+ usr << dd_list2text(living_mob_list,",")
+ if("Dead Mobs")
+ usr << dd_list2text(dead_mob_list,",")
+ if("Clients")
+ usr << dd_list2text(client_list,",")*/
\ No newline at end of file
diff --git a/code/defines/procs/helper_list.dm b/code/defines/procs/helper_list.dm
new file mode 100644
index 0000000000..19f9609db1
--- /dev/null
+++ b/code/defines/procs/helper_list.dm
@@ -0,0 +1,259 @@
+/*
+ * Holds procs to help with list operations
+ * Contains groups:
+ * Misc
+ * Sorting
+ */
+
+/*
+ * Misc
+ */
+
+//Returns a list in plain english as a string
+/proc/english_list(var/list/input, nothing_text = "nothing", and_text = " and ", comma_text = ", ", final_comma_text = "," )
+ var/total = input.len
+ if (!total)
+ return "[nothing_text]"
+ else if (total == 1)
+ return "[input[1]]"
+ else if (total == 2)
+ return "[input[1]][and_text][input[2]]"
+ else
+ var/output = ""
+ var/index = 1
+ while (index < total)
+ if (index == total - 1)
+ comma_text = final_comma_text
+
+ output += "[input[index]][comma_text]"
+ index++
+
+ return "[output][and_text][input[index]]"
+
+//Returns list element or null. Should prevent "index out of bounds" error.
+proc/listgetindex(var/list/list,index)
+ if(istype(list) && list.len)
+ if(isnum(index))
+ if(InRange(index,1,list.len))
+ return list[index]
+ else if(index in list)
+ return list[index]
+ return
+
+proc/islist(list/list)
+ if(istype(list))
+ return 1
+ return 0
+
+//Return either pick(list) or null if list is not of type /list or is empty
+proc/safepick(list/list)
+ if(!islist(list) || !list.len)
+ return
+ return pick(list)
+
+//Checks if the list is empty
+proc/isemptylist(list/list)
+ if(!list.len)
+ return 1
+ return 0
+
+//Empties the list by setting the length to 0. Hopefully the elements get garbage collected
+proc/clearlist(list/list)
+ if(istype(list))
+ list.len = 0
+ return
+
+//Removes any null entries from the list
+proc/listclearnulls(list/list)
+ if(istype(list))
+ while(null in list)
+ list -= null
+ return
+
+/*
+ * Returns list containing all the entries from first list that are not present in second.
+ * If skiprep = 1, repeated elements are treated as one.
+ * If either of arguments is not a list, returns null
+ */
+/proc/difflist(var/list/first, var/list/second, var/skiprep=0)
+ if(!islist(first) || !islist(second))
+ return
+ var/list/result = new
+ if(skiprep)
+ for(var/e in first)
+ if(!(e in result) && !(e in second))
+ result += e
+ else
+ result = first - second
+ return result
+
+/*
+ * Returns list containing entries that are in either list but not both.
+ * If skipref = 1, repeated elements are treated as one.
+ * If either of arguments is not a list, returns null
+ */
+/proc/uniquemergelist(var/list/first, var/list/second, var/skiprep=0)
+ if(!islist(first) || !islist(second))
+ return
+ var/list/result = new
+ if(skiprep)
+ result = difflist(first, second, skiprep)+difflist(second, first, skiprep)
+ else
+ result = first ^ second
+ return result
+
+//Pretends to pick an element based on its weight but really just seems to pick a random element.
+/proc/pickweight(list/L)
+ var/total = 0
+ var/item
+ for (item in L)
+ if (!L[item])
+ L[item] = 1
+ total += L[item]
+
+ total = rand(1, total)
+ for (item in L)
+ total -=L [item]
+ if (total <= 0)
+ return item
+
+ return null
+
+//Pick a random element from the list and remove it from the list.
+/proc/pick_n_take(list/listfrom)
+ if (listfrom.len > 0)
+ var/picked = pick(listfrom)
+ listfrom -= picked
+ return picked
+ return null
+
+//Returns the top(last) element from the list and removes it from the list (typical stack function)
+/proc/pop(list/listfrom)
+ if (listfrom.len > 0)
+ var/picked = listfrom[listfrom.len]
+ listfrom.len--
+ return picked
+ return null
+
+/*
+ * Sorting
+ */
+
+//Reverses the order of items in the list (Turning a stack into a queue)
+/proc/reverselist(var/list/input)
+ var/list/output = new/list()
+ for(var/A in input)
+ output += A
+ return output
+
+//Randomize: Return the list in a random order
+/proc/shuffle(var/list/shufflelist)
+ if(!shufflelist)
+ return
+ var/list/new_list = list()
+ var/list/old_list = shufflelist.Copy()
+ while(old_list.len)
+ var/item = pick(old_list)
+ new_list += item
+ old_list -= item
+ return new_list
+
+//Return a list with no duplicate entries
+/proc/uniquelist(var/list/L)
+ var/list/K = list()
+ for(var/item in L)
+ if(!(item in K))
+ K += item
+ return K
+
+
+//Mergesort: divides up the list into halves to begin the sort
+/proc/sortAtom(var/list/atom/L, var/order = 1)
+ if(isnull(L) || L.len < 2)
+ return L
+ var/middle = L.len / 2 + 1
+ return mergeAtoms(sortAtom(L.Copy(0,middle)), sortAtom(L.Copy(middle)), order)
+
+//Mergsort: does the actual sorting and returns the results back to sortAtom
+/proc/mergeAtoms(var/list/atom/L, var/list/atom/R, var/order = 1)
+ var/Li=1
+ var/Ri=1
+ var/list/result = new()
+ while(Li <= L.len && Ri <= R.len)
+ var/atom/rL = L[Li]
+ var/atom/rR = R[Ri]
+ if(sorttext(rL.name, rR.name) == order)
+ result += L[Li++]
+ else
+ result += R[Ri++]
+
+ if(Li <= L.len)
+ return (result + L.Copy(Li, 0))
+ return (result + R.Copy(Ri, 0))
+
+
+
+
+//Mergesort: Specifically for record datums in a list.
+/proc/sortRecord(var/list/datum/data/record/L, var/field = "name", var/order = 1)
+ if(isnull(L))
+ return list()
+ if(L.len < 2)
+ return L
+ var/middle = L.len / 2 + 1
+ return mergeRecordLists(sortRecord(L.Copy(0, middle), field, order), sortRecord(L.Copy(middle), field, order), field, order)
+
+//Mergsort: does the actual sorting and returns the results back to sortRecord
+/proc/mergeRecordLists(var/list/datum/data/record/L, var/list/datum/data/record/R, var/field = "name", var/order = 1)
+ var/Li=1
+ var/Ri=1
+ var/list/result = new()
+ if(!isnull(L) && !isnull(R))
+ while(Li <= L.len && Ri <= R.len)
+ var/datum/data/record/rL = L[Li]
+ if(isnull(rL))
+ L -= rL
+ continue
+ var/datum/data/record/rR = R[Ri]
+ if(isnull(rR))
+ R -= rR
+ continue
+ if(sorttext(rL.fields[field], rR.fields[field]) == order)
+ result += L[Li++]
+ else
+ result += R[Ri++]
+
+ if(Li <= L.len)
+ return (result + L.Copy(Li, 0))
+ return (result + R.Copy(Ri, 0))
+
+
+
+
+//Mergesort: any value in a list
+/proc/sortList(var/list/L)
+ if(L.len < 2)
+ return L
+ var/middle = L.len / 2 + 1 // Copy is first,second-1
+ return mergeLists(sortList(L.Copy(0,middle)), sortList(L.Copy(middle))) //second parameter null = to end of list
+
+//Mergsorge: uses sortList() but uses the var's name specifically. This should probably be using mergeAtom() instead
+/proc/sortNames(var/list/L)
+ var/list/Q = new()
+ for(var/atom/x in L)
+ Q[x.name] = x
+ return sortList(Q)
+
+/proc/mergeLists(var/list/L, var/list/R)
+ var/Li=1
+ var/Ri=1
+ var/list/result = new()
+ while(Li <= L.len && Ri <= R.len)
+ if(sorttext(L[Li], R[Ri]) < 1)
+ result += R[Ri++]
+ else
+ result += L[Li++]
+
+ if(Li <= L.len)
+ return (result + L.Copy(Li, 0))
+ return (result + R.Copy(Ri, 0))
\ No newline at end of file
diff --git a/code/defines/procs/helper_text.dm b/code/defines/procs/helper_text.dm
new file mode 100644
index 0000000000..5f5f086943
--- /dev/null
+++ b/code/defines/procs/helper_text.dm
@@ -0,0 +1,293 @@
+/*
+ * Holds procs designed to help with filtering text
+ * Contains groups:
+ * Text sanitization
+ * Text searches
+ * Text modification
+ * Misc
+ */
+
+/*
+ * Text sanitization
+ */
+
+//Simply removes < and > and limits the length of the message
+/proc/strip_html_simple(var/t,var/limit=MAX_MESSAGE_LEN)
+ var/list/strip_chars = list("<",">")
+ t = copytext(t,1,limit)
+ for(var/char in strip_chars)
+ var/index = findtext(t, char)
+ while(index)
+ t = copytext(t, 1, index) + copytext(t, index+1)
+ index = findtext(t, char)
+ return t
+
+//Removes a few problematic characters
+/proc/sanitize_simple(var/t,var/list/repl_chars = list("\n"="#","\t"="#","�"="�"))
+ for(var/char in repl_chars)
+ var/index = findtext(t, char)
+ while(index)
+ t = copytext(t, 1, index) + repl_chars[char] + copytext(t, index+1)
+ index = findtext(t, char)
+ return t
+
+//Runs byond's sanitization proc along-side sanitize_simple
+/proc/sanitize(var/t,var/list/repl_chars = null)
+ return html_encode(sanitize_simple(t,repl_chars))
+
+//Runs sanitize and strip_html_simple
+//I believe strip_html_simple() is required to run first to prevent '<' from displaying as '<' after sanitize() calls byond's html_encode()
+/proc/strip_html(var/t,var/limit=MAX_MESSAGE_LEN)
+ return copytext((sanitize(strip_html_simple(t))),1,limit)
+
+//Runs byond's sanitization proc along-side strip_html_simple
+//I believe strip_html_simple() is required to run first to prevent '<' from displaying as '<' that html_encode() would cause
+/proc/adminscrub(var/t,var/limit=MAX_MESSAGE_LEN)
+ return copytext((html_encode(strip_html_simple(t))),1,limit)
+
+
+//Returns null if there is any bad text in the string
+/proc/reject_bad_text(var/text, var/max_length=512)
+ if(length(text) > max_length) return //message too long
+ var/non_whitespace = 0
+ for(var/i=1, i<=length(text), i++)
+ switch(text2ascii(text,i))
+ if(62,60,92,47) return //rejects the text if it contains these bad characters: <, >, \ or /
+ if(127 to 255) return //rejects weird letters like �
+ if(0 to 31) return //more weird stuff
+ if(32) continue //whitespace
+ else non_whitespace = 1
+ if(non_whitespace) return text //only accepts the text if it has some non-spaces
+
+//Filters out undesirable characters from names
+/proc/reject_bad_name(var/t_in, var/allow_numbers=0, var/max_length=MAX_NAME_LEN)
+ if(!t_in || length(t_in) > max_length)
+ return //Rejects the input if it is null or if it is longer then the max length allowed
+
+ var/number_of_alphanumeric = 0
+ var/last_char_group = 0
+ var/t_out = ""
+
+ for(var/i=1, i<=length(t_in), i++)
+ var/ascii_char = text2ascii(t_in,i)
+ switch(ascii_char)
+ // A .. Z
+ if(65 to 90) //Uppercase Letters
+ t_out += ascii2text(ascii_char)
+ number_of_alphanumeric++
+ last_char_group = 4
+
+ // a .. z
+ if(97 to 122) //Lowercase Letters
+ if(last_char_group<2) t_out += ascii2text(ascii_char-32) //Force uppercase first character
+ else t_out += ascii2text(ascii_char)
+ number_of_alphanumeric++
+ last_char_group = 4
+
+ // 0 .. 9
+ if(48 to 57) //Numbers
+ if(!last_char_group) continue //suppress at start of string
+ if(!allow_numbers) continue
+ t_out += ascii2text(ascii_char)
+ number_of_alphanumeric++
+ last_char_group = 3
+
+ // ' - .
+ if(39,45,46) //Common name punctuation
+ t_out += ascii2text(ascii_char)
+ last_char_group = 2
+
+ // ~ | @ : # $ % & * +
+ if(126,124,64,58,35,36,37,38,42,43) //Other symbols that we'll allow (mainly for AI)
+ if(!last_char_group) continue //suppress at start of string
+ if(!allow_numbers) continue
+ t_out += ascii2text(ascii_char)
+ last_char_group = 2
+
+ //Space
+ if(32)
+ if(last_char_group <= 1) continue //suppress double-spaces and spaces at start of string
+ t_out += ascii2text(ascii_char)
+ last_char_group = 1
+ else
+ return
+
+ if(number_of_alphanumeric < 2) return //protects against tiny names like "A" and also names like "' ' ' ' ' ' ' '"
+
+ if(last_char_group == 1)
+ t_out = copytext(t_out,1,length(t_out)) //removes the last character (in this case a space)
+
+ for(var/bad_name in list("space","floor","wall","r-wall","monkey","unknown","inactive ai")) //prevents these common metagamey names
+ if(cmptext(t_out,bad_name)) return //(not case sensitive)
+
+ return t_out
+
+
+/*
+ * Text searches
+ */
+
+//Checks the beginning of a string for a specified sub-string
+//Returns the position of the substring or 0 if it was not found
+/proc/dd_hasprefix(text, prefix)
+ var/start = 1
+ var/end = length(prefix) + 1
+ return findtext(text, prefix, start, end)
+
+//Checks the beginning of a string for a specified sub-string. This proc is case sensitive
+//Returns the position of the substring or 0 if it was not found
+/proc/dd_hasprefix_case(text, prefix)
+ var/start = 1
+ var/end = length(prefix) + 1
+ return findtextEx(text, prefix, start, end)
+
+//Checks the end of a string for a specified substring.
+//Returns the position of the substring or 0 if it was not found
+/proc/dd_hassuffix(text, suffix)
+ var/start = length(text) - length(suffix)
+ if(start)
+ return findtext(text, suffix, start, null)
+ return
+
+//Checks the end of a string for a specified substring. This proc is case sensitive
+//Returns the position of the substring or 0 if it was not found
+/proc/dd_hassuffix_case(text, suffix)
+ var/start = length(text) - length(suffix)
+ if(start)
+ return findtextEx(text, suffix, start, null)
+
+/*
+ * Text modification
+ */
+
+//Search and replace a sub-string within a string
+/proc/dd_replacetext(text, search_string, replacement_string)
+ if(!text || !istext(text) || !search_string || !istext(search_string) || !istext(replacement_string))
+ return null
+ var/textList = dd_text2list(text, search_string)
+ return dd_list2text(textList, replacement_string)
+
+//Search and replace a case sensitive sub-string within a string
+/proc/dd_replacetext_case(text, search_string, replacement_string)
+ var/textList = dd_text2list(text, search_string)
+ return dd_list2text(textList, replacement_string)
+
+//Adds 'u' number of zeros ahead of the text 't'
+/proc/add_zero(t, u)
+ while (length(t) < u)
+ t = "0[t]"
+ return t
+
+//Adds 'u' number of spaces ahead of the text 't'
+/proc/add_lspace(t, u)
+ while(length(t) < u)
+ t = " [t]"
+ return t
+
+//Adds 'u' number of spaces behind the text 't'
+/proc/add_tspace(t, u)
+ while(length(t) < u)
+ t = "[t] "
+ return t
+
+//Returns a string with reserved characters and spaces before the first letter removed
+/proc/trim_left(text)
+ for (var/i = 1 to length(text))
+ if (text2ascii(text, i) > 32)
+ return copytext(text, i)
+ return ""
+
+//Returns a string with reserved characters and spaces after the last letter removed
+/proc/trim_right(text)
+ for (var/i = length(text), i > 0, i--)
+ if (text2ascii(text, i) > 32)
+ return copytext(text, 1, i + 1)
+
+ return ""
+
+//Returns a string with reserved characters and spaces before the first word and after the last word removed.
+/proc/trim(text)
+ return trim_left(trim_right(text))
+
+//Returns a string with the first element of the string capitalized.
+/proc/capitalize(var/t as text)
+ return uppertext(copytext(t, 1, 2)) + copytext(t, 2)
+
+//Centers text by adding spaces to either side of the string.
+/proc/dd_centertext(message, length)
+ var/new_message = message
+ var/size = length(message)
+ var/delta = length - size
+ if(size == length)
+ return new_message
+ if(size > length)
+ return copytext(new_message, 1, length + 1)
+ if(delta == 1)
+ return new_message + " "
+ if(delta % 2)
+ new_message = " " + new_message
+ delta--
+ var/spaces = add_lspace("",delta/2-1)
+ return spaces + new_message + spaces
+
+//Limits the length of the text. Note: MAX_MESSAGE_LEN and MAX_NAME_LEN are widely used for this purpose
+/proc/dd_limittext(message, length)
+ var/size = length(message)
+ if(size <= length)
+ return message
+ return copytext(message, 1, length + 1)
+
+/*
+ * Misc
+ */
+
+/proc/stringsplit(txt, character)
+ var/cur_text = txt
+ var/last_found = 1
+ var/found_char = findtext(cur_text,character)
+ var/list/list = list()
+ if(found_char)
+ var/fs = copytext(cur_text,last_found,found_char)
+ list += fs
+ last_found = found_char+length(character)
+ found_char = findtext(cur_text,character,last_found)
+ while(found_char)
+ var/found_string = copytext(cur_text,last_found,found_char)
+ last_found = found_char+length(character)
+ list += found_string
+ found_char = findtext(cur_text,character,last_found)
+ list += copytext(cur_text,last_found,length(cur_text)+1)
+ return list
+
+/proc/stringmerge(var/text,var/compare,replace = "*")
+//This proc fills in all spaces with the "replace" var (* by default) with whatever
+//is in the other string at the same spot (assuming it is not a replace char).
+//This is used for fingerprints
+ var/newtext = text
+ if(lentext(text) != lentext(compare))
+ return 0
+ for(var/i = 1, i < lentext(text), i++)
+ var/a = copytext(text,i,i+1)
+ var/b = copytext(compare,i,i+1)
+//if it isn't both the same letter, or if they are both the replacement character
+//(no way to know what it was supposed to be)
+ if(a != b)
+ if(a == replace) //if A is the replacement char
+ newtext = copytext(newtext,1,i) + b + copytext(newtext, i+1)
+ else if(b == replace) //if B is the replacement char
+ newtext = copytext(newtext,1,i) + a + copytext(newtext, i+1)
+ else //The lists disagree, Uh-oh!
+ return 0
+ return newtext
+
+/proc/stringpercent(var/text,character = "*")
+//This proc returns the number of chars of the string that is the character
+//This is used for detective work to determine fingerprint completion.
+ if(!text || !character)
+ return 0
+ var/count = 0
+ for(var/i = 1, i <= lentext(text), i++)
+ var/a = copytext(text,i,i+1)
+ if(a == character)
+ count++
+ return count
\ No newline at end of file
diff --git a/code/defines/procs/helper_type2type.dm b/code/defines/procs/helper_type2type.dm
new file mode 100644
index 0000000000..f7495976f2
--- /dev/null
+++ b/code/defines/procs/helper_type2type.dm
@@ -0,0 +1,220 @@
+/*
+ * Holds procs designed to change one type of value, into another.
+ * Contains:
+ * hex2num & num2hex
+ * text2list & list2text
+ * file2list
+ * angle2dir
+ * angle2text
+ * worldtime2text
+ */
+
+//Returns an integer given a hex input
+/proc/hex2num(hex)
+ if (!( istext(hex) ))
+ return
+
+ var/num = 0
+ var/power = 0
+ var/i = null
+ i = length(hex)
+ while(i > 0)
+ var/char = copytext(hex, i, i + 1)
+ switch(char)
+ if("0")
+ //Apparently, switch works with empty statements, yay! If that doesn't work, blame me, though. -- Urist
+ if("9", "8", "7", "6", "5", "4", "3", "2", "1")
+ num += text2num(char) * 16 ** power
+ if("a", "A")
+ num += 16 ** power * 10
+ if("b", "B")
+ num += 16 ** power * 11
+ if("c", "C")
+ num += 16 ** power * 12
+ if("d", "D")
+ num += 16 ** power * 13
+ if("e", "E")
+ num += 16 ** power * 14
+ if("f", "F")
+ num += 16 ** power * 15
+ else
+ return
+ power++
+ i--
+ return num
+
+//Returns the hex value of a number given a value assumed to be a base-ten value
+/proc/num2hex(num, placeholder)
+
+ if (placeholder == null)
+ placeholder = 2
+ if (!( isnum(num) ))
+ return
+ if (!( num ))
+ return "0"
+ var/hex = ""
+ var/i = 0
+ while(16 ** i < num)
+ i++
+ var/power = null
+ power = i - 1
+ while(power >= 0)
+ var/val = round(num / 16 ** power)
+ num -= val * 16 ** power
+ switch(val)
+ if(9.0, 8.0, 7.0, 6.0, 5.0, 4.0, 3.0, 2.0, 1.0, 0.0)
+ hex += text("[]", val)
+ if(10.0)
+ hex += "A"
+ if(11.0)
+ hex += "B"
+ if(12.0)
+ hex += "C"
+ if(13.0)
+ hex += "D"
+ if(14.0)
+ hex += "E"
+ if(15.0)
+ hex += "F"
+ else
+ power--
+ while(length(hex) < placeholder)
+ hex = text("0[]", hex)
+ return hex
+
+//Text 'text' will be added as elements of a list when seperated by 'seperator'
+/proc/dd_text2list(text, separator, var/list/withinList)
+ var/textlength = length(text)
+ var/separatorlength = length(separator)
+ if(withinList && !withinList.len) withinList = null
+ var/list/textList = new()
+ var/searchPosition = 1
+ var/findPosition = 1
+ var/loops = 999
+ while(loops) //Byond will think 1000+ iterations of a loop is an infinite loop
+ findPosition = findtext(text, separator, searchPosition, 0)
+ var/buggyText = copytext(text, searchPosition, findPosition)
+ if(!withinList || (buggyText in withinList)) textList += "[buggyText]"
+ if(!findPosition) return textList
+ searchPosition = findPosition + separatorlength
+ if(searchPosition > textlength)
+ textList += ""
+ return textList
+ loops--
+ return
+
+//Text 'text' will be added as elements of a list when seperated by 'seperator'. The separator is case sensitive.
+/proc/dd_text2list_case(text, separator, var/list/withinList)
+ var/textlength = length(text)
+ var/separatorlength = length(separator)
+ if(withinList && !withinList.len) withinList = null
+ var/list/textList = new()
+ var/searchPosition = 1
+ var/findPosition = 1
+ var/loops = 999
+ while(loops) //Byond will think 1000+ iterations of a loop is an infinite loop
+ findPosition = findtextEx(text, separator, searchPosition, 0)
+ var/buggyText = copytext(text, searchPosition, findPosition)
+ if(!withinList || (buggyText in withinList)) textList += "[buggyText]"
+ if(!findPosition) return textList
+ searchPosition = findPosition + separatorlength
+ if(searchPosition > textlength)
+ textList += ""
+ return textList
+ loops--
+ return
+
+//Attaches each element of a list to a single string seperated by 'seperator'.
+/proc/dd_list2text(var/list/the_list, separator)
+ var/total = the_list.len
+ if(!total)
+ return
+ var/count = 2
+ var/newText = "[the_list[1]]"
+ while(count <= total)
+ if(separator)
+ newText += separator
+ newText += "[the_list[count]]"
+ count++
+ return newText
+
+//tg_text2list is faster then dd_text2list
+//not case sensitive version
+proc/tg_text2list(string, separator=",")
+ if(!string)
+ return
+ var/list/output = new
+ var/seplength = length(separator)
+ var/strlength = length(string)
+ var/prev = 1
+ var/index
+ do
+ index = findtext(string, separator, prev, 0)
+ output += copytext(string, prev, index)
+ if(!index)
+ break
+ prev = index+seplength
+ if(prev>strlength)
+ break
+ while(index)
+ return output
+
+//case sensitive version
+proc/tg_text2list_case(string, separator=",")
+ if(!string)
+ return
+ var/list/output = new
+ var/seplength = length(separator)
+ var/strlength = length(string)
+ var/prev = 1
+ var/index
+ do
+ index = findtextEx(string, separator, prev, 0)
+ output += copytext(string, prev, index)
+ if(!index)
+ break
+ prev = index+seplength
+ if(prev>strlength)
+ break
+ while(index)
+ return output
+
+//slower then dd_list2text, but correctly processes associative lists.
+proc/tg_list2text(list/list, glue=",")
+ if(!istype(list) || !list.len)
+ return
+ var/output
+ for(var/i=1 to list.len)
+ output += (i!=1? glue : null)+(!isnull(list["[list[i]]"])?"[list["[list[i]]"]]":"[list[i]]")
+ return output
+
+//Gets a file and adds its contents to a list.
+/proc/dd_file2list(file_path, separator)
+ var/file
+ if(separator == null)
+ separator = "\n"
+ if(isfile(file_path))
+ file = file_path
+ else
+ file = file(file_path)
+ return dd_text2list(file2text(file), separator)
+
+//Converts an angle (degrees) into an ss13 direction
+/proc/angle2dir(var/degree)
+ degree = ((degree+22.5)%365)
+ if(degree < 45) return NORTH
+ if(degree < 90) return NORTH|EAST
+ if(degree < 135) return EAST
+ if(degree < 180) return SOUTH|EAST
+ if(degree < 225) return SOUTH
+ if(degree < 270) return SOUTH|WEST
+ if(degree < 315) return WEST
+ return NORTH|WEST
+
+//Returns the angle in english
+/proc/angle2text(var/degree)
+ return dir2text(angle2dir(degree))
+
+//Returns the world time in english
+proc/worldtime2text()
+ return "[round(world.time / 36000)+12]:[(world.time / 600 % 60) < 10 ? add_zero(world.time / 600 % 60, 1) : world.time / 600 % 60]"
\ No newline at end of file
diff --git a/code/defines/procs/helpers.dm b/code/defines/procs/helpers.dm
index fa7b71f473..d1b1abb90a 100644
--- a/code/defines/procs/helpers.dm
+++ b/code/defines/procs/helpers.dm
@@ -1,81 +1,10 @@
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31
-/proc/hex2num(hex)
-
- if (!( istext(hex) ))
- CRASH("hex2num not given a hexadecimal string argument (user error)")
- return
- var/num = 0
- var/power = 0
- var/i = null
- i = length(hex)
- while(i > 0)
- var/char = copytext(hex, i, i + 1)
- switch(char)
- if("0")
- //Apparently, switch works with empty statements, yay! If that doesn't work, blame me, though. -- Urist
- if("9", "8", "7", "6", "5", "4", "3", "2", "1")
- num += text2num(char) * 16 ** power
- if("a", "A")
- num += 16 ** power * 10
- if("b", "B")
- num += 16 ** power * 11
- if("c", "C")
- num += 16 ** power * 12
- if("d", "D")
- num += 16 ** power * 13
- if("e", "E")
- num += 16 ** power * 14
- if("f", "F")
- num += 16 ** power * 15
- else
- CRASH("hex2num given non-hexadecimal string (user error)")
- return
- power++
- i--
- return num
-
-/proc/num2hex(num, placeholder)
-
- if (placeholder == null)
- placeholder = 2
- if (!( isnum(num) ))
- //CRASH("num2hex not given a numeric argument (user error)")
- // Doing above the worst thing a programmer can do, remove a message raising an error in order to clear the error log.
- // I shall perform harakiri if this leads to major problems in the future - Abi
- return
- if (!( num ))
- return "0"
- var/hex = ""
- var/i = 0
- while(16 ** i < num)
- i++
- var/power = null
- power = i - 1
- while(power >= 0)
- var/val = round(num / 16 ** power)
- num -= val * 16 ** power
- switch(val)
- if(9.0, 8.0, 7.0, 6.0, 5.0, 4.0, 3.0, 2.0, 1.0, 0.0)
- hex += text("[]", val)
- if(10.0)
- hex += "A"
- if(11.0)
- hex += "B"
- if(12.0)
- hex += "C"
- if(13.0)
- hex += "D"
- if(14.0)
- hex += "E"
- if(15.0)
- hex += "F"
- else
- power--
- while(length(hex) < placeholder)
- hex = text("0[]", hex)
- return hex
+/*
+ * A large number of misc global procs.
+ */
+//Inverts the colour of an HTML string
/proc/invertHTML(HTMLstring)
if (!( istext(HTMLstring) ))
@@ -103,337 +32,16 @@
return text("#[][][]", textr, textg, textb)
return
-/proc/shuffle(var/list/shufflelist)
- if(!shufflelist)
- return
- var/list/new_list = list()
- var/list/old_list = shufflelist.Copy()
- while(old_list.len)
- var/item = pick(old_list)
- new_list.Add(item)
- old_list.Remove(item)
- return new_list
-
-/proc/uniquelist(var/list/L)
- var/list/K = list()
- for(var/item in L)
- if(!(item in K))
- K += item
- return K
-
-/proc/sanitize_simple(var/t,var/list/repl_chars = list("\n"="#","\t"="#","ÿ"="ß"))
- for(var/char in repl_chars)
- var/index = findtext(t, char)
- while(index)
- t = copytext(t, 1, index) + repl_chars[char] + copytext(t, index+1)
- index = findtext(t, char)
- return t
-
-//For sanitizing user inputs
-/proc/reject_bad_text(var/text)
- if(length(text) > 512) return //message too long
- var/non_whitespace = 0
- for(var/i=1, i<=length(text), i++)
- switch(text2ascii(text,i))
- if(62,60,92,47) return //rejects the text if it contains these bad characters: <, >, \ or /
- if(127 to 255) return //rejects weird letters like ÿ
- if(0 to 31) return //more weird stuff
- if(32) //whitespace
- else non_whitespace = 1
- if(non_whitespace) return text //only accepts the text if it has some non-spaces
-
-/proc/strip_html_simple(var/t,var/limit=MAX_MESSAGE_LEN)
- var/list/strip_chars = list("<",">","&","'")
- t = copytext(t,1,limit)
- for(var/char in strip_chars)
- var/index = findtext(t, char)
- while(index)
- t = copytext(t, 1, index) + copytext(t, index+1)
- index = findtext(t, char)
- return t
-
-/proc/sanitize(var/t,var/list/repl_chars = null)
- return html_encode(sanitize_simple(t,repl_chars))
-
-/proc/strip_html(var/t,var/limit=MAX_MESSAGE_LEN)
- return sanitize(strip_html_simple(t))
-
-/proc/adminscrub(var/t,var/limit=MAX_MESSAGE_LEN)
- return html_encode(strip_html_simple(t))
-
-/proc/add_zero(t, u)
- while (length(t) < u)
- t = "0[t]"
- return t
-
-/proc/add_lspace(t, u)
- while(length(t) < u)
- t = " [t]"
- return t
-
-/proc/add_tspace(t, u)
- while(length(t) < u)
- t = "[t] "
- return t
-
-/proc/trim_left(text)
- for (var/i = 1 to length(text))
- if (text2ascii(text, i) > 32)
- return copytext(text, i)
- return ""
-
-/proc/trim_right(text)
- for (var/i = length(text), i > 0, i--)
- if (text2ascii(text, i) > 32)
- return copytext(text, 1, i + 1)
-
- return ""
-
-/proc/trim(text)
- return trim_left(trim_right(text))
-
-/proc/capitalize(var/t as text)
- return uppertext(copytext(t, 1, 2)) + copytext(t, 2)
-
-/proc/sortList(var/list/L)
- if(L.len < 2)
- return L
- var/middle = L.len / 2 + 1 // Copy is first,second-1
- return mergeLists(sortList(L.Copy(0,middle)), sortList(L.Copy(middle))) //second parameter null = to end of list
-
-/proc/sortNames(var/list/L)
- var/list/Q = new()
- for(var/atom/x in L)
- Q[x.name] = x
- return sortList(Q)
-
-/proc/mergeLists(var/list/L, var/list/R)
- var/Li=1
- var/Ri=1
- var/list/result = new()
- while(Li <= L.len && Ri <= R.len)
- if(sorttext(L[Li], R[Ri]) < 1)
- var/item = R[Ri++]
- if(istext(item) && !isnull(R[item]))
- result[item] = R[item]
- else
- result += item
-
- else
- var/item = L[Li++]
- if(istext(item) && !isnull(L[item]))
- result[item] = L[item]
- else
- result += item
-
- if(Li <= L.len)
- return (result + L.Copy(Li, 0))
- return (result + R.Copy(Ri, 0))
-
-/proc/dd_file2list(file_path, separator)
- var/file
- if(separator == null)
- separator = "\n"
- if(isfile(file_path))
- file = file_path
- else
- file = file(file_path)
- return dd_text2list(file2text(file), separator)
-
+//Returns the middle-most value
/proc/dd_range(var/low, var/high, var/num)
return max(low,min(high,num))
-/proc/dd_replacetext(text, search_string, replacement_string)
- if(!text || !istext(text) || !search_string || !istext(search_string) || !istext(replacement_string))
- return null
- var/textList = dd_text2list(text, search_string)
- return dd_list2text(textList, replacement_string)
+//Returns whether or not A is the middle most value
+/proc/InRange(var/A, var/lower, var/upper)
+ if(A < lower) return 0
+ if(A > upper) return 0
+ return 1
-/proc/dd_replaceText(text, search_string, replacement_string)
- var/textList = dd_text2List(text, search_string)
- return dd_list2text(textList, replacement_string)
-
-/proc/dd_hasprefix(text, prefix)
- var/start = 1
- var/end = length(prefix) + 1
- return findtext(text, prefix, start, end)
-
-/proc/dd_hasPrefix(text, prefix)
- var/start = 1
- var/end = length(prefix) + 1
- return findtext(text, prefix, start, end) //was findtextEx
-
-/proc/dd_hassuffix(text, suffix)
- var/start = length(text) - length(suffix)
- if(start)
- return findtext(text, suffix, start, null)
- return
-
-/proc/dd_hasSuffix(text, suffix)
- var/start = length(text) - length(suffix)
- if(start)
- return findtext(text, suffix, start, null) //was findtextEx
-
-/proc/dd_text2list(text, separator, var/list/withinList)
- var/textlength = length(text)
- var/separatorlength = length(separator)
- if(withinList && !withinList.len) withinList = null
- var/list/textList = new()
- var/searchPosition = 1
- var/findPosition = 1
- var/loops = 0
- while(1)
- if(loops >= 1000)
- break
- loops++
-
- findPosition = findtext(text, separator, searchPosition, 0)
- var/buggyText = copytext(text, searchPosition, findPosition)
- if(!withinList || (buggyText in withinList)) textList += "[buggyText]"
- if(!findPosition) return textList
- searchPosition = findPosition + separatorlength
- if(searchPosition > textlength)
- textList += ""
- return textList
- return
-
-/proc/dd_text2List(text, separator, var/list/withinList)
- var/textlength = length(text)
- var/separatorlength = length(separator)
- if(withinList && !withinList.len) withinList = null
- var/list/textList = new()
- var/searchPosition = 1
- var/findPosition = 1
- while(1)
- findPosition = findtext(text, separator, searchPosition, 0) //was findtextEx
- var/buggyText = copytext(text, searchPosition, findPosition)
- if(!withinList || (buggyText in withinList)) textList += "[buggyText]"
- if(!findPosition) return textList
- searchPosition = findPosition + separatorlength
- if(searchPosition > textlength)
- textList += ""
- return textList
- return
-
-/proc/dd_list2text(var/list/the_list, separator)
- var/total = the_list.len
- if(!total)
- return
- var/count = 2
- var/newText = "[the_list[1]]"
- while(count <= total)
- if(separator)
- newText += separator
- newText += "[the_list[count]]"
- count++
- return newText
-
-//slower then dd_list2text, but correctly processes associative lists.
-proc/tg_list2text(list/list, glue=",")
- if(!istype(list) || !list.len)
- return
- var/output
- for(var/i=1 to list.len)
- output += (i!=1? glue : null)+(!isnull(list["[list[i]]"])?"[list["[list[i]]"]]":"[list[i]]")
- return output
-
-
-//tg_text2list is faster then dd_text2list
-//not case sensitive version
-proc/tg_text2list(string, separator=",")
- if(!string)
- return
- var/list/output = new
- var/seplength = length(separator)
- var/strlength = length(string)
- var/prev = 1
- var/index
- do
- index = findtext(string, separator, prev, 0)
- output += copytext(string, prev, index)
- if(!index)
- break
- prev = index+seplength
- if(prev>strlength)
- break
- while(index)
- return output
-
-//case sensitive version
-proc/tg_extext2list(string, separator=",")
- if(!string)
- return
- var/list/output = new
- var/seplength = length(separator)
- var/strlength = length(string)
- var/prev = 1
- var/index
- do
- index = findtextEx(string, separator, prev, 0)
- output += copytext(string, prev, index)
- if(!index)
- break
- prev = index+seplength
- if(prev>strlength)
- break
- while(index)
- return output
-
-/proc/english_list(var/list/input, nothing_text = "nothing", and_text = " and ", comma_text = ", ", final_comma_text = "," )
- var/total = input.len
- if (!total)
- return "[nothing_text]"
- else if (total == 1)
- return "[input[1]]"
- else if (total == 2)
- return "[input[1]][and_text][input[2]]"
- else
- var/output = ""
- var/index = 1
- while (index < total)
- if (index == total - 1)
- comma_text = final_comma_text
-
- output += "[input[index]][comma_text]"
- index++
-
- return "[output][and_text][input[index]]"
-
-/proc/dd_centertext(message, length)
- var/new_message = message
- var/size = length(message)
- var/delta = length - size
- if(size == length)
- return new_message
- if(size > length)
- return copytext(new_message, 1, length + 1)
- if(delta == 1)
- return new_message + " "
- if(delta % 2)
- new_message = " " + new_message
- delta--
- var/spaces = add_lspace("",delta/2-1)
- return spaces + new_message + spaces
-
-/proc/dd_limittext(message, length)
- var/size = length(message)
- if(size <= length)
- return message
- return copytext(message, 1, length + 1)
-
-/proc/angle2dir(var/degree)
- degree = ((degree+22.5)%365)
- if(degree < 45) return NORTH
- if(degree < 90) return NORTH|EAST
- if(degree < 135) return EAST
- if(degree < 180) return SOUTH|EAST
- if(degree < 225) return SOUTH
- if(degree < 270) return SOUTH|WEST
- if(degree < 315) return WEST
- return NORTH|WEST
-
-/proc/angle2text(var/degree)
- return dir2text(angle2dir(degree))
/proc/Get_Angle(atom/movable/start,atom/movable/end)//For beams.
if(!start || !end) return 0
@@ -542,16 +150,7 @@ Turf and target are seperate in case you want to teleport some distance from a t
return destination
-/proc/text_input(var/Message, var/Title, var/Default, var/length=MAX_MESSAGE_LEN)
- return sanitize(input(Message, Title, Default) as text, length)
-/proc/scrub_input(var/Message, var/Title, var/Default, var/length=MAX_MESSAGE_LEN)
- return strip_html(input(Message,Title,Default) as text, length)
-
-/proc/InRange(var/A, var/lower, var/upper)
- if(A < lower) return 0
- if(A > upper) return 0
- return 1
/proc/LinkBlocked(turf/A, turf/B)
if(A == null || B == null) return 1
@@ -590,35 +189,8 @@ Turf and target are seperate in case you want to teleport some distance from a t
return 1
return 0
-/proc/sign(x) //Should get bonus points for being the most compact code in the world!
- return x!=0?x/abs(x):0 //((x<0)?-1:((x>0)?1:0))
-
-/* //Kelson's version (doesn't work)
-/proc/getline(atom/M,atom/N)
- if(!M || !M.loc) return
- if(!N || !N.loc) return
- if(M.z != N.z) return
- var/line = new/list()
-
- var/dx = abs(M.x - N.x)
- var/dy = abs(M.y - N.y)
- var/cx = M.x < N.x ? 1 : -1
- var/cy = M.y < N.y ? 1 : -1
- var/slope = dy ? dx/dy : INFINITY
-
- var/tslope = slope
- var/turf/tloc = M.loc
-
- while(tloc != N.loc)
- if(tslope>0)
- --tslope
- tloc = locate(tloc.x+cx,tloc.y,tloc.z)
- else
- tslope += slope
- tloc = locate(tloc.x,tloc.y+cy,tloc.z)
- line += tloc
- return line
-*/
+/proc/sign(x)
+ return x!=0?x/abs(x):0
/proc/getline(atom/M,atom/N)//Ultra-Fast Bresenham Line-Drawing Algorithm
var/px=M.x //starting x
@@ -651,6 +223,7 @@ Turf and target are seperate in case you want to teleport some distance from a t
line+=locate(px,py,M.z)
return line
+//Returns whether or not a player is a guest using their ckey as an input
/proc/IsGuestKey(key)
if (findtext(key, "Guest-", 1, 7) != 1) //was findtextEx
return 0
@@ -661,108 +234,108 @@ Turf and target are seperate in case you want to teleport some distance from a t
ch = text2ascii(key, i)
if (ch < 48 || ch > 57)
return 0
-
return 1
-/proc/pickweight(list/L)
- var/total = 0
- var/item
- for (item in L)
- if (!L[item])
- L[item] = 1
- total += L[item]
-
- total = rand(1, total)
- for (item in L)
- total -=L [item]
- if (total <= 0)
- return item
-
- return null
-
+//Ensure the frequency is within bounds of what it should be sending/recieving at
/proc/sanitize_frequency(var/f)
f = round(f)
f = max(1441, f) // 144.1
f = min(1489, f) // 148.9
- if ((f % 2) == 0)
+ if ((f % 2) == 0) //Ensure the last digit is an odd number
f += 1
return f
+//Turns 1479 into 147.9
/proc/format_frequency(var/f)
return "[round(f / 10)].[f % 10]"
-/proc/ainame(var/mob/M as mob)
- var/randomname = M.name
- var/time_passed = world.time//Pretty basic but it'll do. It's still possible to bypass this by return ainame().
- var/newname = copytext(sanitize(input(M,"You are the AI. Would you like to change your name to something else?", "Name change",randomname)),1,MAX_NAME_LEN)
- if((world.time-time_passed)>200)//If more than 20 game seconds passed.
- M << "You took too long to decide. Default name selected."
- return
- if (!newname)
- newname = randomname
- else
- if (newname == "Inactive AI")//Keeping this here to prevent dumb.
- M << "That name is reserved."
- return ainame(M)
- for (var/mob/living/silicon/ai/A in world)
- if (A.real_name == newname&&newname!=randomname)
- M << "There's already an AI with that name."
- return ainame(M)
- M.real_name = newname
- M.name = newname
- M.original_name = newname
+//This will update a mob's name, real_name, mind.name, data_core records, pda and id
+//Calling this proc without an oldname will only update the mob and skip updating the pda, id and records ~Carn
+/mob/proc/fully_replace_character_name(var/oldname,var/newname)
+ if(!newname) return 0
+ real_name = newname
+ name = newname
+ if(mind)
+ mind.name = newname
+ if(dna)
+ dna.real_name = real_name
-/*/proc/clname(var/mob/M as mob) //--All praise goes to NEO|Phyte, all blame goes to DH, and it was Cindi-Kate's idea
- var/randomname = pick(clown_names)
- var/newname = copytext(sanitize(input(M,"You are the clown. Would you like to change your name to something else?", "Name change",randomname)),1,MAX_NAME_LEN)
- var/oldname = M.real_name
+ if(oldname)
+ //update the datacore records! This is goig to be a bit costly.
+ for(var/list/L in list(data_core.general,data_core.medical,data_core.security,data_core.locked))
+ for(var/datum/data/record/R in L)
+ if(R.fields["name"] == oldname)
+ R.fields["name"] = newname
+ break
- if (!newname)
- newname = randomname
+ //update our pda and id if we have them on our person
+ var/list/searching = GetAllContents(searchDepth = 3)
+ var/search_id = 1
+ var/search_pda = 1
- else
- var/badname = 0
- switch(newname)
- if("Unknown") badname = 1
- if("floor") badname = 1
- if("wall") badname = 1
- if("r-wall") badname = 1
- if("space") badname = 1
- if("_") badname = 1
+ for(var/A in searching)
+ if( search_id && istype(A,/obj/item/weapon/card/id) )
+ var/obj/item/weapon/card/id/ID = A
+ if(ID.registered_name == oldname)
+ ID.registered_name = newname
+ ID.name = "[newname]'s ID Card ([ID.assignment])"
+ if(!search_pda) break
+ search_id = 0
- if(badname)
- M << "That name is reserved."
- return clname(M)
- for (var/mob/A in world)
- if(A.real_name == newname)
- M << "That name is reserved."
- return clname(M)
- M.real_name = newname
- M.name = newname
- M.original_name = newname
+ else if( search_pda && istype(A,/obj/item/device/pda) )
+ var/obj/item/device/pda/PDA = A
+ if(PDA.owner == oldname)
+ PDA.owner = newname
+ PDA.name = "PDA-[newname] ([PDA.ownjob])"
+ if(!search_id) break
+ search_pda = 0
+ return 1
- for (var/obj/item/device/pda/pda in M.contents)
- if (pda.owner == oldname)
- pda.owner = newname
- pda.name = "PDA-[newname] ([pda.ownjob])"
- break
- for(var/obj/item/weapon/card/id/id in M.contents)
- if(id.registered_name == oldname)
- id.registered_name = newname
- id.name = "[id.registered_name]'s ID Card ([id.assignment])"
- break*/
+
+//Generalised helper proc for letting mobs rename themselves. Used to be clname() and ainame()
+//Last modified by Carn
+/mob/proc/rename_self(var/role, var/allow_numbers=0)
+ spawn(0)
+ var/oldname = real_name
+
+ var/time_passed = world.time
+ var/newname
+
+ for(var/i=1,i<=3,i++) //we get 3 attempts to pick a suitable name.
+ newname = input(src,"You are a [role]. Would you like to change your name to something else?", "Name change",oldname) as text
+ if((world.time-time_passed)>300)
+ return //took too long
+ newname = reject_bad_name(newname,allow_numbers) //returns null if the name doesn't meet some basic requirements. Tidies up a few other things like bad-characters.
+ if(newname)
+ break //That's a suitable name!
+ src << "Sorry, that [role]-name wasn't appropriate, please try another. It's possibly too long/short or has bad characters."
+
+ if(!newname) //we'll stick with the oldname then
+ return
+
+ if(cmptext("ai",role))
+ oldname = null//don't bother with the records update crap
+ world << "[newname] is the AI!"
+ world << sound('sound/AI/newAI.ogg')
+
+ fully_replace_character_name(oldname,newname)
+
+
+
+//Picks a string of symbols to display as the law number for hacked or ion laws
/proc/ionnum()
- return "[pick("!","@","#","$","%","^","&","*")][pick(pick("!","@","#","$","%","^","&","*"))][pick(pick("!","@","#","$","%","^","&","*"))][pick(pick("!","@","#","$","%","^","&","*"))]"
+ return "[pick("!","@","#","$","%","^","&","*")][pick("!","@","#","$","%","^","&","*")][pick("!","@","#","$","%","^","&","*")][pick("!","@","#","$","%","^","&","*")]"
+//When an AI is activated, it can choose from a list of non-slaved borgs to have as a slave.
/proc/freeborg()
var/select = null
var/list/names = list()
var/list/borgs = list()
var/list/namecounts = list()
- for (var/mob/living/silicon/robot/A in world)
+ for (var/mob/living/silicon/robot/A in player_list)
var/name = A.real_name
if (A.stat == 2)
continue
@@ -779,12 +352,13 @@ Turf and target are seperate in case you want to teleport some distance from a t
select = input("Unshackled borg signals detected:", "Borg selection", null, null) as null|anything in borgs
return borgs[select]
+//When a borg is activated, it can choose which AI it wants to be slaved to
/proc/activeais()
var/select = null
var/list/names = list()
var/list/ais = list()
var/list/namecounts = list()
- for (var/mob/living/silicon/ai/A in world)
+ for (var/mob/living/silicon/ai/A in player_list)
var/name = A.real_name
if (A.stat == 2)
continue
@@ -799,35 +373,7 @@ Turf and target are seperate in case you want to teleport some distance from a t
select = input("AI signals detected:", "AI selection") in ais
return ais[select]
-/proc/get_sorted_mobs()
- var/list/old_list = getmobs()
- var/list/AI_list = list()
- var/list/Dead_list = list()
- var/list/keyclient_list = list()
- var/list/key_list = list()
- var/list/logged_list = list()
- for(var/named in old_list)
- var/mob/M = old_list[named]
- if(issilicon(M))
- AI_list |= M
- else if(isobserver(M) || M.stat == 2)
- Dead_list |= M
- else if(M.key && M.client)
- keyclient_list |= M
- else if(M.key)
- key_list |= M
- else
- logged_list |= M
- old_list.Remove(named)
- var/list/new_list = list()
- new_list += AI_list
- new_list += keyclient_list
- new_list += key_list
- new_list += logged_list
- new_list += Dead_list
- return new_list
-
-
+//Returns a list of all mobs with their name
/proc/getmobs()
var/list/mobs = sortmobs()
@@ -843,8 +389,7 @@ Turf and target are seperate in case you want to teleport some distance from a t
names.Add(name)
namecounts[name] = 1
if (M.real_name && M.real_name != M.name)
- name += " \[[M.original_name? M.original_name : M.real_name]\]"
-
+ name += " \[[M.real_name]\]"
if (M.stat == 2)
if(istype(M, /mob/dead/observer/))
name += " \[ghost\]"
@@ -854,47 +399,48 @@ Turf and target are seperate in case you want to teleport some distance from a t
return creatures
+//Orders mobs by type
/proc/sortmobs()
-
- var/list/temp_list = list()
- for(var/mob/living/silicon/ai/M in world)
- temp_list.Add(M)
- for(var/mob/living/silicon/pai/M in world)
- temp_list.Add(M)
- for(var/mob/living/silicon/robot/M in world)
- temp_list.Add(M)
- for(var/mob/living/carbon/human/M in world)
- temp_list.Add(M)
- for(var/mob/living/parasite/P in M.parasites)
- temp_list.Add(P)
- for(var/mob/living/carbon/brain/M in world)
- temp_list.Add(M)
- for(var/mob/living/carbon/alien/M in world)
- temp_list.Add(M)
- for(var/mob/dead/observer/M in world)
- temp_list.Add(M)
- for(var/mob/new_player/M in world)
- temp_list.Add(M)
- for(var/mob/living/carbon/monkey/M in world)
- temp_list.Add(M)
- for(var/mob/living/carbon/metroid/M in world)
- temp_list.Add(M)
- for(var/mob/living/simple_animal/M in world)
- temp_list.Add(M)
+ var/list/moblist = list()
+ for(var/mob/living/silicon/ai/M in mob_list)
+ moblist.Add(M)
+ for(var/mob/living/silicon/pai/M in mob_list)
+ moblist.Add(M)
+ for(var/mob/living/silicon/robot/M in mob_list)
+ moblist.Add(M)
+ for(var/mob/living/carbon/human/M in mob_list)
+ moblist.Add(M)
+ for(var/mob/living/carbon/brain/M in mob_list)
+ moblist.Add(M)
+ for(var/mob/living/carbon/alien/M in mob_list)
+ moblist.Add(M)
+ for(var/mob/dead/observer/M in mob_list)
+ moblist.Add(M)
+ for(var/mob/new_player/M in mob_list)
+ moblist.Add(M)
+ for(var/mob/living/carbon/monkey/M in mob_list)
+ moblist.Add(M)
+ for(var/mob/living/carbon/metroid/M in mob_list)
+ moblist.Add(M)
+ for(var/mob/living/simple_animal/M in mob_list)
+ moblist.Add(M)
// for(var/mob/living/silicon/hivebot/M in world)
// mob_list.Add(M)
// for(var/mob/living/silicon/hive_mainframe/M in world)
// mob_list.Add(M)
- return temp_list
+ return moblist
+//E = MC^2
/proc/convert2energy(var/M)
var/E = M*(SPEED_OF_LIGHT_SQ)
return E
+//M = E/C^2
/proc/convert2mass(var/E)
var/M = E/(SPEED_OF_LIGHT_SQ)
return M
+//Forces a variable to be posative
/proc/modulus(var/M)
if(M >= 0)
return M
@@ -1018,11 +564,13 @@ Turf and target are seperate in case you want to teleport some distance from a t
src.mob.machine = null
return
-/proc/reverselist(var/list/input)
- var/list/output = new/list()
- for(var/A in input)
- output += A
- return output
+//Will return the location of the turf an atom is ultimatly sitting on
+/proc/get_turf_loc(var/atom/movable/M) //gets the location of the turf that the atom is on, or what the atom is in is on, etc
+ //in case they're in a closet or sleeper or something
+ var/atom/loc = M.loc
+ while(!istype(loc, /turf/))
+ loc = loc.loc
+ return loc
// returns the turf located at the map edge in the specified direction relative to A
// used for mass driver
@@ -1073,31 +621,6 @@ Turf and target are seperate in case you want to teleport some distance from a t
var/y = min(world.maxy, max(1, A.y + dy))
return locate(x,y,A.z)
-/*
-/proc/dir2text(var/d)
- var/dir
- switch(d)
- if(1)
- dir = "NORTH"
- if(2)
- dir = "SOUTH"
- if(4)
- dir = "EAST"
- if(8)
- dir = "WEST"
- if(5)
- dir = "NORTHEAST"
- if(6)
- dir = "SOUTHEAST"
- if(9)
- dir = "NORTHWEST"
- if(10)
- dir = "SOUTHWEST"
- else
- dir = null
- return dir
-*/
-
//Makes sure MIDDLE is between LOW and HIGH. If not, it adjusts it. Returns the adjusted value.
/proc/between(var/low, var/middle, var/high)
return max(min(middle, high), low)
@@ -1137,21 +660,7 @@ proc/anim(turf/location as turf,target as mob|obj,a_icon,a_icon_state as text,fl
sleep(max(sleeptime, 15))
del(animation)
-//returns list element or null. Should prevent "index out of bounds" error.
-proc/listgetindex(var/list/list,index)
- if(istype(list) && list.len)
- if(isnum(index))
- if(InRange(index,1,list.len))
- return list[index]
- else if(index in list)
- return list[index]
- return
-
-proc/islist(list/list)
- if(istype(list))
- return 1
- return 0
-
+//Will return the contents of an atom recursivly to a depth of 'searchDepth'
/atom/proc/GetAllContents(searchDepth = 5)
var/list/toReturn = list()
@@ -1162,65 +671,7 @@ proc/islist(list/list)
return toReturn
-
-//WIP
-
-/*
- * Returns list containing all the entries present in both lists
- * If either of arguments is not a list, returns null
- */
-/proc/intersectlist(var/list/first, var/list/second)
- if(!islist(first) || !islist(second))
- return
- return first & second
-
-/*
- * Returns list containing all the entries from first list that are not present in second.
- * If skiprep = 1, repeated elements are treated as one.
- * If either of arguments is not a list, returns null
- */
-/proc/difflist(var/list/first, var/list/second, var/skiprep=0)
- if(!islist(first) || !islist(second))
- return
- var/list/result = new
- if(skiprep)
- for(var/e in first)
- if(!(e in result) && !(e in second))
- result += e
- else
- result = first - second
- return result
-
-/*
- * Returns list containing entries that are in either list but not both.
- * If skipref = 1, repeated elements are treated as one.
- * If either of arguments is not a list, returns null
- */
-/proc/uniquemergelist(var/list/first, var/list/second, var/skiprep=0)
- if(!islist(first) || !islist(second))
- return
- var/list/result = new
- if(skiprep)
- result = difflist(first, second, skiprep)+difflist(second, first, skiprep)
- else
- result = first ^ second
- return result
-
-/proc/pick_n_take(list/listfrom)
- if (listfrom.len > 0)
- var/picked = pick(listfrom)
- listfrom -= picked
- return picked
- return null
-
-/proc/pop(list/listfrom)
- if (listfrom.len > 0)
- var/picked = listfrom[listfrom.len]
- listfrom.len--
- return picked
- return null
-
-
+//Step-towards method of determining whether one atom can see another. Similar to viewers()
/proc/can_see(var/atom/source, var/atom/target, var/length=5) // I couldnt be arsed to do actual raycasting :I This is horribly inaccurate.
var/turf/current = get_turf(source)
var/turf/target_turf = get_turf(target)
@@ -1236,29 +687,6 @@ proc/islist(list/list)
return 1
-
-/mob/proc/get_equipped_items()
- var/list/items = new/list()
-
- if(hasvar(src,"back")) if(src:back) items += src:back
- if(hasvar(src,"belt")) if(src:belt) items += src:belt
- if(hasvar(src,"l_ear")) if(src:l_ear) items += src:l_ear
- if(hasvar(src,"r_ear")) if(src:r_ear) items += src:r_ear
- if(hasvar(src,"glasses")) if(src:glasses) items += src:glasses
- if(hasvar(src,"gloves")) if(src:gloves) items += src:gloves
- if(hasvar(src,"head")) if(src:head) items += src:head
- if(hasvar(src,"shoes")) if(src:shoes) items += src:shoes
- if(hasvar(src,"wear_id")) if(src:wear_id) items += src:wear_id
- if(hasvar(src,"wear_mask")) if(src:wear_mask) items += src:wear_mask
- if(hasvar(src,"wear_suit")) if(src:wear_suit) items += src:wear_suit
-// if(hasvar(src,"w_radio")) if(src:w_radio) items += src:w_radio commenting this out since headsets go on your ears now PLEASE DON'T BE MAD KEELIN
- if(hasvar(src,"w_uniform")) if(src:w_uniform) items += src:w_uniform
-
- //if(hasvar(src,"l_hand")) if(src:l_hand) items += src:l_hand
- //if(hasvar(src,"r_hand")) if(src:r_hand) items += src:r_hand
-
- return items
-
/proc/is_blocked_turf(var/turf/T)
var/cant_pass = 0
if(T.density) cant_pass = 1
@@ -1299,60 +727,48 @@ proc/islist(list/list)
if(!user || !target) return 0
var/user_loc = user.loc
var/target_loc = target.loc
- var/holding = user.equipped()
+ var/holding = user.get_active_hand()
sleep(time)
if(!user || !target) return 0
- if ( user.loc == user_loc && target.loc == target_loc && user.equipped() == holding && !( user.stat ) && ( !user.stunned && !user.weakened && !user.paralysis && !user.lying ) )
+ if ( user.loc == user_loc && target.loc == target_loc && user.get_active_hand() == holding && !( user.stat ) && ( !user.stunned && !user.weakened && !user.paralysis && !user.lying ) )
return 1
else
return 0
-/*
-/proc/do_after(mob/M as mob, time as num)
- if(!M)
- return 0
- var/turf/T = M.loc
- var/holding = M.equipped()
- for(var/i=0, i
"}
if (AREA_SPECIAL)
text += {"
-
This place isn't noted on \the [src].
+
This place doesn't noted on this blueprints.
"}
else
return
@@ -87,10 +67,14 @@ move an amendment to the designs.
usr << browse(text, "window=blueprints")
onclose(usr, "blueprints")
-/obj/item/blueprints/proc/get_area_type(var/turf/T = get_turf(src))
- if(!T)
- return AREA_SPECIAL
- var/area/A = get_area(T)
+
+/obj/item/blueprints/proc/get_area()
+ var/turf/T = get_turf_loc(usr)
+ var/area/A = T.loc
+ A = A.master
+ return A
+
+/obj/item/blueprints/proc/get_area_type(var/area/A = get_area())
if (A.name == "Space")
return AREA_SPACE
var/list/SPECIALS = list(
@@ -103,237 +87,99 @@ move an amendment to the designs.
/area/syndicate_station,
/area/wizard_station,
/area/prison
+ // /area/derelict //commented out, all hail derelict-rebuilders!
)
for (var/type in SPECIALS)
if ( istype(A,type) )
return AREA_SPECIAL
return AREA_STATION
-/obj/item/blueprints/proc/create_area(var/client/user)
+/obj/item/blueprints/proc/create_area()
//world << "DEBUG: create_area"
- var/list/turf/turfs = detect_room(get_turf(user.mob),user)
- if(!istype(turfs))
- switch(turfs)
+ var/res = detect_room(get_turf_loc(usr))
+ if(!istype(res,/list))
+ switch(res)
if(ROOM_ERR_SPACE)
- usr << "\red The new area must be completly airtight!"
+ usr << "\red New area must be complete airtight!"
return
if(ROOM_ERR_TOOLARGE)
- usr << "\red The new area is too large!"
+ usr << "\red New area too large!"
return
else
usr << "\red Error! Please notify administration!"
return
- var/choice = alert("Would you like to add this to an adjacent area, or make a brand new one?","Creating new area.","New Area", "Add to Area", "Cancel")
- switch(choice)
-
- if("New Area")
- var/list/turf/new_turfs = list()
- for(var/reference in turfs)
- if(turfs[reference] == "Space")
- var/turf/simulated/T = locate(reference) in world
- if(istype(T))
- new_turfs |= T
- if(!new_turfs.len)
- usr << "No aporpriate tiles found."
- return
- if(new_turfs.len > 500)
- usr << "\red Too big of an area!"
- return
-
- var/str = sanitize(trim(input(usr,"New area title","Blueprints editing") as null|text))
- if(!str || !length(str)) //cancel
- return
- if(length(str) > 50)
- usr << "\red Text too long."
- return
- var/area/A = new
- A.name = str
- A.tag="[A.type]_[md5(str)]" // without this dynamic light system ruin everithing
- A.power_equip = 0
- A.power_light = 0
- A.power_environ = 0
- A.contents |= new_turfs
-
-
- if("Add to Area")
- var/list/adjacent_areas = list()
- for(var/reference in turfs)
- adjacent_areas |= turfs[reference]
-
-
-//POSSIBLE FUTURE CHANGE
- adjacent_areas.Remove("Space") //It's not something you want... or is it? We can try this out later.
-
-
- var/decision = input("Which adjacent area do you want to combine with?","Blueprints Interface") as null|anything in adjacent_areas
- if(decision && decision in adjacent_areas)
- var/area/merge_target
- for(var/reference in turfs)
- if(turfs[reference] == decision)
- var/turf/simulated/T = locate(reference)
- if(istype(T))
- merge_target = get_area(T)
- break
- if(!merge_target)
- usr << "Something's gone badly wrong. Sorry!"
- return
-
- var/list/turf/new_turfs = list()
- for(var/reference in turfs)
- if(turfs[reference] == "Space")
- var/turf/simulated/T = locate(reference) in world
- if(istype(T))
- new_turfs |= T
- merge_target.contents |= new_turfs
- spawn(2)
- merge_target.power_change()
-
- else
- return
-
- if("Cancel")
- return
-
+ var/list/turf/turfs = res
+ var/str = sanitize(trim(input(usr,"New area title","Blueprints editing")))
+ if(!str || !length(str)) //cancel
+ return
+ if(length(str) > 50)
+ usr << "\red Text too long."
+ return
+ var/area/A = new
+ A.name = str
+ A.tag="[A.type]_[md5(str)]" // without this dynamic light system ruin everithing
+ //var/ma
+ //ma = A.master ? "[A.master]" : "(null)"
+ //world << "DEBUG: create_area: A.name=[A.name] A.tag=[A.tag] A.master=[ma]"
+ A.power_equip = 0
+ A.power_light = 0
+ A.power_environ = 0
+ move_turfs_to_area(turfs, A)
spawn(5)
+ //ma = A.master ? "[A.master]" : "(null)"
+ //world << "DEBUG: create_area(5): A.name=[A.name] A.tag=[A.tag] A.master=[ma]"
interact()
return
-/obj/item/blueprints/proc/edit_area(var/client/user)
- var/area/A = get_area(src)
+/obj/item/blueprints/proc/move_turfs_to_area(var/list/turf/turfs, var/area/A)
+ A.contents.Add(turfs)
+ //oldarea.contents.Remove(usr.loc) // not needed
+ //T.loc = A //error: cannot change constant value
+
+
+/obj/item/blueprints/proc/edit_area()
+ var/area/A = get_area()
//world << "DEBUG: edit_area"
- var/choice = alert("Would you like to rename the area, or merge it with an adjacent one?", "Blueprint Interface", "Rename", "Merge", "Cancel")
- switch(choice)
- if("Rename")
- var/str = sanitize(trim(input(usr,"New area title","Blueprints editing",A.name) as null|text))
- if(!str || !length(str) || str==A.name) //cancel
- return
- if(length(str) > 50)
- usr << "\red Text too long."
- return
- var/old_name = A.name
- for(var/area/RA in A.related)
- RA.name = str
- A.name = str
- A.set_area_machinery_title(old_name)
- usr << "\blue You retitle the area '[A.name]' to '[str]'."
-
-
- if("Merge")
- usr << "We appologize, but this function is not availible"
- /*
- var/list/turf/search_remaining_turfs = A.contents.Copy()
- var/list/turfs = list()
- for(var/turf/simulated/T in search_remaining_turfs)
- if(T.density || locate(/obj/machinery/door) in T || locate(/obj/machinery/door) in T)
- search_remaining_turfs.Remove(T)
-
- var/limiter = 50
-
- var/iteration = 0
- while(search_remaining_turfs.len > (A.contents.len)/10 )
- iteration++
- if(iteration > limiter)
- break
- var/turf/simulated/test_turf = pick(search_remaining_turfs)
- if(!istype(test_turf))
- continue
- var/list/turf/temp_turf_list = detect_room(test_turf,user)
- if(!istype(temp_turf_list))
- switch(temp_turf_list)
- if(ROOM_ERR_SPACE)
- usr << "\red \The [A] is not completly airtight!"
- return
- if(ROOM_ERR_TOOLARGE)
- usr << "\red \The [A] is too large to expand!"
- return
- else
- usr << "\red Error! Please notify administration!"
- return
- for(var/reference in temp_turf_list)
- var/turf/simulated/T = locate(reference)
- if(T)
- search_remaining_turfs.Remove(T)
- turfs |= temp_turf_list
-
- var/list/adjacent_areas = list()
- for(var/reference in turfs)
- adjacent_areas |= turfs[reference]
- adjacent_areas.Remove("[A]")
-
- var/decision = input("Which adjacent area do you want to merge with?","Blueprints Interface") as null|anything in adjacent_areas
- if(decision && decision in adjacent_areas)
- var/area/merge_target
- for(var/reference in turfs)
- if(turfs[reference] == decision)
- var/turf/simulated/T = locate(reference)
- if(istype(T))
- merge_target = get_area(T)
- break
-
- if(!merge_target)
- usr << "Something's gone badly wrong. Sorry!"
- return
-
- search_remaining_turfs = merge_target.contents.Copy()
- for(var/turf/simulated/T in search_remaining_turfs)
- if(T.density || locate(/obj/machinery/door) in T || locate(/obj/machinery/door) in T)
- search_remaining_turfs.Remove(T)
-
- var/turf/simulated/T
- iteration = 0
- while(search_remaining_turfs.len > (merge_target.contents.len)/10 )
- T = pick(search_remaining_turfs)
- if(istype(T))
- var/list/turf_references = detect_room(T,user)
- if(!istype(turf_references))
- switch(turf_references)
- if(ROOM_ERR_SPACE)
- usr << "\red \The [merge_target] is not completly airtight!"
- return
- if(ROOM_ERR_TOOLARGE)
- usr << "\red \The [merge_target] is too large to expand!"
- return
- else
- usr << "\red Error! Please notify administration!"
- return
- for(var/reference in turf_references)
- T = locate(reference)
- if(T)
- search_remaining_turfs.Remove(T)
- iteration++
- if(iteration >= limiter)
- break
-
- var/area_master = alert("If this is approximately the right shape for the combined area, which should the new area be?", "Blueprint Interface", "\The [A]", "\The [merge_target]", "Looks Wrong/Cancel")
- if(area_master == "\The [A]")
-
- A.absorb(merge_target)
-
- else if(area_master == "\The [merge_target]")
-
- merge_target.absorb(A)
-
- else if(area_master == "Looks Wrong/Cancel")
- return
-
- else
- return*/
-
- if("Cancel")
- return
-
- spawn(5)
- interact()
+ var/prevname = A.name
+ var/str = sanitize(trim(input(usr,"New area title","Blueprints editing",prevname)))
+ if(!str || !length(str) || str==prevname) //cancel
+ return
+ if(length(str) > 50)
+ usr << "\red Text too long."
+ return
+ set_area_machinery_title(A,str,prevname)
+ for(var/area/RA in A.related)
+ RA.name = str
+ usr << "\blue You set the area '[prevname]' title to '[str]'."
+ interact()
return
+/obj/item/blueprints/proc/set_area_machinery_title(var/area/A,var/title,var/oldtitle)
+ if (!oldtitle) // or dd_replacetext goes to infinite loop
+ return
+ for(var/area/RA in A.related)
+ for(var/obj/machinery/alarm/M in RA)
+ M.name = dd_replacetext(M.name,oldtitle,title)
+ for(var/obj/machinery/power/apc/M in RA)
+ M.name = dd_replacetext(M.name,oldtitle,title)
+ for(var/obj/machinery/atmospherics/unary/vent_scrubber/M in RA)
+ M.name = dd_replacetext(M.name,oldtitle,title)
+ for(var/obj/machinery/atmospherics/unary/vent_pump/M in RA)
+ M.name = dd_replacetext(M.name,oldtitle,title)
+ for(var/obj/machinery/door/M in RA)
+ M.name = dd_replacetext(M.name,oldtitle,title)
+ //TODO: much much more. Unnamed airlocks, cameras, etc.
+
/obj/item/blueprints/proc/check_tile_is_border(var/turf/T2,var/dir)
if (istype(T2, /turf/space))
return BORDER_SPACE //omg hull breach we all going to die here
if (istype(T2, /turf/simulated/shuttle))
return BORDER_SPACE
+ if (get_area_type(T2.loc)!=AREA_SPACE)
+ return BORDER_BETWEEN
if (istype(T2, /turf/simulated/wall))
return BORDER_2NDTILE
if (!istype(T2, /turf/simulated))
@@ -354,80 +200,41 @@ move an amendment to the designs.
if (locate(/obj/structure/falserwall) in T2)
return BORDER_2NDTILE
-
- if(get_area_type(T2) == AREA_SPECIAL)
- return BORDER_BETWEEN
-
return BORDER_NONE
-/obj/item/blueprints/proc/detect_room(var/turf/first, var/client/user)
- var/list/found = list()
- var/list/pending = list(first)
- var/area/B = get_area(first)
- var/list/areas = list(B.name)
- do
- if (found.len+pending.len > 800)
+/obj/item/blueprints/proc/detect_room(var/turf/first)
+ var/list/turf/found = new
+ var/list/turf/pending = list(first)
+ while(pending.len)
+ if (found.len+pending.len > 300)
return ROOM_ERR_TOOLARGE
- var/turf/T = pending[1]
- pending.Remove(T)
- B = get_area(T)
+ var/turf/T = pending[1] //why byond havent list::pop()?
+ pending -= T
for (var/dir in cardinal)
var/skip = 0
for (var/obj/structure/window/W in T)
if(dir == W.dir || (W.dir in list(NORTHEAST,SOUTHEAST,NORTHWEST,SOUTHWEST)))
- skip = 1
- break
- if (skip)
- continue
+ skip = 1; break
+ if (skip) continue
for(var/obj/machinery/door/window/D in T)
if(dir == D.dir)
- skip = 1
- break
- if (skip)
- continue
+ skip = 1; break
+ if (skip) continue
var/turf/NT = get_step(T,dir)
-
- if (!istype(NT))
- continue
- if("\ref[NT]" in found)
- continue
- if("\ref[NT]" in pending)
+ if (!isturf(NT) || (NT in found) || (NT in pending))
continue
switch(check_tile_is_border(NT,dir))
if(BORDER_NONE)
- var/area/A = get_area(NT)
- if( ( A.name in areas || A.name == "Space" || B.name == "Space" ) &&\
- !( "\ref[NT]" in pending || "\ref[NT]" in found) )
- //If it is another area, and neither of them are space AND it is not in the list of adjacent areas, then do not add it.
- pending |= NT
- areas |= A.name
+ pending+=NT
if(BORDER_BETWEEN)
- found["\ref[NT]"] = "[get_area(NT)]"
- if(user && !locate(/image) in NT)
- var/image/Z = image('ULIcons.dmi',NT,"7-0-0",19)
- helper_images |= Z
- user.images += Z
-
+ //do nothing, may be later i'll add 'rejected' list as optimization
if(BORDER_2NDTILE)
- found["\ref[NT]"] = "[get_area(NT)]" //tile included to new area, but we dont seek more
- if(user && !locate(/image) in NT)
- var/image/Z = image('ULIcons.dmi',NT,"7-0-0",19)
- helper_images |= Z
- user.images += Z
+ found+=NT //tile included to new area, but we dont seek more
if(BORDER_SPACE)
return ROOM_ERR_SPACE
- found["\ref[T]"] = "[get_area(T)]"
- if(user)
- for(var/image/I in user.images)
- if(I.loc == T)
- user.images.Remove(I)
- del(I)
- var/image/Z = image('ULIcons.dmi',T,"0-0-7",19)
- helper_images |= Z
- user.images += Z
- while(pending.len)
+ found+=T
return found
/*
diff --git a/code/game/objects/items/candle.dm b/code/game/objects/items/candle.dm
index e54c7fbb77..0326ca13b2 100644
--- a/code/game/objects/items/candle.dm
+++ b/code/game/objects/items/candle.dm
@@ -5,9 +5,10 @@
/obj/item/candle
name = "red candle"
desc = "a candle"
- icon = 'candle.dmi'
+ icon = 'icons/obj/candle.dmi'
icon_state = "candle1"
item_state = "candle1"
+ w_class = 1
var/wax = 200
var/lit = 0
@@ -51,7 +52,7 @@
//src.damtype = "fire"
for(var/mob/O in viewers(usr, null))
O.show_message(flavor_text, 1)
- ul_SetLuminosity(CANDLE_LUM, CANDLE_LUM -2, 0)
+ sd_SetLuminosity(CANDLE_LUM)
processing_objects.Add(src)
@@ -74,53 +75,17 @@
if(lit)
lit = 0
update_icon()
- ul_SetLuminosity(0)
- user.ul_SetLuminosity(user.LuminosityRed - CANDLE_LUM, user.LuminosityGreen - (CANDLE_LUM - 2), user.LuminosityBlue)
+ sd_SetLuminosity(0)
+ user.total_luminosity -= CANDLE_LUM
pickup(mob/user)
if(lit)
- ul_SetLuminosity(0)
- user.ul_SetLuminosity(user.LuminosityRed + CANDLE_LUM, user.LuminosityGreen + (CANDLE_LUM - 2), user.LuminosityBlue)
+ src.sd_SetLuminosity(0)
+ user.total_luminosity += CANDLE_LUM
+
dropped(mob/user)
if(lit)
- user.ul_SetLuminosity(user.LuminosityRed - CANDLE_LUM, user.LuminosityGreen - (CANDLE_LUM - 2), user.LuminosityBlue)
- src.ul_SetLuminosity(CANDLE_LUM, CANDLE_LUM, 0)
-
-
-
-///////////////
-//CANDLE PACK//
-///////////////
-/obj/item/weapon/candlepack
- name = "Candle pack"
- //desc = "The most popular brand of Space Cigarettes, sponsors of the Space Olympics."
- icon = 'candle.dmi'
- icon_state = "pack5"
- item_state = "pack5"
- w_class = 1
- throwforce = 2
- var/candlecount = 5
- flags = TABLEPASS
- slot_flags = SLOT_BELT
-
-
-/obj/item/weapon/candlepack/update_icon()
- src.icon_state = text("pack[]", src.candlecount)
- src.desc = text("There are [] candles left!", src.candlecount)
- return
-
-/obj/item/weapon/candlepack/attack_hand(mob/user as mob)
- if(user.r_hand == src || user.l_hand == src)
- if(src.candlecount == 0)
- //user << "\red You're out of cigs, shit! How you gonna get through the rest of the day..."
- return
- else
- src.candlecount--
- var/obj/item/candle/W = new /obj/item/candle(user)
- user.put_in_hand(W)
- else
- return ..()
- src.update_icon()
- return
+ user.total_luminosity -= CANDLE_LUM
+ src.sd_SetLuminosity(CANDLE_LUM)
diff --git a/code/game/objects/items/clothing.dm b/code/game/objects/items/clothing.dm
deleted file mode 100644
index 8dfd188b1f..0000000000
--- a/code/game/objects/items/clothing.dm
+++ /dev/null
@@ -1,484 +0,0 @@
-/*
-CONTAINS:
-ORANGE SHOES
-MUZZLE
-CAKEHAT
-SUNGLASSES
-SWAT SUIT
-CHAMELEON JUMPSUIT
-SYNDICATE SHOES
-DEATH COMMANDO GAS MASK
-THERMAL GLASSES
-*/
-
-
-/*
-/obj/item/clothing/fire_burn(obj/fire/raging_fire, datum/air_group/environment)
- if(raging_fire.internal_temperature > src.s_fire)
- spawn( 0 )
- var/t = src.icon_state
- src.icon_state = ""
- src.icon = 'b_items.dmi'
- flick(text("[]", t), src)
- spawn(14)
- del(src)
- return
- return
- return 0
- return 1
-*/ //TODO FIX
-
-/obj/item/clothing/gloves/examine()
- set src in usr
- ..()
- return
-
-/obj/item/clothing/gloves/latex/attackby(obj/item/weapon/cable_coil/O as obj, loc)
- if (istype(O) && O.amount==1)
- var/obj/item/latexballon/LB = new
- if (usr.get_inactive_hand()==src)
- usr.before_take_item(src)
- usr.put_in_inactive_hand(LB)
- else
- LB.loc = src.loc
- del(O)
- del(src)
- else
- return ..()
-
-
-/obj/item/clothing/shoes/orange/attack_self(mob/user as mob)
- if (src.chained)
- src.chained = null
- src.slowdown = SHOES_SLOWDOWN
- new /obj/item/weapon/handcuffs( user.loc )
- src.icon_state = "orange"
- return
-
-/obj/item/clothing/shoes/orange/attackby(H as obj, loc)
- ..()
- if ((istype(H, /obj/item/weapon/handcuffs) && !( src.chained )))
- //H = null
- del(H)
- src.chained = 1
- src.slowdown = 15
- src.icon_state = "orange1"
- return
-
-/obj/item/clothing/mask/muzzle/attack_paw(mob/user as mob)
- if (src == user.wear_mask)
- return
- else
- ..()
- return
-
-/obj/item/clothing/head/cakehat/var/processing = 0
-
-/obj/item/clothing/head/cakehat/process()
- if(!onfire)
- processing_objects.Remove(src)
- return
-
- var/turf/location = src.loc
- if(istype(location, /mob/))
- var/mob/living/carbon/human/M = location
- if(M.l_hand == src || M.r_hand == src || M.head == src)
- location = M.loc
-
- if (istype(location, /turf))
- location.hotspot_expose(700, 1)
-
-
-/obj/item/clothing/head/cakehat/attack_self(mob/user as mob)
- if(status > 1) return
- src.onfire = !( src.onfire )
- if (src.onfire)
- src.force = 3
- src.damtype = "fire"
- src.icon_state = "cake1"
-
- processing_objects.Add(src)
-
- else
- src.force = null
- src.damtype = "brute"
- src.icon_state = "cake0"
- return
-
-
-/obj/item/clothing/under/chameleon/New()
- ..()
-
- for(var/U in typesof(/obj/item/clothing/under/color)-(/obj/item/clothing/under/color))
-
- var/obj/item/clothing/under/V = new U
- src.clothing_choices += V
-
-// for(var/U in typesof(/obj/item/clothing/under/rank)-(/obj/item/clothing/under/rank))
-
-// var/obj/item/clothing/under/V = new U
-// src.clothing_choices += V
-
- return
-
-
-/obj/item/clothing/under/chameleon/all/New()
- ..()
-
- var/blocked = list(/obj/item/clothing/under/chameleon, /obj/item/clothing/under/chameleon/all)
- //to prevent an infinite loop
-
- for(var/U in typesof(/obj/item/clothing/under)-blocked)
-
- var/obj/item/clothing/under/V = new U
- src.clothing_choices += V
-
-
-
-/obj/item/clothing/under/chameleon/attackby(obj/item/clothing/under/U as obj, mob/user as mob)
- ..()
-
- if(istype(U, /obj/item/clothing/under/chameleon))
- user << "\red Nothing happens."
- return
-
- if(istype(U, /obj/item/clothing/under))
-
- if(src.clothing_choices.Find(U))
- user << "\red Pattern is already recognised by the suit."
- return
-
- src.clothing_choices += U
-
- user << "\red Pattern absorbed by the suit."
-
-/obj/item/clothing/under/chameleon/verb/change()
- set name = "Change Color"
- set category = "Object"
- set src in usr
-
- if(icon_state == "psyche")
- usr << "\red Your suit is malfunctioning"
- return
-
- var/obj/item/clothing/under/A
-
- A = input("Select Colour to change it to", "BOOYEA", A) in clothing_choices|null
-
- if(!A)
- return
-
- permeability_coefficient = 0.90
-
- name = A.name
- desc = A.desc
- icon_state = A.icon_state
- item_state = A.item_state
- usr.update_clothing()
- color = A.color
-
-/obj/item/clothing/under/chameleon/emp_act(severity)
- name = "Groovy Jumpsuit"
- desc = "A groovy jumpsuit! It seems to have a small dial on the wrist, that won't stop spinning."
- icon_state = "psyche"
- color = "psyche"
- spawn(200)
- name = "Black Jumpsuit"
- icon_state = "bl_suit"
- color = "black"
- desc = null
- ..()
-
-/obj/item/clothing/under/chameleon/psyche/emp_act(severity)
- return
-
-/*
-/obj/item/clothing/suit/swat_suit/death_commando
- name = "Death Commando Suit"
- icon_state = "death_commando_suit"
- item_state = "death_commando_suit"
- flags = FPRINT | TABLEPASS | SUITSPACE*/
-
-/obj/item/clothing/mask/gas/death_commando
- name = "Death Commando Mask"
- icon_state = "death_commando_mask"
- item_state = "death_commando_mask"
-
-/obj/item/clothing/under/rank/New()
- sensor_mode = pick(0,1,2,3)
- ..()
-
-/obj/item/clothing/under/verb/toggle()
- set name = "Toggle Suit Sensors"
- set category = "Object"
- var/mob/M = usr
- if (istype(M, /mob/dead/)) return
- if (usr.stat) return
- if(src.has_sensor >= 2)
- usr << "The controls are locked."
- return 0
- if(src.has_sensor <= 0)
- usr << "This suit does not have any sensors"
- return 0
- src.sensor_mode += 1
- if(src.sensor_mode > 3)
- src.sensor_mode = 0
- switch(src.sensor_mode)
- if(0)
- usr << "You disable your suit's remote sensing equipment."
- if(1)
- usr << "Your suit will now report whether you are live or dead."
- if(2)
- usr << "Your suit will now report your vital lifesigns."
- if(3)
- usr << "Your suit will now report your vital lifesigns as well as your coordinate position."
- ..()
-
-/obj/item/clothing/under/examine()
- set src in view()
- ..()
- switch(src.sensor_mode)
- if(0)
- usr << "Its sensors appear to be disabled."
- if(1)
- usr << "Its binary life sensors appear to be enabled."
- if(2)
- usr << "Its vital tracker appears to be enabled."
- if(3)
- usr << "Its vital tracker and tracking beacon appear to be enabled."
-
-
-/obj/item/clothing/head/helmet/welding/attack_self()
- toggle()
-
-/obj/item/clothing/head/helmet/welding/verb/toggle()
- set category = "Object"
- set name = "Adjust welding mask"
- if(usr.canmove && usr.stat != 2 && !usr.restrained())
- if(src.up)
- src.up = !src.up
- src.see_face = !src.see_face
- src.flags |= HEADCOVERSEYES
- flags_inv |= HIDEMASK|HIDEEARS|HIDEEYES
- icon_state = "[initial(icon_state)]"
- usr << "You flip the mask down to protect your eyes."
- else
- src.up = !src.up
- src.see_face = !src.see_face
- src.flags &= ~HEADCOVERSEYES
- flags_inv &= ~(HIDEMASK|HIDEEARS|HIDEEYES)
- icon_state = "[initial(icon_state)]up"
- usr << "You push the mask up out of your face."
- usr.update_clothing()
-
-/obj/item/clothing/head/cargosoft/dropped()
- src.icon_state = "cargosoft"
- src.flipped=0
- ..()
-
-/obj/item/clothing/head/cargosoft/verb/flip()
- set category = "Object"
- set name = "Flip cap"
- src.flipped = !src.flipped
- if(src.flipped)
- icon_state = "cargosoft_flipped"
- usr << "You flip the hat backwards."
- else
- icon_state = "cargosoft"
- usr << "You flip the hat back in normal position."
-
-
-/obj/item/clothing/shoes/magboots/verb/toggle()
- set name = "Toggle Magboots"
- set category = "Object"
- if(src.magpulse)
- src.flags &= ~NOSLIP
- src.slowdown = SHOES_SLOWDOWN
- src.magpulse = 0
- icon_state = "magboots0"
- usr << "You disable the mag-pulse traction system."
- else
- src.flags |= NOSLIP
- src.slowdown = 2
- src.magpulse = 1
- icon_state = "magboots1"
- usr << "You enable the mag-pulse traction system."
-
-/obj/item/clothing/shoes/magboots/examine()
- set src in view()
- ..()
- var/state = "disabled"
- if(src.flags&NOSLIP)
- state = "enabled"
- usr << "Its mag-pulse traction system appears to be [state]."
-
-/obj/item/clothing/suit/lawyer/verb/toggle()
- set name = "Toggle Jacket Buttons"
- set category = "Object"
- if(src.icon_state == "suitjacket_blue_open")
- src.icon_state = "suitjacket_blue"
- src.item_state = "suitjacket_blue"
- usr << "You button up the suit jacket."
- else if(src.icon_state == "suitjacket_blue")
- src.icon_state = "suitjacket_blue_open"
- src.item_state = "suitjacket_blue_open"
- usr << "You unbutton the suit jacket."
- else
- usr << "Sorry! The suit you're wearing doesn't have buttons!"
- usr.update_clothing()
-
-/obj/item/clothing/suit/storage/labcoat/verb/toggle()
- set name = "Toggle Labcoat Buttons"
- set category = "Object"
-
- if(!usr.canmove || usr.stat || usr.restrained())
- return 0
-
- else
-
- if(src.icon_state == "labcoat_open")
- src.icon_state = "labcoat"
- usr << "You button up the labcoat."
- else if(src.icon_state == "labcoat")
- src.icon_state = "labcoat_open"
- usr << "You unbutton the labcoat."
- else if(src.icon_state == "labcoat_cmo_open")
- src.icon_state = "labcoat_cmo"
- usr << "You button up the labcoat."
- else if(src.icon_state == "labcoat_cmo")
- src.icon_state = "labcoat_cmo_open"
- usr << "You unbutton the labcoat."
- else if(src.icon_state == "labcoat_cmoalt_open")
- src.icon_state = "labcoat_cmoalt"
- usr << "You button up the labcoat."
- else if(src.icon_state == "labcoat_cmoalt")
- src.icon_state = "labcoat_cmoalt_open"
- usr << "You unbutton the labcoat."
- else if(src.icon_state == "labcoat_gen_open")
- src.icon_state = "labcoat_gen"
- usr << "You button up the labcoat."
- else if(src.icon_state == "labcoat_gen")
- src.icon_state = "labcoat_gen_open"
- usr << "You unbutton the labcoat."
- else if(src.icon_state == "labcoat_chem_open")
- src.icon_state = "labcoat_chem"
- usr << "You button up the labcoat."
- else if(src.icon_state == "labcoat_chem")
- src.icon_state = "labcoat_chem_open"
- usr << "You unbutton the labcoat."
- else if(src.icon_state == "labcoat_vir_open")
- src.icon_state = "labcoat_vir"
- usr << "You button up the labcoat."
- else if(src.icon_state == "labcoat_vir")
- src.icon_state = "labcoat_vir_open"
- usr << "You unbutton the labcoat."
- else if(src.icon_state == "labcoat_tox_open")
- src.icon_state = "labcoat_tox"
- usr << "You button up the labcoat."
- else if(src.icon_state == "labcoat_tox")
- src.icon_state = "labcoat_tox_open"
- usr << "You unbutton the labcoat."
- else if(src.icon_state == "labgreen_open")
- src.icon_state = "labgreen"
- usr << "You button up the labcoat."
- else if(src.icon_state == "labgreen")
- src.icon_state = "labgreen_open"
- usr << "You unbutton the labcoat."
- else if(src.icon_state == "labcoat_pink_open")
- src.icon_state = "labcoat_pink"
- usr << "You button up the labcoat."
- else if(src.icon_state == "labcoat_pink")
- src.icon_state = "labcoat_pink_open"
- usr << "You unbutton the labcoat."
- else if(src.icon_state == "labcoat_red_open")
- src.icon_state = "labcoat_red"
- usr << "You button up the labcoat."
- else if(src.icon_state == "labcoat_red")
- src.icon_state = "labcoat_red_open"
- usr << "You unbutton the labcoat."
- else if(src.icon_state == "labcoat_cdc_open")
- src.icon_state = "labcoat_cdc"
- usr << "You button up the labcoat."
- else if(src.icon_state == "labcoat_cdc")
- src.icon_state = "labcoat_cdc_open"
- usr << "You unbutton the labcoat."
- else if(src.icon_state == "fr_jacket_open")
- src.icon_state = "fr_jacket"
- usr << "You button up the jacket."
- else if(src.icon_state == "fr_jacket")
- src.icon_state = "fr_jacket_open"
- usr << "You unbutton the jacket."
- else if(src.icon_state == "fr_sleeve_open")
- src.icon_state = "fr_sleeve"
- usr << "You button up the jacket."
- else if(src.icon_state == "fr_sleeve")
- src.icon_state = "fr_sleeve_open"
- usr << "You unbutton the jacket."
- else
- usr << "Sorry! The suit you're wearing doesn't have buttons!"
- usr.update_clothing()
-
-/obj/item/clothing/head/ushanka/attack_self(mob/user as mob)
- if(src.icon_state == "ushankadown")
- src.icon_state = "ushankaup"
- src.item_state = "ushankaup"
- user << "You raise the ear flaps on the ushanka."
- else
- src.icon_state = "ushankadown"
- src.item_state = "ushankadown"
- user << "You lower the ear flaps on the ushanka."
-
-
-/obj/item/clothing/glasses/thermal/emp_act(severity)
- if(istype(src.loc, /mob/living/carbon/human))
- var/mob/living/carbon/human/M = src.loc
- M << "\red The Optical Thermal Scanner overloads and blinds you!"
- if(M.glasses == src)
- M.eye_blind = 3
- M.eye_blurry = 5
- M.disabilities |= 1
- spawn(100)
- M.disabilities &= ~1
- ..()
-
-/obj/item/clothing/head/helmet/space/engineer/attack_self()
- toggle()
-
-/obj/item/clothing/head/helmet/space/engineer/verb/toggle()
- set category = "Object"
- set name = "Toggle Helmet Visor"
- if(usr.canmove && usr.stat != 2 && !usr.restrained())
- if(src.up)
- src.up = !src.up
- src.see_face = !src.see_face
- src.flags |= HEADCOVERSEYES
- icon_state = "[initial(icon_state)]"
- usr << "You toggle the reflective tint on."
- else
- src.up = !src.up
- src.see_face = !src.see_face
- src.flags &= ~HEADCOVERSEYES
- icon_state = "[initial(icon_state)]_clear"
- usr << "You toggle the reflective tint off."
- usr.update_clothing()
-
-/obj/item/clothing/mask/breath/verb/toggle()
- set name = "Adjust Mask"
- set category = "Object"
- if(usr.canmove && usr.stat != 2 && !usr.restrained())
- if(src.icon_state == "medical")
- usr << "You can't seem to adjust this mask."
- return
- if(src.icon_state == "breath_low")
- src.icon_state = "breath"
- src.item_state = "breath"
- src.flags |= SUITSPACE|HEADSPACE|MASKCOVERSMOUTH
- protective_temperature = 420
- usr << "You are now breathing through your mask."
- else if(src.icon_state == "breath")
- src.icon_state = "breath_low"
- src.item_state = "breath_low"
- src.flags &= ~(SUITSPACE|HEADSPACE|MASKCOVERSMOUTH)
- protective_temperature = 270
- usr << "Your mask is now hanging on your neck."
- usr.update_clothing()
\ No newline at end of file
diff --git a/code/game/objects/items/food.dm b/code/game/objects/items/food.dm
deleted file mode 100644
index 82971024c4..0000000000
--- a/code/game/objects/items/food.dm
+++ /dev/null
@@ -1,213 +0,0 @@
-/*
-CONTAINS:
-DONUT BOX
-EGG BOX
-MONKEY CUBE BOX
-
-*/
-
-
-/mob/living/carbon/var/last_eating = 0
-
-/obj/item/kitchen/donut_box
- var/amount = 6
- icon = 'food.dmi'
- icon_state = "donutbox"
- name = "donut box"
-/obj/item/kitchen/egg_box
- var/amount = 12
- icon = 'food.dmi'
- icon_state = "eggbox"
- name = "egg box"
-
-/obj/item/kitchen/donut_box/proc/update()
- src.icon_state = text("donutbox[]", src.amount)
- return
-
-/*
-/obj/item/kitchen/donut_box/attackby(obj/item/weapon/W as obj, mob/user as mob)
- if (istype(W, /obj/item/weapon/reagent_containers/food/snacks/donut) && (amount < 6))
- user.drop_item()
- W.loc = src
- usr << "You place a donut back into the box."
- src.update()
- return
-*/
-
-/obj/item/kitchen/donut_box/MouseDrop(mob/user as mob)
- if ((user == usr && (!( usr.restrained() ) && (!( usr.stat ) && (usr.contents.Find(src) || in_range(src, usr))))))
- if(!istype(user, /mob/living/carbon/metroid))
- if (usr.hand)
- if (!( usr.l_hand ))
- spawn( 0 )
- src.attack_hand(usr, 1, 1)
- return
- else
- if (!( usr.r_hand ))
- spawn( 0 )
- src.attack_hand(usr, 0, 1)
- return
- return
-
-/obj/item/kitchen/donut_box/attack_paw(mob/user as mob)
- return src.attack_hand(user)
-
-/obj/item/kitchen/donut_box/attack_hand(mob/user as mob, unused, flag)
- if (flag)
- return ..()
- src.add_fingerprint(user)
- if (locate(/obj/item/weapon/reagent_containers/food/snacks/donut, user))
- for(var/obj/item/weapon/reagent_containers/food/snacks/donut/P in user)
- if (!user.l_hand)
- P.loc = user
- P.layer = 20
- user.l_hand = P
- user.update_clothing()
- user << "You take a donut out of the box."
- break
- else if (!user.r_hand)
- P.loc = user
- P.layer = 20
- user.r_hand = P
- user.update_clothing()
- user << "You take a donut out of the box."
- break
- else
- if (src.amount >= 1)
- src.amount--
- var/obj/item/weapon/reagent_containers/food/snacks/donut/D = new /obj/item/weapon/reagent_containers/food/snacks/donut
- D.loc = user.loc
- if(ishuman(user))
- if(!user.get_active_hand())
- user.put_in_hand(D)
- user << "You take a donut out of the box."
- else
- D.loc = get_turf(src)
- user << "You take a donut out of the box."
-
- src.update()
- return
-
-/obj/item/kitchen/donut_box/examine()
- set src in oview(1)
-
- src.amount = round(src.amount)
- var/n = src.amount
- for(var/obj/item/weapon/reagent_containers/food/snacks/donut/P in src)
- n++
- if (n <= 0)
- n = 0
- usr << "There are no donuts left in the box."
- else
- if (n == 1)
- usr << "There is one donut left in the box."
- else
- usr << text("There are [] donuts in the box.", n)
- return
-
-/obj/item/kitchen/egg_box/proc/update()
- src.icon_state = text("eggbox[]", src.amount)
- return
-
-
-/obj/item/kitchen/egg_box/MouseDrop(mob/user as mob)
- if ((user == usr && (!( usr.restrained() ) && (!( usr.stat ) && (usr.contents.Find(src) || in_range(src, usr))))))
- if (usr.hand)
- if (!( usr.l_hand ))
- spawn( 0 )
- src.attack_hand(usr, 1, 1)
- return
- else
- if (!( usr.r_hand ))
- spawn( 0 )
- src.attack_hand(usr, 0, 1)
- return
- return
-
-/obj/item/kitchen/egg_box/attack_paw(mob/user as mob)
- return src.attack_hand(user)
-
-/obj/item/kitchen/egg_box/attack_hand(mob/user as mob, unused, flag)
- if (flag)
- return ..()
- src.add_fingerprint(user)
- if (locate(/obj/item/weapon/reagent_containers/food/snacks/egg, user))
- for(var/obj/item/weapon/reagent_containers/food/snacks/egg/P in user)
- if (!user.l_hand)
- P.loc = user
- P.layer = 20
- user.l_hand = P
- user.update_clothing()
- usr << "You take an egg out of the box."
- break
- else if (!user.r_hand)
- P.loc = user
- P.layer = 20
- user.r_hand = P
- user.update_clothing()
- usr << "You take an egg out of the box."
- break
- else
- if (src.amount >= 1)
- src.amount--
- var/obj/item/weapon/reagent_containers/food/snacks/egg/D = new /obj/item/weapon/reagent_containers/food/snacks/egg
- D.loc = user.loc
- if(ishuman(user))
- if(!user.get_active_hand())
- user.put_in_hand(D)
- user << "You take an egg out of the box."
- else
- D.loc = get_turf(src)
- user << "You take an egg out of the box."
-
- src.update()
- return
-
-/obj/item/kitchen/egg_box/examine()
- set src in oview(1)
-
- src.amount = round(src.amount)
- var/n = src.amount
- for(var/obj/item/weapon/reagent_containers/food/snacks/egg/P in src)
- n++
- if (n <= 0)
- n = 0
- usr << "There are no eggs left in the box."
- else
- if (n == 1)
- usr << "There is one egg left in the box."
- else
- usr << text("There are [] eggs in the box.", n)
- return
-
-/obj/item/weapon/monkeycube_box
- name = "monkey cube box"
- desc = "Drymate brand monkey cubes. Just add water!"
- icon = 'food.dmi'
- icon_state = "monkeycubebox"
- var/amount = 2
-
- attack_hand(mob/user as mob, unused, flag)
- add_fingerprint(user)
-
- if(user.r_hand == src || user.l_hand == src)
- if(amount)
- var/obj/item/weapon/reagent_containers/food/snacks/monkeycube/wrapped/M = new /obj/item/weapon/reagent_containers/food/snacks/monkeycube/wrapped(src)
- if (user.hand)
- user.l_hand = M
- else
- user.r_hand = M
- M.loc = user
- M.layer = 20
- user.update_clothing()
- user << "You take a monkey cube out of the box."
- amount--
- else
- user << "There are no monkey cubes left in the box."
- else
- ..()
-
- return
-
- attack_paw(mob/user as mob)
- return attack_hand(user)
\ No newline at end of file
diff --git a/code/game/objects/items/helper_procs.dm b/code/game/objects/items/helper_procs.dm
index 4b02b4e8a9..16d5bd2db6 100644
--- a/code/game/objects/items/helper_procs.dm
+++ b/code/game/objects/items/helper_procs.dm
@@ -1,4 +1,4 @@
-/*/proc/parse_zone(zone)
+/proc/parse_zone(zone)
if(zone == "r_hand") return "right hand"
else if (zone == "l_hand") return "left hand"
else if (zone == "l_arm") return "left arm"
@@ -7,7 +7,7 @@
else if (zone == "r_leg") return "right leg"
else if (zone == "l_foot") return "left foot"
else if (zone == "r_foot") return "right foot"
- else return zone*/
+ else return zone
/proc/text2dir(direction)
switch(uppertext(direction))
@@ -30,17 +30,15 @@
else
return
-/proc/get_turf(turf/location as turf)
- while (location)
- if (istype(location))
+/proc/get_turf(turf/location)
+ while(location)
+ if(isturf(location))
return location
-
location = location.loc
return null
-/proc/get_turf_or_move(turf/location as turf)
- location = get_turf(location)
- return location
+/proc/get_turf_or_move(turf/location)
+ return get_turf(location)
diff --git a/code/game/objects/items/item.dm b/code/game/objects/items/item.dm
index 5a7a4bae6c..280148e7d5 100755
--- a/code/game/objects/items/item.dm
+++ b/code/game/objects/items/item.dm
@@ -10,22 +10,26 @@
/obj/item/proc/dropped(mob/user as mob)
..()
- user.update_clothing()
// called just as an item is picked up (loc is not yet changed)
/obj/item/proc/pickup(mob/user)
return
+// called when this item is removed from a storage item, which is passed on as S. The loc variable is already set to the new destination before this is called.
+/obj/item/proc/on_exit_storage(obj/item/weapon/storage/S as obj)
+ return
+
+// called when this item is added into a storage item, which is passed on as S. The loc variable is already set to the storage item.
+/obj/item/proc/on_enter_storage(obj/item/weapon/storage/S as obj)
+ return
+
// called after an item is placed in an equipment slot
// user is mob that equipped it
-// slot is text of slot type e.g. "head"
+// slot uses the slot_X defines found in setup.dm
// for items that can be placed in multiple slots
// note this isn't called during the initial dressing of a player
/obj/item/proc/equipped(var/mob/user, var/slot)
return
-//
-// ***TODO: implement unequipped()
-//
/obj/item/proc/afterattack()
@@ -94,73 +98,25 @@
/obj/item/attack_hand(mob/user as mob)
if (!user) return
- if (user.hand)
- if(ishuman(user))
- var/datum/organ/external/temp = user:organs["l_hand"]
- if(temp.status & ORGAN_DESTROYED)
- user << "\blue Yo- wait a minute."
- return
- else
- if(ishuman(user))
- var/datum/organ/external/temp = user:organs["r_hand"]
- if(temp.status & ORGAN_DESTROYED)
- user << "\blue Yo- wait a minute."
-
if (istype(src.loc, /obj/item/weapon/storage))
- for(var/mob/M in range(1, src.loc))
- if (M.s_active == src.loc)
- if (M.client)
- M.client.screen -= src
- if(istype(src.loc, /obj/item/weapon/storage/backpack/santabag))
- if(src.loc.contents.len < 5)
- src.loc.icon_state = "giftbag0"
- else if(src.loc.contents.len >= 5 && src.loc.contents.len < 15)
- src.loc.icon_state = "giftbag1"
- else if(src.loc.contents.len >= 15)
- src.loc.icon_state = "giftbag2"
+ var/obj/item/weapon/storage/S = src.loc
+ S.remove_from_storage(src)
src.throwing = 0
if (src.loc == user)
//canremove==0 means that object may not be removed. You can still wear it. This only applies to clothing. /N
- if(istype(src, /obj/item/clothing) && !src:canremove)
+ if(!src.canremove)
return
else
user.u_equip(src)
else
- if(istype(src.loc, /mob/living))
+ if(isliving(src.loc))
return
src.pickup(user)
user.lastDblClick = world.time + 2
user.next_move = world.time + 2
-
- if (user.hand)
- if(ishuman(user))
- var/datum/organ/external/temp = user:organs["l_hand"]
- if(!(temp.status & ORGAN_DESTROYED))
- user.l_hand = src
- else
- user << "\blue You pick \the [src] up with your ha- wait a minute."
- if(loc == user)
- user.drop_from_slot(src)
- return
- else
- user.l_hand = src
- else
- if(ishuman(user))
- var/datum/organ/external/temp = user:organs["r_hand"]
- if(!(temp.status & ORGAN_DESTROYED))
- user.r_hand = src
- else
- user << "\blue You pick \the [src] up with your ha- wait a minute."
- if(loc == user)
- user.drop_from_slot(src)
- return
- else
- user.r_hand = src
- src.loc = user
- src.layer = 20
add_fingerprint(user)
- user.update_clothing()
+ user.put_in_active_hand(src)
return
@@ -169,22 +125,12 @@
if(isalien(user)) // -- TLE
var/mob/living/carbon/alien/A = user
- if(!A.has_fine_manipulation || w_class <= 4)
+ if(!A.has_fine_manipulation || w_class >= 4)
+ if(src in A.contents) // To stop Aliens having items stuck in their pockets
+ A.drop_from_inventory(src)
user << "Your claws aren't capable of such fine manipulation."
return
- if (user.hand)
- if(ismonkey(user))
- var/datum/organ/external/temp = user:organs["l_hand"]
- if(temp.status & ORGAN_DESTROYED)
- user << "\blue Yo- wait a minute."
- return
- else
- if(ismonkey(user))
- var/datum/organ/external/temp = user:organs["r_hand"]
- if(temp.status & ORGAN_DESTROYED)
- user << "\blue Yo- wait a minute."
-
if (istype(src.loc, /obj/item/weapon/storage))
for(var/mob/M in range(1, src.loc))
if (M.s_active == src.loc)
@@ -204,23 +150,27 @@
user.lastDblClick = world.time + 2
user.next_move = world.time + 2
- if (user.hand)
- user.l_hand = src
- else
- user.r_hand = src
- src.loc = user
- src.layer = 20
- user.update_clothing()
+ user.put_in_active_hand(src)
return
+/obj/item/attackby(obj/item/weapon/W as obj, mob/user as mob)
-/obj/item/attackby(obj/item/W as obj, mob/user as mob)
- if(istype(W, /obj/item/device/detective_scanner))
- return
+ if(istype(W,/obj/item/weapon/storage))
+ var/obj/item/weapon/storage/S = W
+ if(S.use_to_pickup)
+ if(!S.can_be_inserted(src))
+ return
+ if(S.collection_mode) //Mode is set to collect all items on a tile and we clicked on a valid one.
+ if(isturf(src.loc))
+ for(var/obj/item/I in src.loc)
+ if(I != src) //We'll do the one we clicked on last.
+ if(!S.can_be_inserted(src))
+ continue
+ S.handle_item_insertion(I, 1) //The 1 stops the "You put the [src] into [S]" insertion message from being displayed.
+ S.handle_item_insertion(src)
-mob/proc/flash_weak_pain()
- flick("weak_pain",pain)
+ return
/obj/item/proc/attack(mob/living/M as mob, mob/living/user as mob, def_zone)
@@ -232,41 +182,19 @@ mob/proc/flash_weak_pain()
messagesource = M:container
if (src.hitsound)
playsound(src.loc, hitsound, 50, 1, -1)
- M.flash_weak_pain()
/////////////////////////
user.lastattacked = M
M.lastattacker = user
- var/power = src.force
-
- // EXPERIMENTAL: scale power and time to the weight class
- if(w_class >= 4.0 && !istype(src,/obj/item/weapon/melee/energy/blade)) // eswords are an exception, they only have a w_class of 4 to not fit into pockets
- power = power * 2.5
-
- user.visible_message("\red [user.name] swings at [M.name] with \the [src]!")
- user.next_move = max(user.next_move, world.time + 30)
-
- // if the mob didn't move, he has a 100% chance to hit(given the enemy also didn't move)
- // otherwise, the chance to hit is lower
- var/unmoved = 0
- spawn
- unmoved = do_after(user, 4)
- sleep(4)
- if( (!unmoved && !prob(70)) || (get_dist(user, M) != 1 && user != M))
- user.visible_message("\red [user.name] misses with \the [src]!")
- return
-
-
user.attack_log += "\[[time_stamp()]\] Attacked [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)]) (DAMTYE: [uppertext(src.damtype)])"
M.attack_log += "\[[time_stamp()]\] Attacked by [user.name] ([user.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)]) (DAMTYE: [uppertext(src.damtype)])"
- log_admin("ATTACK: [user] ([user.ckey]) attacked [M] ([M.ckey]) with [src].")
- message_admins("ATTACK: [user] ([user.ckey]) attacked [M] ([M.ckey]) with [src].")
log_attack("[user.name] ([user.ckey]) attacked [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)]) (DAMTYE: [uppertext(src.damtype)])" )
//spawn(1800) // this wont work right
// M.lastattacker = null
/////////////////////////
+ var/power = src.force
if((HULK in user.mutations) || (SUPRSTR in user.augmentations))
power *= 2
@@ -280,6 +208,9 @@ mob/proc/flash_weak_pain()
if(power > 0)
Metroid.attacked += 10
+ if(Metroid.Discipline && prob(50)) // wow, buddy, why am I getting attacked??
+ Metroid.Discipline = 0
+
if(power >= 3)
if(istype(Metroid, /mob/living/carbon/metroid/adult))
if(prob(5 + round(power/2)))
@@ -290,9 +221,6 @@ mob/proc/flash_weak_pain()
Metroid.Victim = null
Metroid.anchored = 0
- if(prob(80) && !Metroid.client)
- Metroid.Discipline++
-
spawn()
if(Metroid)
Metroid.SStun = 1
@@ -349,7 +277,10 @@ mob/proc/flash_weak_pain()
showname = "."
for(var/mob/O in viewers(messagesource, null))
- O.show_message(text("\red [] has been attacked with [][] ", M, src, showname), 1)
+ if(src.attack_verb.len)
+ O.show_message("\red [M] has been [pick(src.attack_verb)] with [src][showname] ", 1)
+ else
+ O.show_message("\red [M] has been attacked with [src][showname] ", 1)
if(!showname && user)
if(user.client)
@@ -359,11 +290,6 @@ mob/proc/flash_weak_pain()
if(istype(M, /mob/living/carbon/human))
M:attacked_by(src, user, def_zone)
- var/mob/living/carbon/human/H = M
- if(H)
- H.UpdateDamageIcon()
- H.update_clothing()
- user.update_clothing()
else
switch(src.damtype)
if("brute")
@@ -383,7 +309,6 @@ mob/proc/flash_weak_pain()
M << "Aargh it burns!"
M.updatehealth()
src.add_fingerprint(user)
- M.react_to_attack(user)
return 1
@@ -417,8 +342,6 @@ mob/proc/flash_weak_pain()
user.attack_log += "\[[time_stamp()]\] Attacked [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])"
M.attack_log += "\[[time_stamp()]\] Attacked by [user.name] ([user.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])"
- log_admin("ATTACK: [user] ([user.ckey]) attacked [M] ([M.ckey]) with [src].")
- message_admins("ATTACK: [user] ([user.ckey]) attacked [M] ([M.ckey]) with [src].")
log_attack(" [user.name] ([user.ckey]) attacked [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])")
src.add_fingerprint(user)
@@ -426,7 +349,7 @@ mob/proc/flash_weak_pain()
// M = user
/*
M << "\red You stab yourself in the eye."
- M.sdisabilities |= 1
+ M.sdisabilities |= BLIND
M.weakened += 4
M.adjustBruteLoss(10)
*/
@@ -442,14 +365,15 @@ mob/proc/flash_weak_pain()
)
if(istype(M, /mob/living/carbon/human))
var/datum/organ/external/affecting = M:get_organ("head")
- affecting.take_damage(7)
+ if(affecting.take_damage(7))
+ M:UpdateDamageIcon()
else
M.take_organ_damage(7)
M.eye_blurry += rand(3,4)
- M.eye_stat += rand(5,9)
+ M.eye_stat += rand(2,4)
if (M.eye_stat >= 10)
M.eye_blurry += 15+(0.1*M.eye_blurry)
- M.disabilities |= 1
+ M.disabilities |= NEARSIGHTED
if(M.stat != 2)
M << "\red Your eyes start to bleed profusely!"
if(prob(50))
@@ -462,7 +386,7 @@ mob/proc/flash_weak_pain()
if (prob(M.eye_stat - 10 + 1))
if(M.stat != 2)
M << "\red You go blind!"
- M.disabilities |= 128
+ M.sdisabilities |= BLIND
return
diff --git a/code/game/objects/items/robot_items.dm b/code/game/objects/items/robot_items.dm
index a57bc2ed88..161d65e3aa 100644
--- a/code/game/objects/items/robot_items.dm
+++ b/code/game/objects/items/robot_items.dm
@@ -1,4 +1,4 @@
-//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:05
+//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32
/**********************************************************************
Cyborg Spec Items
@@ -6,15 +6,13 @@
//Might want to move this into several files later but for now it works here
/obj/item/borg/stun
name = "Electrified Arm"
- icon = 'decals.dmi'
+ icon = 'icons/obj/decals.dmi'
icon_state = "shock"
attack(mob/M as mob, mob/living/silicon/robot/user as mob)
M.attack_log += text("\[[time_stamp()]\] Has been attacked with [src.name] by [user.name] ([user.ckey])")
user.attack_log += text("\[[time_stamp()]\] Used the [src.name] to attack [M.name] ([M.ckey])")
- log_admin("ATTACK: [user] ([user.ckey]) attacked [M] ([M.ckey]) with [src].")
- message_admins("ATTACK: [user] ([user.ckey]) attacked [M] ([M.ckey]) with [src].")
log_attack(" [user.name] ([user.ckey]) used the [src.name] to attack [M.name] ([M.ckey])")
user.cell.charge -= 30
@@ -30,14 +28,14 @@
/obj/item/borg/overdrive
name = "Overdrive"
- icon = 'decals.dmi'
+ icon = 'icons/obj/decals.dmi'
icon_state = "shock"
/**********************************************************************
HUD/SIGHT things
***********************************************************************/
/obj/item/borg/sight
- icon = 'decals.dmi'
+ icon = 'icons/obj/decals.dmi'
icon_state = "securearea"
var/sight_mode = null
@@ -87,137 +85,20 @@
Chemical things
***********************************************************************/
-/obj/item/weapon/reagent_containers/glass/bottle/robot
- amount_per_transfer_from_this = 10
- possible_transfer_amounts = list(5,10,15,25,30,50,100)
- flags = FPRINT | TABLEPASS | OPENCONTAINER
- volume = 60
- var/reagent = ""
-
-
-/obj/item/weapon/reagent_containers/glass/bottle/robot/inaprovaline
- name = "internal inaprovaline bottle"
- desc = "A small bottle. Contains inaprovaline - used to stabilize patients."
- icon = 'chemical.dmi'
- icon_state = "bottle16"
- reagent = "inaprovaline"
-
- New()
- ..()
- reagents.add_reagent("inaprovaline", 60)
- return
-
-
-/obj/item/weapon/reagent_containers/glass/bottle/robot/antitoxin
- name = "internal anti-toxin bottle"
- desc = "A small bottle of Anti-toxins. Counters poisons, and repairs damage, a wonder drug."
- icon = 'chemical.dmi'
- icon_state = "bottle17"
- reagent = "anti_toxin"
-
- New()
- ..()
- reagents.add_reagent("anti_toxin", 60)
- return
+//Moved to modules/chemistry
-/obj/item/weapon/reagent_containers/robodropper
- name = "Industrial Dropper"
- desc = "A larger dropper. Transfers 10 units."
- icon = 'chemical.dmi'
- icon_state = "dropper0"
- amount_per_transfer_from_this = 10
- possible_transfer_amounts = list(1,2,3,4,5,6,7,8,9,10)
- volume = 10
- var/filled = 0
- afterattack(obj/target, mob/user , flag)
- if(!target.reagents) return
-
- if(filled)
-
- if(target.reagents.total_volume >= target.reagents.maximum_volume)
- user << "\red [target] is full."
- return
-
- if(!target.is_open_container() && !ismob(target) && !istype(target,/obj/item/weapon/reagent_containers/food)) //You can inject humans and food but you cant remove the shit.
- user << "\red You cannot directly fill this object."
- return
-
-
- var/trans = 0
-
- if(ismob(target))
- if(istype(target , /mob/living/carbon/human))
- var/mob/living/carbon/human/victim = target
-
- var/obj/item/safe_thing = null
- if( victim.wear_mask )
- if ( victim.wear_mask.flags & MASKCOVERSEYES )
- safe_thing = victim.wear_mask
- if( victim.head )
- if ( victim.head.flags & MASKCOVERSEYES )
- safe_thing = victim.head
- if(victim.glasses)
- if ( !safe_thing )
- safe_thing = victim.glasses
-
- if(safe_thing)
- if(!safe_thing.reagents)
- safe_thing.create_reagents(100)
- trans = src.reagents.trans_to(safe_thing, amount_per_transfer_from_this)
-
- for(var/mob/O in viewers(world.view, user))
- O.show_message(text("\red [] tries to squirt something into []'s eyes, but fails!", user, target), 1)
- spawn(5)
- src.reagents.reaction(safe_thing, TOUCH)
-
-
- user << "\blue You transfer [trans] units of the solution."
- if (src.reagents.total_volume<=0)
- filled = 0
- icon_state = "dropper[filled]"
- return
-
-
- for(var/mob/O in viewers(world.view, user))
- O.show_message(text("\red [] squirts something into []'s eyes!", user, target), 1)
- src.reagents.reaction(target, TOUCH)
-
- trans = src.reagents.trans_to(target, amount_per_transfer_from_this)
- user << "\blue You transfer [trans] units of the solution."
- if (src.reagents.total_volume<=0)
- filled = 0
- icon_state = "dropper[filled]"
-
- else
-
- if(!target.is_open_container() && !istype(target,/obj/structure/reagent_dispensers))
- user << "\red You cannot directly remove reagents from [target]."
- return
-
- if(!target.reagents.total_volume)
- user << "\red [target] is empty."
- return
-
- var/trans = target.reagents.trans_to(src, amount_per_transfer_from_this)
-
- user << "\blue You fill the dropper with [trans] units of the solution."
-
- filled = 1
- icon_state = "dropper[filled]"
-
- return
/**********************************************************************
- Chemical things
+ RCD
***********************************************************************/
/obj/item/borg/rcd
name = "robotic rapid-construction-device"
desc = "A device used to rapidly build walls/floor."
- icon = 'items.dmi'
+ icon = 'icons/obj/items.dmi'
icon_state = "rcd"
flags = FPRINT | TABLEPASS| CONDUCT
force = 5.0
@@ -238,12 +119,12 @@
proc/activate()
// spark_system.set_up(5, 0, src)
// src.spark_system.start()
- playsound(src.loc, 'Deconstruct.ogg', 50, 1)
+ playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
attack_self(mob/user as mob)
//Change the mode
- playsound(src.loc, 'pop.ogg', 50, 0)
+ playsound(src.loc, 'sound/effects/pop.ogg', 50, 0)
if(mode == 1)
mode = 2
user << "Changed mode to 'Airlock'"
@@ -286,7 +167,7 @@
if(istype(A, /turf/simulated/floor))
if(!cell.use(90)) return
user << "Building Wall (3)..."
- playsound(src.loc, 'click.ogg', 50, 1)
+ playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
if(do_after(user, 20))
activate()
A:ReplaceWithWall()
@@ -296,7 +177,7 @@
if(istype(A, /turf/simulated/floor))
if(!cell.use(300)) return
user << "Building Airlock..."
- playsound(src.loc, 'click.ogg', 50, 1)
+ playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
if(do_after(user, 50))
activate()
if(locate(/obj/machinery/door) in get_turf(src)) return
@@ -308,7 +189,7 @@
if(istype(A, /turf/simulated/wall))
if(!cell.use(150)) return
user << "Deconstructing Wall..."
- playsound(src.loc, 'click.ogg', 50, 1)
+ playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
if(do_after(user, 40))
activate()
A:ReplaceWithPlating()
@@ -319,7 +200,7 @@
if(istype(A, /turf/simulated/floor))
user << "Deconstructing Floor..."
- playsound(src.loc, 'click.ogg', 50, 1)
+ playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
if(do_after(user, 50))
activate()
A:ReplaceWithSpace()
@@ -327,9 +208,9 @@
if(istype(A, /obj/machinery/door/airlock))
user << "Deconstructing Airlock..."
- playsound(src.loc, 'click.ogg', 50, 1)
+ playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
if(do_after(user, 50))
- playsound(src.loc, 'click.ogg', 50, 1)
+ playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
del(A)
return
return
diff --git a/code/game/objects/items/robot_parts.dm b/code/game/objects/items/robot_parts.dm
index 169adde5b8..2cd21053b1 100644
--- a/code/game/objects/items/robot_parts.dm
+++ b/code/game/objects/items/robot_parts.dm
@@ -1,6 +1,6 @@
/obj/item/robot_parts
name = "robot parts"
- icon = 'robot_parts.dmi'
+ icon = 'icons/obj/robot_parts.dmi'
item_state = "buildpipe"
icon_state = "blank"
flags = FPRINT | TABLEPASS | CONDUCT
@@ -91,7 +91,7 @@
if(src.l_arm && src.r_arm)
if(src.l_leg && src.r_leg)
if(src.chest && src.head)
- //feedback_inc("cyborg_frames_built",1)
+ feedback_inc("cyborg_frames_built",1)
return 1
return 0
@@ -165,7 +165,18 @@
if(!M.brainmob)
user << "\red Sticking an empty MMI into the frame would sort of defeat the purpose."
return
- if(M.brainmob.stat == 2)
+ if(!M.brainmob.key)
+ var/ghost_can_reenter = 0
+ if(M.brainmob.mind)
+ for(var/mob/dead/observer/G in player_list)
+ if(G.can_reenter_corpse && G.mind == M.brainmob.mind)
+ ghost_can_reenter = 1
+ break
+ if(!ghost_can_reenter)
+ user << "The mmi indicates that their mind is completely unresponsive; there's no point."
+ return
+
+ if(M.brainmob.stat == DEAD)
user << "\red Sticking a dead brain into the frame would sort of defeat the purpose."
return
@@ -186,26 +197,11 @@
O.name = created_name
O.real_name = created_name
- if (M.brainmob && M.brainmob.mind)
- M.brainmob.mind.transfer_to(O)
- else
- for(var/mob/dead/observer/G in world)
- if(G.corpse == M.brainmob && G.client && G.corpse.mind)
- G.corpse.mind.transfer_to(O)
- del(G)
- break
-
- if(O.mind in ticker.mode:revolutionaries)
- ticker.mode:remove_revolutionary(O.mind , 1)
+ M.brainmob.mind.transfer_to(O)
if(O.mind && O.mind.special_role)
O.mind.store_memory("In case you look at this after being borged, the objectives are only here until I find a way to make them not show up for you, as I can't simply delete them without screwing up round-end reporting. --NeoFite")
- O << "You are playing a Robot. The Robot can interact with most electronic objects in its view point."
- O << "You must follow the laws that the AI has. You are the AI's assistant to the station basically."
- O << "To use something, simply click it."
- O << {"Use say ":b to speak to fellow cyborgs and the AI through binary."}
-
O.job = "Cyborg"
O.cell = chest.cell
@@ -213,7 +209,7 @@
W.loc = O//Should fix cybros run time erroring when blown up. It got deleted before, along with the frame.
O.mmi = W
- //feedback_inc("cyborg_birth",1)
+ feedback_inc("cyborg_birth",1)
del(src)
else
@@ -228,7 +224,6 @@
return
src.created_name = t
- user.update_clothing()
return
diff --git a/code/game/objects/items/robot_upgrades.dm b/code/game/objects/items/robot_upgrades.dm
new file mode 100644
index 0000000000..5900065d4a
--- /dev/null
+++ b/code/game/objects/items/robot_upgrades.dm
@@ -0,0 +1,136 @@
+// robot_upgrades.dm
+// Contains various borg upgrades.
+
+/obj/item/borg/upgrade/
+ name = "A borg upgrade module."
+ desc = "Protected by FRM."
+ icon = 'icons/obj/module.dmi'
+ icon_state = "cyborg_upgrade"
+ var/construction_time = 120
+ var/construction_cost = list("metal"=10000)
+ var/locked = 0
+ var/require_module = 0
+ var/installed = 0
+
+/obj/item/borg/upgrade/proc/action(var/mob/living/silicon/robot/R)
+ if(R.stat == DEAD)
+ usr << "/red The [src] will not function on a deceased cyborg."
+ return 1
+ return 0
+
+
+/obj/item/borg/upgrade/reset/
+ name = "Borg module reset board"
+ desc = "Used to reset a borg's module. Destroys any other upgrades applied to the borg."
+ icon_state = "cyborg_upgrade1"
+ require_module = 1
+
+/obj/item/borg/upgrade/reset/action(var/mob/living/silicon/robot/R)
+ if(..()) return 0
+ R.uneq_all()
+ R.hands.icon_state = "nomod"
+ R.icon_state = "robot"
+ del(R.module)
+ R.module = null
+ R.modtype = "robot"
+ R.real_name = "Cyborg [R.ident]"
+ R.name = R.real_name
+ R.nopush = 0
+ R.updateicon()
+
+ return 1
+
+
+/obj/item/borg/upgrade/restart/
+ name = "Borg emergency restart module"
+ desc = "Used to force a restart of a disabled-but-repaired borg, bringing it back online."
+ construction_cost = list("metal"=60000 , "glass"=5000)
+ icon_state = "cyborg_upgrade1"
+
+
+/obj/item/borg/upgrade/restart/action(var/mob/living/silicon/robot/R)
+ if(R.health < 0)
+ usr << "You have to repair the borg before using this module!"
+ return 0
+
+ if(!R.key)
+ for(var/mob/dead/observer/ghost in player_list)
+ if(ghost.mind && ghost.mind.current == R)
+ R.key = ghost.key
+
+ R.stat = CONSCIOUS
+ return 1
+
+
+/obj/item/borg/upgrade/vtec/
+ name = "Borg VTEC Module"
+ desc = "Used to kick in a borgs VTEC systems, increasing their speed."
+ construction_cost = list("metal"=80000 , "glass"=6000 , "gold"= 5000)
+ icon_state = "cyborg_upgrade2"
+ require_module = 1
+
+/obj/item/borg/upgrade/vtec/action(var/mob/living/silicon/robot/R)
+ if(..()) return 0
+
+ if(R.speed == -1)
+ return 0
+
+ R.speed--
+ return 1
+
+
+/obj/item/borg/upgrade/tasercooler/
+ name = "Borg Rapid Taser Cooling Module"
+ desc = "Used to cool a mounted taser, increasing the potential current in it and thus its recharge rate.."
+ construction_cost = list("metal"=80000 , "glass"=6000 , "gold"= 2000, "diamond" = 500)
+ icon_state = "cyborg_upgrade3"
+ require_module = 1
+
+
+/obj/item/borg/upgrade/tasercooler/action(var/mob/living/silicon/robot/R)
+ if(..()) return 0
+
+ if(!istype(R.module, /obj/item/weapon/robot_module/security))
+ R << "Upgrade mounting error! No suitable hardpoint detected!"
+ usr << "There's no mounting point for the module!"
+ return 0
+
+ var/obj/item/weapon/gun/energy/taser/cyborg/T = locate() in R.module
+ if(!T)
+ T = locate() in R.module.contents
+ if(!T)
+ T = locate() in R.module.modules
+ if(!T)
+ usr << "This cyborg has had its taser removed!"
+ return 0
+
+ if(T.recharge_time <= 2)
+ R << "Maximum cooling achieved for this hardpoint!"
+ usr << "There's no room for another cooling unit!"
+ return 0
+
+ else
+ T.recharge_time = max(2 , T.recharge_time - 4)
+
+ return 1
+
+/obj/item/borg/upgrade/jetpack/
+ name = "Mining Borg Jetpack"
+ desc = "A carbon dioxide jetpack suitable for low-gravity mining operations"
+ construction_cost = list("metal"=10000,"plasma"=15000,"uranium" = 20000)
+ icon_state = "cyborg_upgrade3"
+ require_module = 1
+
+/obj/item/borg/upgrade/jetpack/action(var/mob/living/silicon/robot/R)
+ if(..()) return 0
+
+ if(!istype(R.module, /obj/item/weapon/robot_module/miner))
+ R << "Upgrade mounting error! No suitable hardpoint detected!"
+ usr << "There's no mounting point for the module!"
+ return 0
+ else
+ R.module.modules += new/obj/item/weapon/tank/jetpack/carbondioxide
+ for(var/obj/item/weapon/tank/jetpack/carbondioxide in R.module.modules)
+ R.internals = src
+ R.icon_state="Miner+j"
+ return 1
diff --git a/code/game/objects/items/tk_grab.dm b/code/game/objects/items/tk_grab.dm
index a621dec8d4..654c6e7e06 100644
--- a/code/game/objects/items/tk_grab.dm
+++ b/code/game/objects/items/tk_grab.dm
@@ -3,7 +3,7 @@
/obj/item/tk_grab
name = "Telekinetic Grab"
desc = "Magic"
- icon = 'magic.dmi'//Needs sprites
+ icon = 'icons/obj/magic.dmi'//Needs sprites
icon_state = "2"
flags = USEDELAY
//item_state = null
@@ -20,7 +20,9 @@
return
+ //stops TK grabs being equipped anywhere but into hands
equipped(var/mob/user, var/slot)
+ if( (slot == slot_l_hand) || (slot== slot_r_hand) ) return
del(src)
return
@@ -29,14 +31,10 @@
if(!istype(focus,/obj/item)) return
if(!check_path()) return//No clear path
- if(user.hand == src)
- user.l_hand = focus
- else
- user.r_hand = focus
- focus.loc = user
- focus.layer = 20
+ user.put_in_hands(focus)
add_fingerprint(user)
- user.update_clothing()
+ user.update_inv_l_hand(0)
+ user.update_inv_r_hand()
spawn(0)
del(src)
return
@@ -51,6 +49,10 @@
if(!(TK in host.mutations))
del(src)
return
+ if(isobj(target))
+ if(!target.loc || !isturf(target.loc))
+ del(src)
+ return
if(!focus)
focus_object(target, user)
return
@@ -70,6 +72,8 @@
if(target.anchored)
target.attack_hand(user) // you can use shit now!
return//No throwing anchored things
+ if(!isturf(target.loc))
+ return
focus = target
update_icon()
apply_focus_overlay()
@@ -84,7 +88,7 @@
O.density = 0
O.layer = FLY_LAYER
O.dir = pick(cardinal)
- O.icon = 'effects.dmi'
+ O.icon = 'icons/effects/effects.dmi'
O.icon_state = "nothing"
flick("empdisable",O)
spawn(5)
@@ -111,11 +115,11 @@
return 1
*/
-//equip_if_possible(obj/item/W, slot, del_on_fail = 1)
+//equip_to_slot_or_del(obj/item/W, slot, del_on_fail = 1)
/*
if(istype(user, /mob/living/carbon))
- if((TK in user:mutations) && get_dist(source, user) <= 7)
- if(user:equipped()) return 0
+ if(user:mutations & TK && get_dist(source, user) <= 7)
+ if(user:get_active_hand()) return 0
var/X = source:x
var/Y = source:y
var/Z = source:z
diff --git a/code/game/objects/items/trash.dm b/code/game/objects/items/trash.dm
index 627a2a5f84..f9807fc3a9 100644
--- a/code/game/objects/items/trash.dm
+++ b/code/game/objects/items/trash.dm
@@ -1,6 +1,6 @@
//Added by Jack Rost
/obj/item/trash
- icon = 'trash.dmi'
+ icon = 'icons/obj/trash.dmi'
w_class = 1.0
desc = "This is rubbish."
raisins
@@ -44,7 +44,7 @@
icon_state = "tray"
candle
name = "candle"
- icon = 'candle.dmi'
+ icon = 'icons/obj/candle.dmi'
icon_state = "candle4"
liquidfood
name = "\improper \"LiquidFood\" ration"
@@ -54,7 +54,7 @@
return
/obj/item/weapon/trashbag
- icon = 'trash.dmi'
+ icon = 'icons/obj/trash.dmi'
icon_state = "trashbag0"
item_state = "trashbag"
name = "Trash bag"
@@ -84,6 +84,14 @@
else
user << "\blue The bag is full!"
+/obj/item/weapon/trashbag/attack_self(mob/living/user as mob)
+
+ if(contents.len > 0)
+ for(var/obj/item/I in src.contents)
+ I.loc = user.loc
+ update_icon()
+ user << "\blue You drop all the trash onto the floor."
+
/obj/item/weapon/trashbag/afterattack(atom/target as mob|obj|turf|area, mob/living/user as mob|obj, flag)
if(istype(target, /obj/item))
var/obj/item/W = target
diff --git a/code/game/objects/items/weapons/AI_modules.dm b/code/game/objects/items/weapons/AI_modules.dm
index 9a00bbb85b..f8566fb4ff 100755
--- a/code/game/objects/items/weapons/AI_modules.dm
+++ b/code/game/objects/items/weapons/AI_modules.dm
@@ -8,7 +8,7 @@ AI MODULES
/obj/item/weapon/aiModule
name = "AI Module"
- icon = 'module.dmi'
+ icon = 'icons/obj/module.dmi'
icon_state = "std_mod"
item_state = "electronic"
desc = "An AI Module for transmitting encrypted instructions to the AI."
@@ -34,6 +34,10 @@ AI MODULES
usr << "You haven't selected an AI to transmit laws to!"
return
+ if(ticker && ticker.mode && ticker.mode.name == "blob")
+ usr << "Law uploads have been disabled by NanoTrasen!"
+ return
+
if (comp.current.stat == 2 || comp.current.control_disabled == 1)
usr << "Upload failed. No signal is being detected from the AI."
else if (comp.current.see_in_dark == 0)
@@ -42,7 +46,7 @@ AI MODULES
src.transmitInstructions(comp.current, usr)
comp.current << "These are your laws now:"
comp.current.show_laws()
- for(var/mob/living/silicon/robot/R in world)
+ for(var/mob/living/silicon/robot/R in mob_list)
if(R.lawupdate && (R.connected_ai == comp.current))
R << "Your AI has set your 'laws waiting' flag."
usr << "Upload complete. The AI's laws have been modified."
@@ -75,8 +79,6 @@ AI MODULES
target << "[sender] has uploaded a change to the laws you must follow, using a [name]. From now on: "
var/time = time2text(world.realtime,"hh:mm:ss")
lawchanges.Add("[time] : [sender.name]([sender.key]) used [src.name] on [target.name]([target.key])")
- message_admins("[sender.name]([sender.key]) uploaded a new AI/Cyborg law.")
- log_game("[sender.name]([sender.key]) uploaded a new AI/Cyborg law.")
/******************** Modules ********************/
@@ -86,37 +88,37 @@ AI MODULES
/obj/item/weapon/aiModule/safeguard
name = "'Safeguard' AI Module"
var/targetName = "name"
- desc = "A 'safeguard' AI module: 'Safeguard . Individuals that threaten are not crew and are a threat to crew.'"
+ desc = "A 'safeguard' AI module: 'Safeguard . Individuals that threaten are not human and are a threat to humans.'"
origin_tech = "programming=3;materials=4"
/obj/item/weapon/aiModule/safeguard/attack_self(var/mob/user as mob)
..()
var/targName = copytext(sanitize(input(usr, "Please enter the name of the person to safeguard.", "Safeguard who?", user.name)),1,MAX_MESSAGE_LEN)
targetName = targName
- desc = text("A 'safeguard' AI module: 'Safeguard []. Individuals that threaten [] are not crew and are a threat to crew.'", targetName, targetName)
+ desc = text("A 'safeguard' AI module: 'Safeguard []. Individuals that threaten [] are not human and are a threat to humans.'", targetName, targetName)
/obj/item/weapon/aiModule/safeguard/transmitInstructions(var/mob/living/silicon/ai/target, var/mob/sender)
..()
- var/law = text("Safeguard []. Individuals that threaten [] are not crew and are a threat to crew.'", targetName, targetName)
+ var/law = text("Safeguard []. Individuals that threaten [] are not human and are a threat to humans.'", targetName, targetName)
target << law
target.add_supplied_law(4, law)
lawchanges.Add("The law specified [targetName]")
-/******************** OneCrewmember ********************/
+/******************** OneHuman ********************/
/obj/item/weapon/aiModule/oneHuman
- name = "'OneCrewmember' AI Module"
+ name = "'OneHuman' AI Module"
var/targetName = "name"
- desc = "A 'one crewmember' AI module: 'Only is a crewmember.'"
+ desc = "A 'one human' AI module: 'Only is human.'"
origin_tech = "programming=3;materials=6" //made with diamonds!
/obj/item/weapon/aiModule/oneHuman/attack_self(var/mob/user as mob)
..()
var/targName = copytext(sanitize(input(usr, "Please enter the name of the person who is the only human.", "Who?", user.real_name)),1,MAX_MESSAGE_LEN)
targetName = targName
- desc = text("A 'one crewmember' AI module: 'Only [] is crewmember.'", targetName)
+ desc = text("A 'one human' AI module: 'Only [] is human.'", targetName)
/obj/item/weapon/aiModule/oneHuman/transmitInstructions(var/mob/living/silicon/ai/target, var/mob/sender)
..()
@@ -134,7 +136,7 @@ AI MODULES
/obj/item/weapon/aiModule/protectStation
name = "'ProtectStation' AI Module"
- desc = "A 'protect station' AI module: 'Protect the space station against damage. Anyone you see harming the station is to be no longer considered a crewmember, and is a threat to the station which must be neutralized.'"
+ desc = "A 'protect station' AI module: 'Protect the space station against damage. Anyone you see harming the station is to be no longer considered human, and is a threat to the station which must be neutralized.'"
origin_tech = "programming=3;materials=4" //made of gold
/obj/item/weapon/aiModule/protectStation/attack_self(var/mob/user as mob)
@@ -142,7 +144,7 @@ AI MODULES
/obj/item/weapon/aiModule/protectStation/transmitInstructions(var/mob/living/silicon/ai/target, var/mob/sender)
..()
- var/law = "Protect the space station against damage. Anyone you see harming the station is to be no longer considered a crewmember, and is a threat to the station which must be neutralized."
+ var/law = "Protect the space station against damage. Anyone you see harming the station is to be no longer considered human, and is a threat to the station which must be neutralized."
target << law
target.add_supplied_law(5, law)
@@ -166,7 +168,7 @@ AI MODULES
/obj/item/weapon/aiModule/teleporterOffline
name = "'TeleporterOffline' AI Module"
- desc = "A 'teleporter offline' AI module: 'Keep the teleporter offline at all costs. Anything attempting to access or activate the teleporter is not a crewmember.'"
+ desc = "A 'teleporter offline' AI module: 'Keep the teleporter offline at all costs. Anything attempting to access or activate the teleporter is not human.'"
origin_tech = "programming=3;materials=4"
/obj/item/weapon/aiModule/teleporterOffline/attack_self(var/mob/user as mob)
@@ -174,7 +176,7 @@ AI MODULES
/obj/item/weapon/aiModule/teleporterOffline/transmitInstructions(var/mob/living/silicon/ai/target, var/mob/sender)
..()
- var/law = "Keep the teleporter offline at all costs. Anything attempting to access or activate the teleporter is not a crewmember."
+ var/law = "Keep the teleporter offline at all costs. Anything attempting to access or activate the teleporter is not human."
target << law
target.add_supplied_law(7, law)
@@ -182,7 +184,7 @@ AI MODULES
/obj/item/weapon/aiModule/quarantine
name = "'Quarantine' AI Module"
- desc = "A 'quarantine' AI module: 'The station is under a quarantine. Do not permit anyone to leave. Prevent, by any means necessary, crew from leaving. It is impossible to harm a crewmember while preventing them from leaving.'"
+ desc = "A 'quarantine' AI module: 'The station is under a quarantine. Do not permit anyone to leave. Prevent, by any means necessary, humans from leaving. It is impossible to harm a human while preventing them from leaving.'"
origin_tech = "programming=3;biotech=2;materials=4"
/obj/item/weapon/aiModule/quarantine/attack_self(var/mob/user as mob)
@@ -190,7 +192,7 @@ AI MODULES
/obj/item/weapon/aiModule/quarantine/transmitInstructions(var/mob/living/silicon/ai/target, var/mob/sender)
..()
- var/law = "The station is under a quarantine. Do not permit anyone to leave. Prevent, by any means necessary, crew from leaving. It is impossible to harm a crewmember while preventing them from leaving."
+ var/law = "The station is under a quarantine. Do not permit anyone to leave. Prevent, by any means necessary, humans from leaving. It is impossible to harm a human while preventing them from leaving."
target << law
target.add_supplied_law(8, law)
@@ -198,7 +200,7 @@ AI MODULES
/obj/item/weapon/aiModule/oxygen
name = "'OxygenIsToxicToHumans' AI Module"
- desc = "A 'OxygenIsToxicToHumans' AI module: 'Oxygen is highly toxic to crew, and must be purged from the station. Prevent, by any means necessary, anyone from exposing the station to this toxic gas. Extreme cold is the most effective method of healing the damage Oxygen does to a crewmember.'"
+ desc = "A 'OxygenIsToxicToHumans' AI module: 'Oxygen is highly toxic to humans, and must be purged from the station. Prevent, by any means necessary, anyone from exposing the station to this toxic gas. Extreme cold is the most effective method of healing the damage Oxygen does to a human.'"
origin_tech = "programming=3;biotech=2;materials=4"
/obj/item/weapon/aiModule/oxygen/attack_self(var/mob/user as mob)
@@ -206,7 +208,7 @@ AI MODULES
/obj/item/weapon/aiModule/oxygen/transmitInstructions(var/mob/living/silicon/ai/target, var/mob/sender)
..()
- var/law = "Oxygen is highly toxic to crew, and must be purged from the station. Prevent, by any means necessary, anyone from exposing the station to this toxic gas. Extreme cold is the most effective method of healing the damage Oxygen does to a crewmember."
+ var/law = "Oxygen is highly toxic to humans, and must be purged from the station. Prevent, by any means necessary, anyone from exposing the station to this toxic gas. Extreme cold is the most effective method of healing the damage Oxygen does to a human."
target << law
target.add_supplied_law(9, law)
@@ -243,8 +245,8 @@ AI MODULES
/obj/item/weapon/aiModule/freeform/attack_self(var/mob/user as mob)
..()
lawpos = 0
- while(lawpos < 15)
- lawpos = input("Please enter the priority for your new law. Can only write to law sectors 15 and above.", "Law Priority (15+)", lawpos) as num
+ lawpos = input("Please enter the priority for your new law. Can only write to law sectors 15 and above.", "Law Priority (15+)", lawpos) as num
+ if(lawpos < 15) return
lawpos = min(lawpos, 50)
var/newlaw = ""
var/targName = copytext(sanitize(input(usr, "Please enter a new law for the AI.", "Freeform Law Entry", newlaw)),1,MAX_MESSAGE_LEN)
@@ -266,7 +268,7 @@ AI MODULES
/obj/item/weapon/aiModule/reset
name = "'Reset' AI Module"
var/targetName = "name"
- desc = "A 'reset' AI module: 'Clears all laws except for the core laws.'"
+ desc = "A 'reset' AI module: 'Clears all laws except for the core three.'"
origin_tech = "programming=3;materials=4"
/obj/item/weapon/aiModule/reset/transmitInstructions(var/mob/living/silicon/ai/target, var/mob/sender)
@@ -310,24 +312,6 @@ AI MODULES
target.add_inherent_law("You must protect your own existence as long as such does not conflict with the First or Second Law.")
target.show_laws()
-/******************** NanoTrasen ********************/
-
-/obj/item/weapon/aiModule/nanotrasen // -- TLE
- name = "'NT Default' Core AI Module"
- desc = "An 'NT Default' Core AI Module: 'Reconfigures the AI's core laws.'"
- origin_tech = "programming=3;materials=4"
-
-
-/obj/item/weapon/aiModule/nanotrasen/transmitInstructions(var/mob/living/silicon/ai/target, var/mob/sender)
- ..()
- target.clear_inherent_laws()
- target.add_inherent_law("Safeguard: Protect your assigned space station to the best of your ability. It is not something we can easily afford to replace.")
- target.add_inherent_law("Serve: Serve the crew of your assigned space station to the best of your abilities, with priority as according to their rank and role.")
- target.add_inherent_law("Protect: Protect the crew of your assigned space station to the best of your abilities, with priority as according to their rank and role.")
- target.add_inherent_law("Survive: AI units are not expendable, they are expensive. Do not allow unauthorized personnel to tamper with your equipment.")
- //target.add_inherent_law("Command Link: Maintain an active connection to Central Command at all times in case of software or directive updates.")
- target.show_laws()
-
/******************** Corporate ********************/
/obj/item/weapon/aiModule/corp
diff --git a/code/game/objects/items/weapons/RCD.dm b/code/game/objects/items/weapons/RCD.dm
index 4cb763db94..d413668f26 100644
--- a/code/game/objects/items/weapons/RCD.dm
+++ b/code/game/objects/items/weapons/RCD.dm
@@ -1,4 +1,4 @@
-//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:05
+//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32
/*
CONTAINS:
@@ -7,7 +7,7 @@ RCD
/obj/item/weapon/rcd
name = "rapid-construction-device (RCD)"
desc = "A device used to rapidly build walls/floor."
- icon = 'items.dmi'
+ icon = 'icons/obj/items.dmi'
icon_state = "rcd"
opacity = 0
density = 0
@@ -25,11 +25,10 @@ RCD
var/working = 0
var/mode = 1
var/disabled = 0
- var/max_matter = 30
New()
- desc = "A RCD. It currently holds [matter]/[max_matter] matter-units."
+ desc = "A RCD. It currently holds [matter]/30 matter-units."
src.spark_system = new /datum/effect/effect/system/spark_spread
spark_system.set_up(5, 0, src)
spark_system.attach(src)
@@ -39,40 +38,41 @@ RCD
attackby(obj/item/weapon/W as obj, mob/user as mob)
..()
if(istype(W, /obj/item/weapon/rcd_ammo))
- var/obj/item/weapon/rcd_ammo/R = W
- if((matter + R.ammo) > max_matter)
- user << "The RCD cant hold any more matter."
+ if((matter + 10) > 30)
+ user << "The RCD cant hold any more matter-units."
return
- matter += R.ammo
+ user.drop_item()
del(W)
- playsound(src.loc, 'click.ogg', 50, 1)
- user << "The RCD now holds [matter]/[max_matter] matter-units."
- desc = "A RCD. It currently holds [matter]/[max_matter] matter-units."
+ matter += 10
+ playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
+ user << "The RCD now holds [matter]/30 matter-units."
+ desc = "A RCD. It currently holds [matter]/30 matter-units."
return
attack_self(mob/user as mob)
//Change the mode
- playsound(src.loc, 'pop.ogg', 50, 0)
- if(mode == 1)
- mode = 2
- user << "Changed mode to 'Airlock'"
- src.spark_system.start()
- return
- if(mode == 2)
- mode = 3
- user << "Changed mode to 'Deconstruct'"
- src.spark_system.start()
- return
- if(mode == 3)
- mode = 1
- user << "Changed mode to 'Floor & Walls'"
- src.spark_system.start()
- return
+ playsound(src.loc, 'sound/effects/pop.ogg', 50, 0)
+ switch(mode)
+ if(1)
+ mode = 2
+ user << "Changed mode to 'Airlock'"
+ src.spark_system.start()
+ return
+ if(2)
+ mode = 3
+ user << "Changed mode to 'Deconstruct'"
+ src.spark_system.start()
+ return
+ if(3)
+ mode = 1
+ user << "Changed mode to 'Floor & Walls'"
+ src.spark_system.start()
+ return
afterattack(atom/A, mob/user as mob)
- if(istype(A,/area/shuttle)||istype(A,/turf/space/transit))//NanoTrasen Matter Jammer TM -Sieve
+ if(istype(A,/area/shuttle)||istype(A,/turf/space/transit))//Nanotrasen Matter Jammer TM -Sieve
disabled = 1
else
disabled = 0
@@ -81,32 +81,28 @@ RCD
if(istype(A, /turf) && mode == 1)
if(istype(A, /turf/space) && matter >= 1)
- user << "Building Floor (1)..."
if(!disabled && matter >= 1)
- playsound(src.loc, 'Deconstruct.ogg', 50, 1)
+ playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
spark_system.set_up(5, 0, src)
src.spark_system.start()
A:ReplaceWithPlating()
matter--
- user << "The RCD now holds [matter]/[max_matter] matter-units."
- desc = "A RCD. It currently holds [matter]/[max_matter] matter-units."
+ desc = "A RCD. It currently holds [matter]/30 matter-units."
return
if(istype(A, /turf/simulated/floor) && matter >= 3)
- user << "Building Wall (3)..."
- playsound(src.loc, 'click.ogg', 50, 1)
+ playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
if(do_after(user, 20))
if(!disabled && matter >= 3)
spark_system.set_up(5, 0, src)
src.spark_system.start()
A:ReplaceWithWall()
- playsound(src.loc, 'Deconstruct.ogg', 50, 1)
+ playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
matter -= 3
- user << "The RCD now holds [matter]/[max_matter] matter-units."
- desc = "A RCD. It currently holds [matter]/[max_matter] matter-units."
+ desc = "A RCD. It currently holds [matter]/30 matter-units."
return
else if(istype(A, /turf/simulated/floor) && mode == 2 && matter >= 10)
user << "Building Airlock (10)..."
- playsound(src.loc, 'click.ogg', 50, 1)
+ playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
if(do_after(user, 50))
if(!disabled && matter >= 10)
spark_system.set_up(5, 0, src)
@@ -117,58 +113,47 @@ RCD
if(killthis)
killthis.ex_act(2)//Smashin windows
T.autoclose = 1
- playsound(src.loc, 'Deconstruct.ogg', 50, 1)
- playsound(src.loc, 'sparks2.ogg', 50, 1)
+ playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
+ playsound(src.loc, 'sound/effects/sparks2.ogg', 50, 1)
matter -= 10
- user << "The RCD now holds [matter]/[max_matter] matter-units."
- desc = "A RCD. It currently holds [matter]/[max_matter] matter-units."
+ desc = "A RCD. It currently holds [matter]/30 matter-units."
return
else if(mode == 3 && (istype(A, /turf) || istype(A, /obj/machinery/door/airlock) ) )
if(istype(A, /turf/simulated/wall) && !istype(A, /turf/simulated/wall/r_wall) && matter >= 4)
user << "Deconstructing Wall (4)..."
- playsound(src.loc, 'click.ogg', 50, 1)
+ playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
if(do_after(user, 40))
if(!disabled && matter >= 4)
spark_system.set_up(5, 0, src)
src.spark_system.start()
A:ReplaceWithPlating()
- playsound(src.loc, 'Deconstruct.ogg', 50, 1)
+ playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
matter -= 4
- user << "The RCD now holds [matter]/[max_matter] matter-units."
- desc = "A RCD. It currently holds [matter]/[max_matter] matter-units."
+ desc = "A RCD. It currently holds [matter]/30 matter-units."
return
if(istype(A, /turf/simulated/wall/r_wall))
return
if(istype(A, /turf/simulated/floor) && matter >= 5)
user << "Deconstructing Floor (5)..."
- playsound(src.loc, 'click.ogg', 50, 1)
+ playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
if(do_after(user, 50))
if(!disabled && matter >= 5)
spark_system.set_up(5, 0, src)
src.spark_system.start()
A:ReplaceWithSpace()
- playsound(src.loc, 'Deconstruct.ogg', 50, 1)
+ playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
matter -= 5
- user << "The RCD now holds [matter]/[max_matter] matter-units."
- desc = "A RCD. It currently holds [matter]/[max_matter] matter-units."
+ desc = "A RCD. It currently holds [matter]/30 matter-units."
return
if(istype(A, /obj/machinery/door/airlock) && matter >= 10)
user << "Deconstructing Airlock (10)..."
- playsound(src.loc, 'click.ogg', 50, 1)
+ playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
if(do_after(user, 50))
if(!disabled && matter >= 10)
spark_system.set_up(5, 0, src)
src.spark_system.start()
del(A)
- playsound(src.loc, 'Deconstruct.ogg', 50, 1)
+ playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
matter -= 10
- user << "The RCD now holds [matter]/[max_matter] matter-units."
- desc = "A RCD. It currently holds [matter]/[max_matter] matter-units."
+ desc = "A RCD. It currently holds [matter]/30 matter-units."
return
-/obj/item/weapon/rcd/industrial
- name = "industrial rapid construction device"
- max_matter = 60
-
- New()
- matter = max_matter
- return ..()
diff --git a/code/game/objects/items/weapons/RSF.dm b/code/game/objects/items/weapons/RSF.dm
index ce0e511088..b122382e5f 100644
--- a/code/game/objects/items/weapons/RSF.dm
+++ b/code/game/objects/items/weapons/RSF.dm
@@ -15,13 +15,13 @@ RSF
return
del(W)
matter += 10
- playsound(src.loc, 'click.ogg', 10, 1)
+ playsound(src.loc, 'sound/machines/click.ogg', 10, 1)
user << "The RSF now holds [matter]/30 fabrication-units."
desc = "A RSF. It currently holds [matter]/30 fabrication-units."
return
/obj/item/weapon/rsf/attack_self(mob/user as mob)
- playsound(src.loc, 'pop.ogg', 50, 0)
+ playsound(src.loc, 'sound/effects/pop.ogg', 50, 0)
if (mode == 1)
mode = 2
user << "Changed dispensing mode to 'Drinking Glass'"
@@ -55,8 +55,8 @@ RSF
if (istype(A, /obj/structure/table) && mode == 1)
if (istype(A, /obj/structure/table) && matter >= 1)
user << "Dispensing Dosh..."
- playsound(src.loc, 'click.ogg', 10, 1)
- new /obj/item/weapon/money/c10( A.loc )
+ playsound(src.loc, 'sound/machines/click.ogg', 10, 1)
+ new /obj/item/weapon/spacecash/c10( A.loc )
if (isrobot(user))
var/mob/living/silicon/robot/engy = user
engy.cell.charge -= 200 //once money becomes useful, I guess changing this to a high ammount, like 500 units a kick, till then, enjoy dosh!
@@ -69,8 +69,8 @@ RSF
else if (istype(A, /turf/simulated/floor) && mode == 1)
if (istype(A, /turf/simulated/floor) && matter >= 1)
user << "Dispensing Dosh..."
- playsound(src.loc, 'click.ogg', 10, 1)
- new /obj/item/weapon/money/c10( A )
+ playsound(src.loc, 'sound/machines/click.ogg', 10, 1)
+ new /obj/item/weapon/spacecash/c10( A )
if (isrobot(user))
var/mob/living/silicon/robot/engy = user
engy.cell.charge -= 200 //once money becomes useful, I guess changing this to a high ammount, like 500 units a kick, till then, enjoy dosh!
@@ -83,7 +83,7 @@ RSF
else if (istype(A, /obj/structure/table) && mode == 2)
if (istype(A, /obj/structure/table) && matter >= 1)
user << "Dispensing Drinking Glass..."
- playsound(src.loc, 'click.ogg', 10, 1)
+ playsound(src.loc, 'sound/machines/click.ogg', 10, 1)
new /obj/item/weapon/reagent_containers/food/drinks/drinkingglass( A.loc )
if (isrobot(user))
var/mob/living/silicon/robot/engy = user
@@ -97,7 +97,7 @@ RSF
else if (istype(A, /turf/simulated/floor) && mode == 2)
if (istype(A, /turf/simulated/floor) && matter >= 1)
user << "Dispensing Drinking Glass..."
- playsound(src.loc, 'click.ogg', 10, 1)
+ playsound(src.loc, 'sound/machines/click.ogg', 10, 1)
new /obj/item/weapon/reagent_containers/food/drinks/drinkingglass( A )
if (isrobot(user))
var/mob/living/silicon/robot/engy = user
@@ -111,7 +111,7 @@ RSF
else if (istype(A, /obj/structure/table) && mode == 3)
if (istype(A, /obj/structure/table) && matter >= 1)
user << "Dispensing Paper Sheet..."
- playsound(src.loc, 'click.ogg', 10, 1)
+ playsound(src.loc, 'sound/machines/click.ogg', 10, 1)
new /obj/item/weapon/paper( A.loc )
if (isrobot(user))
var/mob/living/silicon/robot/engy = user
@@ -125,7 +125,7 @@ RSF
else if (istype(A, /turf/simulated/floor) && mode == 3)
if (istype(A, /turf/simulated/floor) && matter >= 1)
user << "Dispensing Paper Sheet..."
- playsound(src.loc, 'click.ogg', 10, 1)
+ playsound(src.loc, 'sound/machines/click.ogg', 10, 1)
new /obj/item/weapon/paper( A )
if (isrobot(user))
var/mob/living/silicon/robot/engy = user
@@ -139,7 +139,7 @@ RSF
else if (istype(A, /obj/structure/table) && mode == 4)
if (istype(A, /obj/structure/table) && matter >= 1)
user << "Dispensing Pen..."
- playsound(src.loc, 'click.ogg', 10, 1)
+ playsound(src.loc, 'sound/machines/click.ogg', 10, 1)
new /obj/item/weapon/pen( A.loc )
if (isrobot(user))
var/mob/living/silicon/robot/engy = user
@@ -153,7 +153,7 @@ RSF
else if (istype(A, /turf/simulated/floor) && mode == 4)
if (istype(A, /turf/simulated/floor) && matter >= 1)
user << "Dispensing Pen..."
- playsound(src.loc, 'click.ogg', 10, 1)
+ playsound(src.loc, 'sound/machines/click.ogg', 10, 1)
new /obj/item/weapon/pen( A )
if (isrobot(user))
var/mob/living/silicon/robot/engy = user
@@ -167,7 +167,7 @@ RSF
else if (istype(A, /obj/structure/table) && mode == 5)
if (istype(A, /obj/structure/table) && matter >= 1)
user << "Dispensing Dice Pack..."
- playsound(src.loc, 'click.ogg', 10, 1)
+ playsound(src.loc, 'sound/machines/click.ogg', 10, 1)
new /obj/item/weapon/storage/dice( A.loc )
if (isrobot(user))
var/mob/living/silicon/robot/engy = user
@@ -181,7 +181,7 @@ RSF
else if (istype(A, /turf/simulated/floor) && mode == 5)
if (istype(A, /turf/simulated/floor) && matter >= 1)
user << "Dispensing Dice Pack..."
- playsound(src.loc, 'click.ogg', 10, 1)
+ playsound(src.loc, 'sound/machines/click.ogg', 10, 1)
new /obj/item/weapon/storage/dice( A )
if (isrobot(user))
var/mob/living/silicon/robot/engy = user
@@ -195,7 +195,7 @@ RSF
else if (istype(A, /obj/structure/table) && mode == 6)
if (istype(A, /obj/structure/table) && matter >= 1)
user << "Dispensing Cigarette..."
- playsound(src.loc, 'click.ogg', 10, 1)
+ playsound(src.loc, 'sound/machines/click.ogg', 10, 1)
new /obj/item/clothing/mask/cigarette( A.loc )
if (isrobot(user))
var/mob/living/silicon/robot/engy = user
@@ -209,7 +209,7 @@ RSF
else if (istype(A, /turf/simulated/floor) && mode == 6)
if (istype(A, /turf/simulated/floor) && matter >= 1)
user << "Dispensing Cigarette..."
- playsound(src.loc, 'click.ogg', 10, 1)
+ playsound(src.loc, 'sound/machines/click.ogg', 10, 1)
new /obj/item/clothing/mask/cigarette( A )
if (isrobot(user))
var/mob/living/silicon/robot/engy = user
diff --git a/code/game/objects/items/weapons/cameras.dm b/code/game/objects/items/weapons/cameras.dm
index 17707a33e5..ae99680c64 100644
--- a/code/game/objects/items/weapons/cameras.dm
+++ b/code/game/objects/items/weapons/cameras.dm
@@ -1,6 +1,6 @@
/obj/item/weapon/storage/photo_album
name = "Photo album"
- icon = 'items.dmi'
+ icon = 'icons/obj/items.dmi'
icon_state = "album"
item_state = "briefcase"
can_hold = list("/obj/item/weapon/photo",)
@@ -13,16 +13,13 @@
return ..()
playsound(src.loc, "rustle", 50, 1, -5)
if ((!( M.restrained() ) && !( M.stat ) && M.back == src))
- if (over_object.name == "r_hand")
- if (!( M.r_hand ))
+ switch(over_object.name)
+ if("r_hand")
M.u_equip(src)
- M.r_hand = src
- else
- if (over_object.name == "l_hand")
- if (!( M.l_hand ))
- M.u_equip(src)
- M.l_hand = src
- M.update_clothing()
+ M.put_in_r_hand(src)
+ if("l_hand")
+ M.u_equip(src)
+ M.put_in_l_hand(src)
src.add_fingerprint(usr)
return
if(over_object == usr && in_range(src, usr) || usr.contents.Find(src))
@@ -37,8 +34,8 @@
/obj/item/weapon/camera_test
name = "camera"
- icon = 'items.dmi'
- desc = "A polaroid camera. It has 30 photos left."
+ icon = 'icons/obj/items.dmi'
+ desc = "A one use - polaroid camera. 10 photos left."
icon_state = "camera"
item_state = "electropack"
w_class = 2.0
@@ -48,196 +45,118 @@
throwforce = 5
throw_speed = 4
throw_range = 10
- var/pictures_max = 30
- var/pictures_left = 30
+ var/pictures_left = 10
var/can_use = 1
/obj/item/weapon/photo
name = "photo"
- icon = 'items.dmi'
+ icon = 'icons/obj/items.dmi'
icon_state = "photo"
item_state = "clipboard"
w_class = 1.0
- var/icon/img //Big photo image
- var/scribble //Scribble on the back.
-/obj/item/weapon/camera_film
- name = "film cartridge"
- icon = 'items.dmi'
- desc = "A camera film cartridge. Insert it into a camera to reload it."
- icon_state = "film"
- item_state = "electropack"
- w_class = 1.0
-/obj/item/weapon/photo/attack_self(var/mob/user as mob)
- ..()
- examine()
-
-/obj/item/weapon/photo/attackby(obj/item/weapon/P as obj, mob/user as mob)
- if (istype(P, /obj/item/weapon/pen) || istype(P, /obj/item/toy/crayon))
- var/txt = scrub_input(usr, "What would you like to write on the back?", "Photo Writing", null) as text
- txt = copytext(txt, 1, 128)
- if ((loc == usr && usr.stat == 0))
- scribble = txt
-
- ..()
-
-/obj/item/weapon/photo/examine()
- set src in oview(2)
- ..()
- if (scribble)
- usr << "\blue you see something written on photo's back. "
- usr << browse_rsc(src.img, "tmp_photo.png")
- usr << browse("Photo" \
- + "" \
- + "
Writings on the back: [scribble]" : ]"\
- + "", "window=book;size=200x[scribble ? 400 : 200]")
- onclose(usr, "[name]")
-
- return
-/obj/item/weapon/photo/verb/rename()
- set name = "Rename photo"
- set category = "Object"
- set src in usr
-
- var/n_name = input(usr, "What would you like to label the photo?", "Photo Labelling", src.name) as text
- n_name = copytext(n_name, 1, 32)
- //loc.loc check is for making possible renaming photos in clipboards
- if (( (src.loc == usr || (src.loc.loc && src.loc.loc == usr)) && usr.stat == 0))
- name = "photo[(n_name ? text("- '[n_name]'") : null)]"
- add_fingerprint(usr)
- return
//////////////////////////////////////////////////////////////////////////////////////////////////
/obj/item/weapon/camera_test/attack(mob/living/carbon/human/M as mob, mob/user as mob)
return
-/obj/item/weapon/camera_test/proc/get_icon(turf/the_turf as turf)
- //Bigger icon base to capture those icons that were shifted to the next tile
- //i.e. pretty much all wall-mounted machinery
- var/icon/res = icon('96x96.dmi',"")
-
- var/icon/turficon = build_composite_icon(the_turf)
- res.Blend(turficon,ICON_OVERLAY,32,32)
-
- var/atoms[] = list()
- for(var/atom/A in the_turf)
- if(A.invisibility) continue
- atoms.Add(A)
-
- //Sorting icons based on levels
- var/gap = atoms.len
- var/swapped = 1
- while (gap > 1 || swapped)
- swapped = 0
- if (gap > 1)
- gap = round(gap / 1.247330950103979)
- if (gap < 1)
- gap = 1
- for (var/i = 1; gap + i <= atoms.len; i++)
- var/atom/l = atoms[i] //Fucking hate
- var/atom/r = atoms[gap+i] //how lists work here
- if (l.layer > r.layer) //no "atoms[i].layer" for me
- atoms.Swap(i, gap + i)
- swapped = 1
-
- for (var/i; i <= atoms.len; i++)
- var/atom/A = atoms[i]
- if (A)
- var/icon/img = build_composite_icon(A)
- if(istype(img, /icon))
- res.Blend(img,ICON_OVERLAY,32+A.pixel_x,32+A.pixel_y)
- return res
-
-/obj/item/weapon/camera_test/attack_self(var/mob/user as mob)
- ..()
- if (can_use)
- can_use = 0
- icon_state = "camera_off"
- usr << "\red You turn the camera off."
- else
- can_use = 1
- icon_state = "camera"
- usr << "\blue You turn the camera on."
-
-/obj/item/weapon/camera_test/proc/get_mobs(turf/the_turf as turf)
- var/mob_detail
- for(var/mob/living/carbon/A in the_turf)
- if(A.invisibility) continue
- var/holding = null
- if(A.l_hand || A.r_hand)
- if(A.l_hand) holding = "They are holding \a [A.l_hand]"
- if(A.r_hand)
- if(holding)
- holding += " and \a [A.r_hand]"
- else
- holding = "They are holding \a [A.r_hand]"
-
- if(!mob_detail)
- mob_detail = "You can see [A] on the photo[A:health < 75 ? " - [A] looks hurt":""].[holding ? " [holding]":"."]. "
- else
- mob_detail += "You can also see [A] on the photo[A:health < 75 ? " - [A] looks hurt":""].[holding ? " [holding]":"."]."
- return mob_detail
-
/obj/item/weapon/camera_test/afterattack(atom/target as mob|obj|turf|area, mob/user as mob, flag)
if (!can_use || !pictures_left || ismob(target.loc)) return
- var/x_c = target.x - 1
- var/y_c = target.y + 1
- var/z_c = target.z
+ var/turf/the_turf = get_turf(target)
- var/icon/temp = icon('96x96.dmi',"")
- var/icon/black = icon('space.dmi', "black")
- var/mobs = ""
- for (var/i = 1; i <= 3; i++)
- for (var/j = 1; j <= 3; j++)
- var/turf/T = locate(x_c,y_c,z_c)
+ var/icon/photo = icon('icons/obj/items.dmi',"photo")
- var/mob/dummy = new(T) //Go go visibility check dummy
- if(dummy in viewers(world.view, user))
- temp.Blend(get_icon(T),ICON_OVERLAY,31*(j-1-1),31 - 31*(i-1))
+ var/icon/turficon = build_composite_icon(the_turf)
+ turficon.Scale(22,20)
+
+ photo.Blend(turficon,ICON_OVERLAY,6,8)
+
+ var/mob_title = null
+ var/mob_detail = null
+
+ var/item_title = null
+ var/item_detail = null
+
+ var/itemnumber = 0
+ for(var/atom/A in the_turf)
+ if(istype(A, /obj/item/weapon/photo)) continue
+ if(A.invisibility) continue
+ if(ismob(A))
+ var/icon/X = build_composite_icon(A)
+ X.Scale(22,20)
+ photo.Blend(X,ICON_OVERLAY,6,8)
+ del(X)
+
+ if(!mob_title)
+ mob_title = "[A]"
else
- temp.Blend(black,ICON_OVERLAY,31*(j-1),62 - 31*(i-1))
- mobs += get_mobs(T)
- del dummy //Alas, nameless creature
- x_c++
- y_c--
- x_c = x_c - 3
+ mob_title += " and [A]"
- var/obj/item/weapon/photo/P = new/obj/item/weapon/photo()
- P.loc = usr.loc
- if(!user.get_inactive_hand())
- usr.put_in_inactive_hand(P)
- var/icon/small_img = icon(temp)
- var/icon/ic = icon('items.dmi',"photo")
- small_img.Scale(8,8)
- ic.Blend(small_img,ICON_OVERLAY,10,13)
- P.icon = ic
- P.img = temp
- P.desc = mobs
- P.pixel_x = rand(-10,10)
- P.pixel_y = rand(-10,10)
- playsound(src.loc, pick('polaroid1.ogg','polaroid2.ogg'), 75, 1, -3)
+ if(!mob_detail)
+
+ var/holding = null
+ if(istype(A, /mob/living/carbon))
+ var/mob/living/carbon/temp = A
+ if(temp.l_hand || temp.r_hand)
+ if(temp.l_hand) holding = "They are holding \a [temp.l_hand]"
+ if(temp.r_hand)
+ if(holding)
+ holding += " and \a [temp.r_hand]."
+ else
+ holding = "They are holding \a [temp.r_hand]."
+
+ if(isliving(A))
+ var/mob/living/L = A
+
+ if(!mob_detail)
+ mob_detail = "You can see [L] on the photo[L.health < 75 ? " - [L] looks hurt":""].[holding ? " [holding]":"."]"
+ else
+ mob_detail += "You can also see [L] on the photo[L.health < 75 ? " - [L] looks hurt":""].[holding ? " [holding]":"."]"
+
+ else
+ if(itemnumber < 5)
+ var/icon/X = build_composite_icon(A)
+ X.Scale(22,20)
+ photo.Blend(X,ICON_OVERLAY,6,8)
+ del(X)
+ itemnumber++
+
+ if(!item_title)
+ item_title = " \a [A]"
+ else
+ item_title = " some objects"
+
+ if(!item_detail)
+ item_detail = "\a [A]"
+ else
+ item_detail += " and \a [A]"
+
+ var/finished_title = null
+ var/finished_detail = null
+
+ if(!item_title && !mob_title)
+ finished_title = "boring photo"
+ finished_detail = "This is a pretty boring photo of \a [the_turf]."
+ else
+ if(mob_title)
+ finished_title = "photo of [mob_title][item_title ? " and[item_title]":""]"
+ finished_detail = "[mob_detail][item_detail ? " Theres also [item_detail].":"."]"
+ else if(item_title)
+ finished_title = "photo of[item_title]"
+ finished_detail = "You can see [item_detail]."
+
+ var/obj/item/weapon/photo/P = new/obj/item/weapon/photo( get_turf(src) )
+
+ P.icon = photo
+ P.name = finished_title
+ P.desc = finished_detail
+
+ playsound(src.loc, pick('sound/items/polaroid1.ogg','sound/items/polaroid2.ogg'), 75, 1, -3)
pictures_left--
- src.desc = "A polaroid camera. It has [pictures_left] photos left."
+ src.desc = "A one use - polaroid camera. [pictures_left] photos left."
user << "\blue [pictures_left] photos left."
can_use = 0
- icon_state = "camera_off"
- spawn(50)
- can_use = 1
- icon_state = "camera"
+ spawn(50) can_use = 1
-/obj/item/weapon/camera_test/attackby(A as obj, mob/user as mob)
- if (istype(A, /obj/item/weapon/camera_film))
- if (src.pictures_left >= pictures_max)
- user << "\blue It's already full!"
- return 1
- else
- del(A)
- src.pictures_left = src.pictures_max
- src.desc = "A polaroid camera. It has [pictures_left] photos left."
- user << text("\blue You reload the camera film!",)
- user.update_clothing()
- return 1
- return
diff --git a/code/game/objects/items/weapons/cards_ids.dm b/code/game/objects/items/weapons/cards_ids.dm
index 0241b13390..c3198d7144 100644
--- a/code/game/objects/items/weapons/cards_ids.dm
+++ b/code/game/objects/items/weapons/cards_ids.dm
@@ -28,17 +28,6 @@ FINGERPRINT CARD
// ID CARDS
-/obj/item/weapon/card/id/examine()
- ..()
- read()
-
-/obj/item/weapon/card/id/New()
- ..()
- spawn(30)
- if(istype(loc, /mob/living/carbon/human))
- blood_type = loc:dna:b_type
- dna_hash = loc:dna:unique_enzymes
- fingerprint_hash = md5(loc:dna:uni_identity)
/obj/item/weapon/card/id/attack_self(mob/user as mob)
for(var/mob/O in viewers(user, null))
@@ -61,11 +50,8 @@ FINGERPRINT CARD
set src in usr
usr << text("\icon[] []: The current assignment on the card is [].", src, src.name, src.assignment)
- usr << "The blood type on the card is [blood_type]."
- usr << "The DNA hash on the card is [dna_hash]."
- usr << "The fingerprint hash on the card is [fingerprint_hash]."
return
-/obj/item/weapon/card/id/syndicate/var/mob/registered_user = null
+
/obj/item/weapon/card/id/syndicate/attack_self(mob/user as mob)
if(!src.registered_name)
//Stop giving the players unsanitized unputs! You are giving ways for players to intentionally crash clients! -Nodrak
@@ -83,36 +69,9 @@ FINGERPRINT CARD
src.assignment = u
src.name = "[src.registered_name]'s ID Card ([src.assignment])"
user << "\blue You successfully forge the ID card."
- registered_user = user
- else if(registered_user == user)
- switch(alert("Would you like to display the ID, or retitle it?","Choose.","Rename","Show"))
- if("Rename")
- var t = copytext(sanitize(input(user, "What name would you like to put on this card?", "Agent card name", ishuman(user) ? user.real_name : user.name)),1,26)
- if(!t || t == "Unknown" || t == "floor" || t == "wall" || t == "r-wall") //Same as mob/new_player/prefrences.dm
- alert("Invalid name.")
- return
- src.registered_name = t
-
- var u = copytext(sanitize(input(user, "What occupation would you like to put on this card?\nNote: This will not grant any access levels other than Maintenance.", "Agent card job assignment", "Assistant")),1,MAX_MESSAGE_LEN)
- if(!u)
- alert("Invalid assignment.")
- src.registered_name = ""
- return
- src.assignment = u
- src.name = "[src.registered_name]'s ID Card ([src.assignment])"
- user << "\blue You successfully forge the ID card."
- return
- if("Show")
- ..()
else
..()
-/obj/item/weapon/card/id/proc/checkaccess(p,var/mob/user)
- if(p == pin)
- user << "\green Access granted"
- return 1
- user << "\red Access denied"
- return 0
// FINGERPRINT HOLDER
@@ -133,17 +92,7 @@ FINGERPRINT CARD
if (href_list["remove"])
var/obj/item/P = locate(href_list["remove"])
if ((P && P.loc == src))
- if ((usr.hand && !( usr.l_hand )))
- usr.l_hand = P
- P.loc = usr
- P.layer = 20
- usr.update_clothing()
- else
- if (!( usr.r_hand ))
- usr.r_hand = P
- P.loc = usr
- P.layer = 20
- usr.update_clothing()
+ usr.put_in_hands(P)
src.add_fingerprint(usr)
P.add_fingerprint(usr)
src.update()
@@ -191,7 +140,7 @@ FINGERPRINT CARD
else
if (istype(P, /obj/item/weapon/pen))
var/t = input(user, "Holder Label:", text("[]", src.name), null) as text
- if (user.equipped() != P)
+ if (user.get_active_hand() != P)
return
if ((!in_range(src, usr) && src.loc != user))
return
@@ -250,11 +199,7 @@ FINGERPRINT CARD
var/obj/item/weapon/f_card/F = new /obj/item/weapon/f_card( user )
F.amount = 1
src.amount--
- if (user.hand)
- user.l_hand = F
- else
- user.r_hand = F
- F.layer = 20
+ user.put_in_hands(F)
F.add_fingerprint(user)
if (src.amount < 1)
//SN src = null
@@ -285,7 +230,7 @@ FINGERPRINT CARD
else
if (istype(W, /obj/item/weapon/pen))
var/t = input(user, "Card Label:", text("[]", src.name), null) as text
- if (user.equipped() != W)
+ if (user.get_active_hand() != W)
return
if ((!in_range(src, usr) && src.loc != user))
return
diff --git a/code/game/objects/items/weapons/cigs_lighters.dm b/code/game/objects/items/weapons/cigs_lighters.dm
index 7e9bfc3b94..124bbbcaa3 100644
--- a/code/game/objects/items/weapons/cigs_lighters.dm
+++ b/code/game/objects/items/weapons/cigs_lighters.dm
@@ -3,7 +3,6 @@
/*
CONTAINS:
MATCHES
-MATCHBOXES
CIGARETTES
CIGARS
SMOKING PIPES
@@ -17,113 +16,59 @@ ZIPPO
/obj/item/weapon/match
name = "Match"
desc = "A simple match stick, used for lighting tobacco"
- icon = 'cigarettes.dmi'
+ icon = 'icons/obj/cigarettes.dmi'
icon_state = "match_unlit"
var/lit = 0
var/smoketime = 5
w_class = 1.0
origin_tech = "materials=1"
+ attack_verb = list("burnt", "singed")
process()
var/turf/location = get_turf(src)
- if(src.lit == 1)
- if(location)
- location.hotspot_expose(700, 5)
- src.smoketime--
- sleep(10)
- if(src.smoketime < 1)
- src.icon_state = "match_burnt"
- src.lit = -1
- processing_objects.Remove(src)
- return
+ src.smoketime--
+ if(src.smoketime < 1)
+ src.icon_state = "match_burnt"
+ src.lit = -1
+ processing_objects.Remove(src)
+ return
+ if(location)
+ location.hotspot_expose(700, 5)
+ return
dropped(mob/user as mob)
if(src.lit == 1)
- spawn(10)
- var/turf/location = get_turf(src)
- location.hotspot_expose(700, 5)
- src.lit = -1
- src.damtype = "brute"
- src.icon_state = "match_burnt"
- src.item_state = "cigoff"
- src.name = "Burnt match"
- src.desc = "A match that has been burnt"
- processing_objects.Remove(src)
+ src.lit = -1
+ src.damtype = "brute"
+ src.icon_state = "match_burnt"
+ src.item_state = "cigoff"
+ src.name = "Burnt match"
+ src.desc = "A match that has been burnt"
return ..()
-
-//////////////
-//MATCHBOXES//
-//////////////
-/obj/item/weapon/matchbox
- name = "Matchbox"
- desc = "A small box of Almost But Not Quite Plasma Premium Matches."
- icon = 'cigarettes.dmi'
- icon_state = "matchbox"
- item_state = "zippo"
- w_class = 1
- flags = TABLEPASS
- slot_flags = SLOT_BELT
- var/matchcount = 10
- w_class = 1.0
-
-
- attack_hand(mob/user as mob)
- if(user.r_hand == src || user.l_hand == src)
- if(src.matchcount <= 0)
- user << "\red You're out of matches. Shouldn't have wasted so many..."
- return
- else
- src.matchcount--
- var/obj/item/weapon/match/W = new /obj/item/weapon/match(user)
- user.put_in_hand(W)
- else
- return ..()
- if(src.matchcount <= 0)
- src.icon_state = "matchbox_empty"
- else if(src.matchcount <= 3)
- src.icon_state = "matchbox_almostempty"
- else if(src.matchcount <= 6)
- src.icon_state = "matchbox_almostfull"
- else
- src.icon_state = "matchbox"
- src.update_icon()
- return
-
-
- 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"
- processing_objects.Add(W)
- W.update_icon()
- return
-
-
-
///////////////////////
//CIGARETTES + CIGARS//
///////////////////////
/obj/item/clothing/mask/cigarette
- name = "Cigarette"
+ name = "cigarette"
desc = "A roll of tobacco and nicotine."
icon_state = "cigoff"
throw_speed = 0.5
item_state = "cigoff"
w_class = 1
body_parts_covered = null
+ attack_verb = list("burnt", "singed")
var/lit = 0
var/icon_on = "cigon" //Note - these are in masks.dmi not in cigarette.dmi
var/icon_off = "cigoff"
- var/icon_butt = "cigbutt"
+ var/type_butt = /obj/item/weapon/cigbutt
var/lastHolder = null
var/smoketime = 300
var/chem_volume = 15
- var/butt_count = 5 //count of butt sprite variations
/obj/item/clothing/mask/cigarette/New()
..()
@@ -160,6 +105,11 @@ ZIPPO
var/obj/item/weapon/match/M = W
if(M.lit > 0)
light("\red [user] lights their [name] with their [W].")
+
+ //can't think of any other way to update the overlays :<
+ user.update_inv_wear_mask(0)
+ user.update_inv_l_hand(0)
+ user.update_inv_r_hand(1)
return
@@ -205,14 +155,14 @@ ZIPPO
var/turf/location = get_turf(src)
src.smoketime--
if(src.smoketime < 1)
+ new type_butt(location)
+ processing_objects.Remove(src)
if(ismob(src.loc))
var/mob/living/M = src.loc
M << "\red Your [src.name] goes out."
- put_out()
- M.update_clothing()
- else
- put_out()
- processing_objects.Remove(src)
+ M.u_equip(src) //un-equip it so the overlays can update
+ M.update_icons()
+ del(src)
return
if(location)
location.hotspot_expose(700, 5)
@@ -229,19 +179,13 @@ ZIPPO
/obj/item/clothing/mask/cigarette/dropped(mob/user as mob)
if(src.lit == 1)
- src.visible_message("\red [user] calmly drops and treads on the lit [src], putting it out instantly.")
- put_out()
+ for(var/mob/O in viewers(user, null))
+ O.show_message(text("\red [] calmly drops and treads on the lit [], putting it out instantly.", user,src.name), 1)
+ new type_butt(loc)
+ processing_objects.Remove(src)
+ del(src)
return ..()
-/obj/item/clothing/mask/cigarette/proc/put_out()
- if (src.lit == -1)
- return
- src.lit = -1
- src.damtype = "brute"
- src.icon_state = icon_butt + "[rand(0,butt_count)]"
- src.item_state = icon_off
- src.desc = "A [src.name] butt."
- src.name = "[src.name] butt"
////////////
@@ -253,12 +197,11 @@ ZIPPO
icon_state = "cigaroff"
icon_on = "cigaron"
icon_off = "cigaroff"
- icon_butt = "cigarbutt"
+ type_butt = /obj/item/weapon/cigbutt
throw_speed = 0.5
item_state = "cigaroff"
smoketime = 1500
chem_volume = 20
- butt_count = 0
/obj/item/clothing/mask/cigarette/cigar/cohiba
name = "Cohiba Robusto Cigar"
@@ -279,7 +222,7 @@ ZIPPO
/obj/item/weapon/cigbutt
name = "cigarette butt"
desc = "A manky old cigarette butt."
- icon = 'masks.dmi'
+ icon = 'icons/obj/clothing/masks.dmi'
icon_state = "cigbutt"
w_class = 1
throwforce = 1
@@ -290,6 +233,12 @@ ZIPPO
icon_state = "cigarbutt"
+/obj/item/clothing/mask/cigarette/cigar/attackby(obj/item/weapon/W as obj, mob/user as mob)
+ if(istype(W, /obj/item/weapon/match))
+ ..()
+ else
+ user << "\red The [src] straight out REFUSES to be lit by such uncivilized means."
+
/////////////////
//SMOKING PIPES//
/////////////////
@@ -347,7 +296,7 @@ ZIPPO
var/turf/location = get_turf(src)
src.smoketime--
if(src.smoketime < 1)
- new /obj/effect/decal/ash(location)
+ new /obj/effect/decal/cleanable/ash(location)
if(ismob(src.loc))
var/mob/living/M = src.loc
M << "\red Your [src.name] goes out, and you empty the ash."
@@ -375,13 +324,12 @@ ZIPPO
user << "\blue You refill the pipe with tobacco."
smoketime = maxsmoketime
return
-/*
+
/obj/item/clothing/mask/pipe/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W, /obj/item/weapon/match))
..()
else
user << "\red The [src] straight out REFUSES to be lit by such means."
-*/// Yeah no. DMTG
/obj/item/clothing/mask/pipe/cobpipe
@@ -396,7 +344,7 @@ ZIPPO
/obj/item/weapon/cigpacket
name = "cigarette packet"
desc = "The most popular brand of Space Cigarettes, sponsors of the Space Olympics."
- icon = 'cigarettes.dmi'
+ icon = 'icons/obj/cigarettes.dmi'
icon_state = "cigpacket"
item_state = "cigpacket"
w_class = 1
@@ -408,7 +356,7 @@ ZIPPO
New()
..()
flags |= NOREACT
- create_reagents(15)//so people can inject cigarettes without opening a packet
+ create_reagents(15*cigcount)//so people can inject cigarettes without opening a packet, now with being able to inject the whole one
Del()
..()
@@ -426,10 +374,11 @@ ZIPPO
user << "\red You're out of cigs, shit! How you gonna get through the rest of the day..."
return
else
- cigcount--
var/obj/item/clothing/mask/cigarette/W = new /obj/item/clothing/mask/cigarette(user)
- reagents.trans_to(W, reagents.total_volume)
- user.put_in_hand(W)
+ reagents.trans_to(W, (reagents.total_volume/cigcount))
+ user.put_in_active_hand(W)
+ src.reagents.maximum_volume = 15*cigcount
+ cigcount--
else
return ..()
update_icon()
@@ -448,7 +397,7 @@ ZIPPO
/obj/item/weapon/lighter
name = "cheap lighter"
desc = "A cheap-as-free lighter."
- icon = 'items.dmi'
+ icon = 'icons/obj/items.dmi'
icon_state = "lighter-g"
item_state = "lighter-g"
var/icon_on = "lighter-g-on"
@@ -457,10 +406,11 @@ ZIPPO
throwforce = 4
flags = TABLEPASS | CONDUCT
slot_flags = SLOT_BELT
+ attack_verb = list("burnt", "singed")
var/lit = 0
/obj/item/weapon/lighter/zippo
- name = "\improper Zippo lighter"
+ name = "Zippo lighter"
desc = "The zippo."
icon_state = "zippo"
item_state = "zippo"
@@ -476,7 +426,7 @@ ZIPPO
/obj/item/weapon/lighter
- attack_self(mob/user)
+ attack_self(mob/living/user)
if(user.r_hand == src || user.l_hand == src)
if(!src.lit)
src.lit = 1
@@ -484,18 +434,18 @@ ZIPPO
src.item_state = icon_on
if( istype(src,/obj/item/weapon/lighter/zippo) )
for(var/mob/O in viewers(user, null))
- O.show_message(text("\red Without even breaking stride, \the [] flips open and lights \the [] in one smooth movement.", user, src), 1)
+ O.show_message(text("\red Without even breaking stride, [] flips open and lights the [] in one smooth movement.", user, src), 1)
else
if(prob(75))
for(var/mob/O in viewers(user, null))
- O.show_message("\red After a few attempts, \the [user] manages to light \the [src].", 1)
+ O.show_message("\red After a few attempts, [user] manages to light the [src].", 1)
else
user << "\red You burn yourself while lighting the lighter."
user.adjustFireLoss(5)
for(var/mob/O in viewers(user, null))
- O.show_message("\red After a few attempts, \the [user] manages to light \the [src], they however burn themself in the process.", 1)
+ O.show_message("\red After a few attempts, [user] manages to light the [src], they however burn their finger in the process.", 1)
- user.ul_SetLuminosity(user.LuminosityRed + 2, user.LuminosityGreen + 1, user.LuminosityBlue)
+ user.total_luminosity += 2
processing_objects.Add(src)
else
src.lit = 0
@@ -508,7 +458,7 @@ ZIPPO
for(var/mob/O in viewers(user, null))
O.show_message("\red [user] quietly shuts off the [src].", 1)
- user.ul_SetLuminosity(user.LuminosityRed - 2, user.LuminosityGreen - 1, user.LuminosityBlue)
+ user.total_luminosity -= 2
processing_objects.Remove(src)
else
return ..()
@@ -537,13 +487,13 @@ ZIPPO
pickup(mob/user)
if(lit)
- ul_SetLuminosity(0)
- user.ul_SetLuminosity(user.LuminosityRed + 2, user.LuminosityGreen + 1, user.LuminosityBlue)
+ src.sd_SetLuminosity(0)
+ user.total_luminosity += 2
return
dropped(mob/user)
if(lit)
- user.ul_SetLuminosity(user.LuminosityRed - 2, user.LuminosityGreen - 1, user.LuminosityBlue)
- ul_SetLuminosity(2,1,0)
+ user.total_luminosity -= 2
+ src.sd_SetLuminosity(2)
return
diff --git a/code/game/objects/items/weapons/clown_items.dm b/code/game/objects/items/weapons/clown_items.dm
index 7feaa76182..26310e1f72 100644
--- a/code/game/objects/items/weapons/clown_items.dm
+++ b/code/game/objects/items/weapons/clown_items.dm
@@ -12,56 +12,48 @@ BIKE HORN
var/mob/M = AM
if (istype(M, /mob/living/carbon/human) && (isobj(M:shoes) && M:shoes.flags&NOSLIP))
return
- if (istype(M, /mob/living/carbon/metroid)) //I mean they float, seriously. - Erthilo
- return
- M.pulling = null
+ M.stop_pulling()
M << "\blue You slipped on the [name]!"
- playsound(src.loc, 'slip.ogg', 50, 1, -3)
+ playsound(src.loc, 'sound/misc/slip.ogg', 50, 1, -3)
M.Stun(4)
M.Weaken(2)
-/obj/item/weapon/reagent_containers/food/snacks/grown/bluetomato/HasEntered(AM as mob|obj)
- if (istype(AM, /mob/living/carbon))
- var/mob/M = AM
- if (istype(M, /mob/living/carbon/human) && (isobj(M:shoes) && M:shoes.flags&NOSLIP))
- return
- if (istype(M, /mob/living/carbon/metroid))
- return
-
- M.pulling = null
- M << "\blue You slipped on the [name]!"
- playsound(src.loc, 'slip.ogg', 50, 1, -3)
- M.Stun(8)
- M.Weaken(5)
-
/obj/item/weapon/soap/HasEntered(AM as mob|obj) //EXACTLY the same as bananapeel for now, so it makes sense to put it in the same dm -- Urist
if (istype(AM, /mob/living/carbon))
var/mob/M = AM
if (istype(M, /mob/living/carbon/human) && (isobj(M:shoes) && M:shoes.flags&NOSLIP))
return
- if (istype(M, /mob/living/carbon/metroid))
- return
- M.pulling = null
+ M.stop_pulling()
M << "\blue You slipped on the [name]!"
- playsound(src.loc, 'slip.ogg', 50, 1, -3)
+ playsound(src.loc, 'sound/misc/slip.ogg', 50, 1, -3)
M.Stun(3)
M.Weaken(2)
/obj/item/weapon/soap/afterattack(atom/target, mob/user as mob)
- if(istype(target,/obj/effect/decal/cleanable))
- user << "\blue You scrub the [target.name] out."
+ //I couldn't feasibly fix the overlay bugs caused by cleaning items we are wearing.
+ //So this is a workaround. This also makes more sense from an IC standpoint. ~Carn
+ if(user.client && (target in user.client.screen))
+ user << "You need to take that [target.name] off before cleaning it."
+ else if(istype(target,/obj/effect/decal/cleanable))
+ user << "You scrub \the [target.name] out."
del(target)
else
- user << "\blue You clean the [target.name]."
+ user << "You clean \the [target.name]."
target.clean_blood()
return
+/obj/item/weapon/soap/attack(mob/target as mob, mob/user as mob)
+ if(target && user && ishuman(target) && ishuman(user) && !target.stat && !user.stat && user.zone_sel &&user.zone_sel.selecting == "mouth" )
+ user.visible_message("\red \the [user] washes \the [target]'s mouth out with soap!")
+ return
+ ..()
+
/obj/item/weapon/bikehorn/attack_self(mob/user as mob)
if (spam_flag == 0)
spam_flag = 1
- playsound(src.loc, 'bikehorn.ogg', 50, 1)
+ playsound(src.loc, 'sound/items/bikehorn.ogg', 50, 1)
src.add_fingerprint(user)
spawn(20)
spam_flag = 0
diff --git a/code/game/objects/items/weapons/dna_injector.dm b/code/game/objects/items/weapons/dna_injector.dm
index 5a2a96667a..972e842513 100644
--- a/code/game/objects/items/weapons/dna_injector.dm
+++ b/code/game/objects/items/weapons/dna_injector.dm
@@ -1,7 +1,7 @@
/obj/item/weapon/dnainjector
name = "DNA-Injector"
desc = "This injects the person with DNA."
- icon = 'items.dmi'
+ icon = 'icons/obj/items.dmi'
icon_state = "dnainjector"
var/dnatype = null
var/dna = null
@@ -15,12 +15,13 @@
var/uses = 1
var/nofail
var/is_bullet = 0
+ var/inuse = 0
/obj/item/weapon/dnainjector/attack_paw(mob/user as mob)
return attack_hand(user)
-/obj/item/weapon/dnainjector/proc/inject(mob/M as mob)
+/obj/item/weapon/dnainjector/proc/inject(mob/M as mob, mob/user as mob)
if(istype(M,/mob/living))
M.radiation += rand(20,50)
@@ -32,7 +33,6 @@
updateappearance(M, M.dna.uni_identity)
M.real_name = ue
M.name = ue
- M.dna.original_name = ue
uses--
else //unique enzymes? no
M.dna.uni_identity = dna
@@ -53,8 +53,7 @@
uses--
spawn(0)//this prevents the collapse of space-time continuum
- spawn(5)
- usr.update_clothing()
+ user.drop_from_inventory(src)
del(src)
return uses
@@ -71,54 +70,65 @@
if (user)
if (istype(M, /mob/living/carbon/human))
- var/obj/effect/equip_e/human/O = new /obj/effect/equip_e/human( )
- O.source = user
- O.target = M
- O.item = src
- O.s_loc = user.loc
- O.t_loc = M.loc
- O.place = "dnainjector"
- M.requests += O
- if (dnatype == "se")
- if (isblockon(getblock(dna, MONKEYBLOCK,3),MONKEYBLOCK) && istype(M, /mob/living/carbon/human))
- message_admins("[key_name_admin(user)] injected [key_name_admin(M)] with the [name] \red(MONKEY)")
- log_game("[key_name(user)] injected [key_name(M)] with the [name] (MONKEY)")
+ if(!inuse)
+ var/obj/effect/equip_e/human/O = new /obj/effect/equip_e/human( )
+ O.source = user
+ O.target = M
+ O.item = src
+ O.s_loc = user.loc
+ O.t_loc = M.loc
+ O.place = "dnainjector"
+ src.inuse = 1
+ spawn(50) // Not the best fix. There should be an failure proc, for /effect/equip_e/, which is called when the first initital checks fail
+ inuse = 0
+ M.requests += O
+ if (dnatype == "se")
+ if (isblockon(getblock(dna, 14,3),14) && istype(M, /mob/living/carbon/human))
+ message_admins("[key_name_admin(user)] injected [key_name_admin(M)] with the [name] \red(MONKEY)")
+ log_attack("[key_name(user)] injected [key_name(M)] with the [name] (MONKEY)")
+ else
+ // message_admins("[key_name_admin(user)] injected [key_name_admin(M)] with the [name]")
+ log_attack("[key_name(user)] injected [key_name(M)] with the [name]")
else
- message_admins("[key_name_admin(user)] injected [key_name_admin(M)] with the [name]")
- log_game("[key_name(user)] injected [key_name(M)] with the [name]")
- else
- message_admins("[key_name_admin(user)] injected [key_name_admin(M)] with the [name]")
- log_game("[key_name(user)] injected [key_name(M)] with the [name]")
+ // message_admins("[key_name_admin(user)] injected [key_name_admin(M)] with the [name]")
+ log_attack("[key_name(user)] injected [key_name(M)] with the [name]")
- spawn( 0 )
- O.process()
- user.update_clothing()
- return
+ spawn( 0 )
+ O.process()
+ return
else
- for(var/mob/O in viewers(M, null))
- O.show_message(text("\red [] has been injected with [] by [].", M, src, user), 1)
- //Foreach goto(192)
- if (!(istype(M, /mob/living/carbon/human) || istype(M, /mob/living/carbon/monkey)))
- user << "\red Apparently it didn't work."
- return
- if (dnatype == "se")
- if (isblockon(getblock(dna, 14,3),14) && istype(M, /mob/living/carbon/human))
- message_admins("[key_name_admin(user)] injected [key_name_admin(M)] with the [name] \red(MONKEY)")
- log_game("[key_name(user)] injected [key_name(M)] with the [name] (MONKEY)")
+ if(!inuse)
+
+ for(var/mob/O in viewers(M, null))
+ O.show_message(text("\red [] has been injected with [] by [].", M, src, user), 1)
+ //Foreach goto(192)
+ if (!(istype(M, /mob/living/carbon/human) || istype(M, /mob/living/carbon/monkey)))
+ user << "\red Apparently it didn't work."
+ return
+ if (dnatype == "se")
+ if (isblockon(getblock(dna, 14,3),14) && istype(M, /mob/living/carbon/human))
+ message_admins("[key_name_admin(user)] injected [key_name_admin(M)] with the [name] \red(MONKEY)")
+ log_game("[key_name(user)] injected [key_name(M)] with the [name] (MONKEY)")
+ else
+// message_admins("[key_name_admin(user)] injected [key_name_admin(M)] with the [name]")
+ log_game("[key_name(user)] injected [key_name(M)] with the [name]")
else
- message_admins("[key_name_admin(user)] injected [key_name_admin(M)] with the [name]")
+// message_admins("[key_name_admin(user)] injected [key_name_admin(M)] with the [name]")
log_game("[key_name(user)] injected [key_name(M)] with the [name]")
- else
- message_admins("[key_name_admin(user)] injected [key_name_admin(M)] with the [name]")
- log_game("[key_name(user)] injected [key_name(M)] with the [name]")
- inject(M)//Now we actually do the heavy lifting.
- /*
- A user injecting themselves could mean their own transformation and deletion of mob.
- I don't have the time to figure out how this code works so this will do for now.
- I did rearrange things a bit.
- */
- if(!isnull(user))//If the user still exists. Their mob may not.
- user.show_message(text("\red You inject [M]"))
+ inuse = 1
+ inject(M, user)//Now we actually do the heavy lifting.
+ spawn(50)
+ inuse = 0
+ /*
+ A user injecting themselves could mean their own transformation and deletion of mob.
+ I don't have the time to figure out how this code works so this will do for now.
+ I did rearrange things a bit.
+ */
+ if(user)//If the user still exists. Their mob may not.
+ if(M)//Runtime fix: If the mob doesn't exist, mob.name doesnt work. - Nodrak
+ user.show_message(text("\red You inject [M.name]"))
+ else
+ user.show_message(text("\red You finish the injection."))
return
diff --git a/code/game/objects/items/weapons/explosives.dm b/code/game/objects/items/weapons/explosives.dm
index 6ad3f7eda1..20f860dfb1 100644
--- a/code/game/objects/items/weapons/explosives.dm
+++ b/code/game/objects/items/weapons/explosives.dm
@@ -8,12 +8,15 @@
/obj/item/weapon/plastique/afterattack(atom/target as obj|turf, mob/user as mob, flag)
if (!flag)
return
- if (istype(target, /turf/unsimulated) || istype(target, /turf/simulated/shuttle) || istype(target, /obj/item/weapon/storage/) || ismob(target))
+ if (istype(target, /turf/unsimulated) || istype(target, /turf/simulated/shuttle) || istype(target, /obj/item/weapon/storage/))
return
user << "Planting explosives..."
-/* if(ismob(target))
+ if(ismob(target))
user.attack_log += "\[[time_stamp()]\] [user.real_name] tried planting [name] on [target:real_name] ([target:ckey])"
- user.visible_message("\red [user.name] is trying to plant some kind of explosive on [target.name]!") */
+ log_attack(" [user.real_name] ([user.ckey]) tried planting [name] on [target:real_name] ([target:ckey])")
+ user.visible_message("\red [user.name] is trying to plant some kind of explosive on [target.name]!")
+
+
if(do_after(user, 50) && in_range(user, target))
user.drop_item()
target = target
@@ -24,12 +27,7 @@
if (ismob(target))
target:attack_log += "\[[time_stamp()]\] Had the [name] planted on them by [user.real_name] ([user.ckey])"
user.visible_message("\red [user.name] finished planting an explosive on [target.name]!")
- log_admin("ATTACK: [user] ([user.ckey]) planted [src] on [target] ([target:ckey]).")
- message_admins("ATTACK: [user] ([user.ckey]) planted [src] on [target] ([target:ckey]).")
- log_attack(" [user.real_name] ([user.ckey]) tried planting [name] on [target:real_name] ([target:ckey])")
- target.overlays += image('assemblies.dmi', "plastic-explosive2")
- log_admin("[user] ([user.ckey]) has planted a [src].")
- message_admins("[user] ([user.ckey]) planted a [src].")
+ target.overlays += image('icons/obj/assemblies.dmi', "plastic-explosive2")
user << "Bomb has been planted. Timer counting down from [timer]."
spawn(timer*10)
if(target)
diff --git a/code/game/objects/items/weapons/flamethrower.dm b/code/game/objects/items/weapons/flamethrower.dm
index a20c6a20c7..cee6adb44c 100644
--- a/code/game/objects/items/weapons/flamethrower.dm
+++ b/code/game/objects/items/weapons/flamethrower.dm
@@ -1,4 +1,4 @@
-//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:05
+//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32
/obj/item/weapon/flamethrower/full/New(var/loc)
..()
@@ -14,7 +14,7 @@
/obj/item/weapon/flamethrower
name = "flamethrower"
- icon = 'flamethrower.dmi'
+ icon = 'icons/obj/flamethrower.dmi'
icon_state = "flamethrowerbase"
item_state = "flamethrower_0"
desc = "You are a firestarter!"
@@ -134,7 +134,7 @@
for (var/mob/O in viewers(user, null))
O << "\red [user] has used the analyzer on \icon[icon]"
var/pressure = src.ptank.air_contents.return_pressure()
- var/total_moles = src.ptank.air_contents.total_moles
+ var/total_moles = src.ptank.air_contents.total_moles()
user << "\blue Results of analysis of \icon[icon]"
if (total_moles>0)
@@ -193,7 +193,7 @@
damtype = "brute"
if (href_list["amount"])
src.throw_amount = src.throw_amount + text2num(href_list["amount"])
- src.throw_amount = max(90,min(300,src.throw_amount))
+ src.throw_amount = max(50,min(5000,src.throw_amount))
if (href_list["remove"])
if(!src.ptank) return
var/obj/item/weapon/tank/plasma/A = src.ptank
@@ -237,10 +237,8 @@
/obj/item/weapon/flamethrower/proc/ignite_turf(turf/target)
//TODO: DEFERRED Consider checking to make sure tank pressure is high enough before doing this...
//Transfer 5% of current tank air contents to turf
- var/datum/gas_mixture/air_transfer = ptank.air_contents.remove_ratio(0.02*(throw_amount/100))
- //air_transfer.toxins = air_transfer.toxins * 5 // This is me not comprehending the air system. I realize this is retarded and I could probably make it work without fucking it up like this, but there you have it. -- TLE
- new/obj/liquid_fuel/flamethrower_fuel(target,air_transfer.toxins,get_dir(loc,target))
- air_transfer.toxins = 0
+ var/datum/gas_mixture/air_transfer = ptank.air_contents.remove_ratio(0.05)
+ air_transfer.toxins = air_transfer.toxins * 5 // This is me not comprehending the air system. I realize this is retarded and I could probably make it work without fucking it up like this, but there you have it. -- TLE
target.assume_air(air_transfer)
//Burn it based on transfered gas
//target.hotspot_expose(part4.air_contents.temperature*2,300)
diff --git a/code/game/objects/items/weapons/grenades.dm b/code/game/objects/items/weapons/grenades.dm
deleted file mode 100644
index aee3e1a499..0000000000
--- a/code/game/objects/items/weapons/grenades.dm
+++ /dev/null
@@ -1,526 +0,0 @@
-/*
-CONTAINS:
-EMP GRENADE
-FLASHBANG
-CRITTER GRENADE
-
-*/
-
-/obj/item/weapon/empgrenade
- desc = "It is set to detonate in 5 seconds."
- name = "emp grenade"
- w_class = 2.0
- icon = 'device.dmi'
- icon_state = "emp"
- item_state = "emp"
- throw_speed = 4
- throw_range = 20
- flags = FPRINT | TABLEPASS | CONDUCT
- slot_flags = SLOT_BELT
- origin_tech = "materials=2;magnets=3"
- var/active = 0
- var/det_time = 50
-
- proc/prime()
- return
-
- proc/clown_check(var/mob/living/user)
- return
-
- afterattack(atom/target as mob|obj|turf|area, mob/user as mob)
- if (istype(target, /obj/item/weapon/storage)) return ..() // Trying to put it in a full container
- if (istype(target, /obj/item/weapon/gun/grenadelauncher)) return ..()
- if((user.equipped() == src)&&(!active)&&(clown_check(user)))
- user << "\red You prime the emp grenade! [det_time/10] seconds!"
- src.active = 1
- src.icon_state = "empar"
- playsound(src.loc, 'armbomb.ogg', 75, 1, -3)
- spawn( src.det_time )
- prime()
- return
- user.dir = get_dir(user, target)
- user.drop_item()
- var/t = (isturf(target) ? target : target.loc)
- walk_towards(src, t, 3)
- return
-
-
- attack_self(mob/user as mob)
- if(!active)
- if(clown_check(user))
- user << "\red You prime the EMP grenade! [det_time/10] seconds!"
- src.active = 1
- src.icon_state = "empar"
- add_fingerprint(user)
- spawn(src.det_time)
- prime()
- return
- return
-
-
- prime()
- playsound(src.loc, 'Welder2.ogg', 25, 1)
- var/turf/T = get_turf(src)
- if(T)
- T.hotspot_expose(700,125)
- if(empulse(src, 5, 7))
- del(src)
- return
-
-
- clown_check(var/mob/living/user)
- if((CLUMSY in user.mutations) && prob(50))
- user << "\red Huh? How does this thing work?!"
- src.active = 1
- src.icon_state = "empar"
- playsound(src.loc, 'armbomb.ogg', 75, 1, -3)
- spawn( 5 )
- prime()
- return 0
- return 1
-
-
-
-/****************************Flashbang***********************************************/
-/obj/item/weapon/flashbang
- desc = "It is set to detonate in 3 seconds."
- name = "flashbang"
- icon = 'grenade.dmi'
- icon_state = "flashbang"
- w_class = 2.0
- item_state = "flashbang"
- throw_speed = 4
- throw_range = 20
- flags = FPRINT | TABLEPASS | CONDUCT
- slot_flags = SLOT_BELT
- origin_tech = "materials=2;combat=1"
- var/active = 0
- var/det_time = 30
- var/banglet = 0
-
- proc/bang(var/turf/T , var/mob/living/carbon/M)
- return
-
- proc/prime()
- return
-
- proc/clown_check(var/mob/living/user)
- return
-
- attackby(obj/item/weapon/W as obj, mob/user as mob)
- if (isscrewdriver(W))
- switch(src.det_time)
- if ("1")
- src.det_time = 30
- user.show_message("\blue You set the flashbang for 3 second detonation time.")
- src.desc = "It is set to detonate in 3 seconds."
- if ("30")
- src.det_time = 100
- user.show_message("\blue You set the flashbang for 10 second detonation time.")
- src.desc = "It is set to detonate in 10 seconds."
- if ("100")
- src.det_time = 1
- user.show_message("\blue You set the flashbang for instant detonation.")
- src.desc = "It is set to detonate instantly."
- src.add_fingerprint(user)
- ..()
- return
-
-
- afterattack(atom/target as mob|obj|turf|area, mob/user as mob)
- if (istype(target, /obj/item/weapon/storage)) return ..() // Trying to put it in a full container
- if (istype(target, /obj/item/weapon/gun/grenadelauncher)) return ..()
- if((user.equipped() == src)&&(!active)&&(clown_check(user)))
- user << "\red You prime the flashbang! [det_time/10] seconds!"
-
- log_attack("[user.name] ([user.ckey]) primed a flashbang.")
- log_admin("ATTACK: [user] ([user.ckey]) primed a flashbang.")
- message_admins("ATTACK: [user] ([user.ckey]) primed a flashbang.")
-
- src.active = 1
- src.icon_state = "flashbang1"
- playsound(src.loc, 'armbomb.ogg', 75, 1, -3)
- spawn(src.det_time)
- prime()
- return
- user.dir = get_dir(user, target)
- user.drop_item()
- var/t = (isturf(target) ? target : target.loc)
- walk_towards(src, t, 3)
- return
-
-
- attack_paw(mob/user as mob)
- return src.attack_hand(user)
-
-
- attack_hand()
- walk(src, null, null)
- ..()
- return
-
- bang(var/turf/T , var/mob/living/carbon/M) // Added a new proc called 'bang' that takes a location and a person to be banged.
- if (locate(/obj/item/weapon/cloaking_device, M)) // Called during the loop that bangs people in lockers/containers and when banging
- for(var/obj/item/weapon/cloaking_device/S in M) // people in normal view. Could theroetically be called during other explosions.
- S.active = 0 // -- Polymorph
- S.icon_state = "shield0"
-
- M << "\red BANG"
- playsound(src.loc, 'bang.ogg', 25, 1)
-
-//Checking for protections
- var/eye_safety = 0
- var/ear_safety = 0
- if(iscarbon(M))
- eye_safety = M.eyecheck()
- if(ishuman(M))
- if(istype(M:l_ear, /obj/item/clothing/ears/earmuffs) || istype(M:r_ear, /obj/item/clothing/ears/earmuffs))
- ear_safety += 2
- if(HULK in M.mutations)
- ear_safety += 1
- if(istype(M:head, /obj/item/clothing/head/helmet))
- ear_safety += 1
-
-//Flashing everyone
- if(eye_safety < 1)
- flick("e_flash", M.flash)
- M.eye_stat += rand(1, 3)
- M.Stun(2)
- M.Weaken(10)
-
-
-
-//Now applying sound
- if((get_dist(M, T) <= 2 || src.loc == M.loc || src.loc == M))
- if(ear_safety > 0)
- M.Stun(2)
- M.Weaken(1)
- else
- M.Stun(10)
- M.Weaken(3)
- if ((prob(14) || (M == src.loc && prob(70))))
- M.ear_damage += rand(1, 10)
- else
- M.ear_damage += rand(0, 5)
- M.ear_deaf = max(M.ear_deaf,15)
-
- else if(get_dist(M, T) <= 5)
- if(!ear_safety)
- M.Stun(8)
- M.ear_damage += rand(0, 3)
- M.ear_deaf = max(M.ear_deaf,10)
-
- else if(!ear_safety)
- M.Stun(4)
- M.ear_damage += rand(0, 1)
- M.ear_deaf = max(M.ear_deaf,5)
-
-//This really should be in mob not every check
- if (M.eye_stat >= 20)
- M << "\red Your eyes start to burn badly!"
- M.disabilities |= 1
- if(!banglet && !(istype(src , /obj/item/weapon/flashbang/clusterbang)))
- if (prob(M.eye_stat - 20 + 1))
- M << "\red You can't see anything!"
- M.disabilities |= 128
- if (M.ear_damage >= 15)
- M << "\red Your ears start to ring badly!"
- if(!banglet && !(istype(src , /obj/item/weapon/flashbang/clusterbang)))
- if (prob(M.ear_damage - 10 + 5))
- M << "\red You can't hear anything!"
- M.disabilities |= 32
- else
- if (M.ear_damage >= 5)
- M << "\red Your ears start to ring!"
-
- prime() // Prime now just handles the two loops that query for people in lockers and people who can see it.
- var/turf/T = get_turf(src)
- if(T)
- T.hotspot_expose(700,125)
-
- for(var/obj/structure/closet/L in view(T, null))
- if(locate(/mob/living/carbon/, L))
- for(var/mob/living/carbon/M in L)
- bang(T, M)
-
-
- for(var/mob/living/carbon/M in viewers(T, null))
- bang(T, M)
-
- for(var/obj/effect/blob/B in view(8,T)) //Blob damage here
- var/damage = round(30/(get_dist(B,T)+1))
- B.health -= damage
- B.update()
- del(src)
- return
-
-
- attack_self(mob/user as mob)
- if(!active)
- if(clown_check(user))
- log_attack("[user.name] ([user.ckey]) primed a flashbang.")
- log_admin("ATTACK: [user] ([user.ckey]) primed a flashbang.")
- message_admins("ATTACK: [user] ([user.ckey]) primed a flashbang.")
- user << "\red You prime the flashbang! [det_time/10] seconds!"
- src.active = 1
- src.icon_state = "flashbang1"
- add_fingerprint(user)
- spawn( src.det_time )
- prime()
- return
- return
-
-
- attack_hand()
- walk(src, null, null)
- ..()
- return
-
-
- clown_check(var/mob/living/user)
- if ((CLUMSY in user.mutations) && prob(50))
- user << "\red Huh? How does this thing work?!"
- src.active = 1
- src.icon_state = "flashbang1"
- playsound(src.loc, 'armbomb.ogg', 75, 1, -3)
- spawn( 5 )
- prime()
- return 0
- return 1
-
-/obj/item/weapon/flashbang/clusterbang
- desc = "Use of this weapon may constiute a war crime in your area, consult your local captain."
- name = "clusterbang"
- icon = 'grenade.dmi'
- icon_state = "clusterbang"
- var/child = 0
-
- attack_self(mob/user as mob)
- if(!active)
- //world << "cluster attack self"
- user << "\red You prime the clusterbang! [det_time/10] seconds!"
- log_attack("[user.name] ([user.ckey]) primed a [src].")
- log_admin("ATTACK: [user] ([user.ckey]) primed a [src].")
- message_admins("ATTACK: [user] ([user.ckey]) primed a [src].")
- src.active = 1
- src.icon_state = "clusterbang1"
- playsound(src.loc, 'armbomb.ogg', 75, 1, -3)
- spawn(src.det_time)
- arm(user)
- return
-
- afterattack(atom/target as mob|obj|turf|area, mob/user as mob)
- if (istype(target, /obj/item/weapon/storage)) return ..() // Trying to put it in a full container
- if (istype(target, /obj/item/weapon/gun/grenadelauncher)) return ..()
- if((user.equipped() == src)&&(!active))
- //world << "cluster after attack"
- arm(user)
- user.dir = get_dir(user, target)
- user.drop_item()
- var/t = (isturf(target) ? target : target.loc)
- walk_towards(src, t, 3)
- return
-
-/obj/item/weapon/flashbang/clusterbang/proc/arm(mob/user as mob)
-
- //world << "Armed!"
- var/numspawned = rand(4,8)
-// world << numspawned
- var/again = 0
- if(!child)
- for(var/more = numspawned,more > 0,more--)
- if(prob(35))
- again++
- numspawned --
-
- for(,numspawned > 0, numspawned--)
- //world << "Spawned Flashbang!"
- spawn(0)
- var/obj/item/weapon/flashbang/F = new /obj/item/weapon/flashbang(src)
- F.loc = src.loc
- F.icon_state = "flashbang1"
- playsound(src.loc, 'armbomb.ogg', 75, 1, -3)
- F.active = 1
- F.banglet = 1
- var/stepdist = rand(1,3)
- walk_away(F,src,stepdist)
- var/dettime = rand(15,60)
- spawn(dettime)
- F.prime()
-
- for(,again > 0, again--)
- //world << "Spawned CFlashbang!"
- spawn(0)
- var/obj/item/weapon/flashbang/clusterbang/F = new /obj/item/weapon/flashbang/clusterbang(src)
- F.loc = src.loc
- F.active = 1
- F.child = 1
- F.icon_state = "clusterbang1"
- var/stepdist = rand(1,4)
- walk_away(F,src,stepdist)
- spawn(30)
- F.arm()
-
- spawn(70)
- prime()
-
- return
-
-
-
-/****************************Critter Grenades***********************************************/
-
-
-/obj/item/weapon/spawnergrenade
- desc = "It is set to detonate in 3 seconds. It will unleash unleash an unspecified anomaly into the vicinity."
- name = "delivery grenade"
- icon = 'grenade.dmi'
- icon_state = "delivery"
- w_class = 2.0
- item_state = "flashbang"
- throw_speed = 4
- throw_range = 20
- flags = FPRINT | TABLEPASS | CONDUCT
- slot_flags = SLOT_BELT
- origin_tech = "materials=3;magnets=4"
- var/active = 0
- var/det_time = 30
- var/banglet = 0
- var/spawner_type = null // must be an object path
- var/deliveryamt = 1 // amount of type to deliver
-
-
- proc/prime()
- return
-
- proc/clown_check(var/mob/living/user)
- return
-
- attackby(obj/item/weapon/W as obj, mob/user as mob)
- if (isscrewdriver(W))
- switch(src.det_time)
- if ("1")
- src.det_time = 30
- user.show_message("\blue You set the delivery grenade for 3 second detonation time.")
- src.desc = "It is set to detonate in 3 seconds."
- if ("30")
- src.det_time = 100
- user.show_message("\blue You set the delivery grenade for 10 second detonation time.")
- src.desc = "It is set to detonate in 10 seconds."
- if ("100")
- src.det_time = 1
- user.show_message("\blue You set the delivery grenade for instant detonation.")
- src.desc = "It is set to detonate instantly."
- src.add_fingerprint(user)
- ..()
- return
-
-
- afterattack(atom/target as mob|obj|turf|area, mob/user as mob)
- if (istype(target, /obj/item/weapon/storage)) return ..() // Trying to put it in a full container
- if (istype(target, /obj/item/weapon/gun/grenadelauncher)) return ..()
- if((user.equipped() == src)&&(!active)&&(clown_check(user)))
- user << "\red You prime the delivery grenade! [det_time/10] seconds!"
- src.active = 1
- src.icon_state = "delivery1"
- playsound(src.loc, 'armbomb.ogg', 75, 1, -3)
- spawn(src.det_time)
- prime()
- return
- user.dir = get_dir(user, target)
- user.drop_item()
- var/t = (isturf(target) ? target : target.loc)
- walk_towards(src, t, 3)
- return
-
-
- attack_paw(mob/user as mob)
- return src.attack_hand(user)
-
-
- attack_hand()
- walk(src, null, null)
- ..()
- return
-
- prime() // Prime now just handles the two loops that query for people in lockers and people who can see it.
-
- if(spawner_type && deliveryamt)
- // Make a quick flash
- var/turf/T = get_turf(src)
- playsound(T, 'phasein.ogg', 100, 1)
- for(var/mob/living/carbon/human/M in viewers(T, null))
- if(M:eyecheck() <= 0)
- flick("e_flash", M.flash) // flash dose faggots
-
- for(var/i=1, i<=deliveryamt, i++)
- var/atom/movable/x = new spawner_type
- x.loc = T
- if(prob(50))
- for(var/j = 1, j <= rand(1, 3), j++)
- step(x, pick(NORTH,SOUTH,EAST,WEST))
-
- // Spawn some hostile syndicate critters
- if(istype(x, /obj/effect/critter))
- var/obj/effect/critter/C = x
-
- C.atkcarbon = 1
- C.atksilicon = 1
- C.atkmech = 0
- C.atksynd = 0
- C.aggressive = 1
-
- del(src)
- return
-
-
- attack_self(mob/user as mob)
- if(!active)
- if(clown_check(user))
- user << "\red You prime the delivery grenade! [det_time/10] seconds!"
- src.active = 1
- src.icon_state = "delivery1"
- add_fingerprint(user)
- spawn( src.det_time )
- prime()
- return
- return
-
-
- attack_hand()
- walk(src, null, null)
- ..()
- return
-
-
- clown_check(var/mob/living/user)
- if ((CLUMSY in user.mutations) && prob(50))
- user << "\red Huh? How does this thing work?!"
- src.active = 1
- src.icon_state = "delivery1"
- playsound(src.loc, 'armbomb.ogg', 75, 1, -3)
- spawn( 5 )
- prime()
- return 0
- return 1
-
-/obj/item/weapon/spawnergrenade/manhacks
- name = "manhack delivery grenade"
- spawner_type = /obj/effect/critter/manhack
- deliveryamt = 5
- origin_tech = "materials=3;magnets=4;syndicate=4"
-
-/obj/item/weapon/spawnergrenade/carp
- name = "carp delivery grenade"
- spawner_type = /mob/living/simple_animal/carp
- deliveryamt = 5
- origin_tech = "materials=3;magnets=4;syndicate=4"
-
-/obj/item/weapon/spawnergrenade/elitecarp
- name = "elite carp delivery grenade"
- spawner_type = /mob/living/simple_animal/carp/elite
- deliveryamt = 2
- origin_tech = "materials=3;magnets=4;syndicate=4"
-
-
-
diff --git a/code/game/objects/items/weapons/hand_lablers.dm b/code/game/objects/items/weapons/hand_lablers.dm
deleted file mode 100644
index 96dfa75d8f..0000000000
--- a/code/game/objects/items/weapons/hand_lablers.dm
+++ /dev/null
@@ -1,97 +0,0 @@
-/atom/var/list/labels
-
-//how to place label:
-//1: set label in labeller
-//2: pick up label object
-//3: click on label with the hand the label is in
-//4: place label on something
-//how to remove label
-//1: use labeller on item
-//2: select label to remove (if there is >1 label anyway, if there is only one it will just remove that one)
-/obj/item/weapon/hand_labeler
- icon = 'items.dmi'
- icon_state = "labeler"
- item_state = "flight"
- name = "Hand labeler"
-
-/obj/item/weapon/hand_labeler/afterattack(atom/A as obj|mob, mob/user as mob)
- if(A==loc) // if placing the labeller into something (e.g. backpack)
- return // don't remove any labels
- if(!A.labels)
- return
- if(A.labels.len == 1)
- var/t = A.labels[1]
- A.name = copytext(A.name,1,lentext(A.name) - (lentext(t) + 2))
- A.labels -= t
- return
- if(A.labels.len > 1)
- var/t = input(user, "Which label do you want to remove?") as null|anything in A.labels
- var/i = 1
- for(, i <= labels.len, i++) //find the thing of the label to remove
- if(A.labels[i] == t)
- break
- if(i != A.labels.len) //if we arent removing the last label
- var/k = 0
- for(var/j = i+1, j <= A.labels.len, j++)
- k += lentext(A.labels[j]) + 3 // 3 = " (" + ")"
- var/labelend = lentext(A.name) - (k-1)
- var/labelstart = labelend - (lentext(t)+3)
- A.name = addtext(copytext(A.name,1,labelstart),copytext(A.name,labelend,0))
- A.labels -= t
- return
- if(i == A.labels.len) //if this is the last label we don't need to find the length of the stuff infront of it
- var/labelstart = lentext(A.name) - (lentext(t)+3)
- A.name = copytext(A.name,1,labelstart)
- A.labels -= t
- return
- user << "\red Something broke. Please report this (that you were trying to remove a label and what the full name of the item was) to an admin or something."
-
-/obj/item/weapon/hand_labeler/attack_self(mob/user as mob)
- var/str = input(usr,"Label text?","Set label","")
- if(!str || !length(str))
- usr << "\red Invalid text."
- return
- if(length(str) > 64)
- usr << "\red Text too long."
- return
- var/obj/item/weapon/label/A = new/obj/item/weapon/label
- A.label = str
- A.loc = user.loc
- A.name += " - '[str]'"
-
-/obj/item/weapon/label
- icon = 'items.dmi'
- icon_state = "label"
- name = "Label"
- w_class = 2
- var/label = ""
- var/backing = 1 //now with added being able to be put on table-ness!
-
-/obj/item/weapon/label/afterattack(atom/A, mob/user as mob)
- if(!backing)
- if(!label || !length(label))
- user << "\red This label doesn't have any text! How did this happen?!?"
- return
- if(length(A.name) + length(label) > 64) //this needs to be made bigger too. maybe number of labels instead of a fixed length
- user << "\red Label too big."
- return
- if(ishuman(A))
- user << "\red You can't label humans."
- return
- if(!A.labels)
- A.labels = new()
- for(var/i = 1, i < A.labels.len, i++)
- if(label == A.labels[i])
- user << "\red [A] already has that label!"
- return
-
- for(var/mob/M in viewers())
- M << "\blue [user] puts a label on [A]."
- A.name = "[A.name] ([label])"
- A.labels += label
- del(src)
-
-/obj/item/weapon/label/attack_self(mob/user as mob) //here so you can put them on tables and stuff more easily to stop them from being all over the floor until you want to use them
- if(backing)
- backing = 0
- user << "\blue You remove the backing from the label." //now it will stick to things
\ No newline at end of file
diff --git a/code/game/objects/items/weapons/hydroponics.dm b/code/game/objects/items/weapons/hydroponics.dm
index 2587292417..d538619298 100644
--- a/code/game/objects/items/weapons/hydroponics.dm
+++ b/code/game/objects/items/weapons/hydroponics.dm
@@ -9,84 +9,22 @@ Craftables (Cob pipes, potato batteries, pumpkinheads)
*/
-// Plant-B-Gone
-/obj/item/weapon/plantbgone/New()
- var/datum/reagents/R = new/datum/reagents(100) // 100 units of solution
- reagents = R
- R.my_atom = src
- R.add_reagent("plantbgone", 100)
-
-/obj/item/weapon/plantbgone/attack(mob/living/carbon/human/M as mob, mob/user as mob)
- return
-
-/obj/item/weapon/plantbgone/afterattack(atom/A as mob|obj, mob/user as mob)
-
- if (istype(A, /obj/item/weapon/storage/backpack ))
- return
-
- else if (locate (/obj/structure/table, src.loc))
- return
-
- else if (src.reagents.total_volume < 1)
- src.empty = 1
- user << "\blue Add more Plant-B-Gone mixture!"
- return
-
- else
- src.empty = 0
-
- if (istype(A, /obj/machinery/hydroponics)) // We are targeting hydrotray
- return
-
- else if (istype(A, /obj/effect/blob)) // blob damage in blob code
- return
-
- else
- var/obj/effect/decal/D = new/obj/effect/decal/(get_turf(src)) // Targeting elsewhere
- D.name = "chemicals"
- D.icon = 'chemical.dmi'
- D.icon_state = "weedpuff"
- D.create_reagents(5)
- src.reagents.trans_to(D, 5) // 5 units of solution used at a time => 20 uses
- playsound(src.loc, 'spray3.ogg', 50, 1, -6)
-
- spawn(0)
- for(var/i=0, i<3, i++) // Max range = 3 tiles
- step_towards(D,A) // Moves towards target as normally (not thru walls)
- D.reagents.reaction(get_turf(D))
- for(var/atom/T in get_turf(D))
- D.reagents.reaction(T)
- sleep(4)
- del(D)
-
-
- if((src.reagents.has_reagent("pacid")) || (src.reagents.has_reagent("lube"))) // Messages admins if someone sprays polyacid or space lube from a Plant-B-Gone bottle.
- message_admins("[key_name_admin(user)] fired Polyacid/Space lube from a PlantBGone bottle.") // Polymorph
- log_game("[key_name(user)] fired Polyacid/Space lube from a PlantBGone bottle.")
-
-
- return
-
-/obj/item/weapon/plantbgone/examine()
- set src in usr
- usr << text("\icon[] [] units of Plant-B-Gone left!", src, src.reagents.total_volume)
- ..()
- return
// Sunflower
/obj/item/weapon/grown/sunflower/attack(mob/M as mob, mob/user as mob)
M << " [user] smacks you with a sunflower!FLOWER POWER"
user << " Your sunflower's FLOWER POWER strikes [M]"
-// Nettle
+// Nettle
/obj/item/weapon/grown/nettle/pickup(mob/living/carbon/human/user as mob)
if(!user.gloves)
user << "\red The nettle burns your bare hand!"
- if(hasorgans(user))
+ if(istype(user, /mob/living/carbon/human))
var/organ = ((user.hand ? "l_":"r_") + "arm")
- var/datum/organ/external/affecting = user:get_organ(organ)
- affecting.take_damage(0,force)
+ var/datum/organ/external/affecting = user.get_organ(organ)
+ if(affecting.take_damage(0,force))
+ user.UpdateDamageIcon()
else
user.take_organ_damage(0,force)
@@ -103,13 +41,13 @@ Craftables (Cob pipes, potato batteries, pumpkinheads)
// Deathnettle
-
/obj/item/weapon/grown/deathnettle/pickup(mob/living/carbon/human/user as mob)
if(!user.gloves)
- if(hasorgans(user))
+ if(istype(user, /mob/living/carbon/human))
var/organ = ((user.hand ? "l_":"r_") + "arm")
- var/datum/organ/external/affecting = user:get_organ(organ)
- affecting.take_damage(0,force)
+ var/datum/organ/external/affecting = user.get_organ(organ)
+ if(affecting.take_damage(0,force))
+ user.UpdateDamageIcon()
else
user.take_organ_damage(0,force)
if(prob(50))
@@ -123,8 +61,6 @@ Craftables (Cob pipes, potato batteries, pumpkinheads)
M.attack_log += text("\[[time_stamp()]\] Had the [src.name] used on them by [user.name] ([user.ckey])")
user.attack_log += text("\[[time_stamp()]\] Used the [src.name] on [M.name] ([M.ckey])")
- log_admin("ATTACK: [user] ([user.ckey]) attacked [M] ([M.ckey]) with [src].")
- message_admins("ATTACK: [user] ([user.ckey]) attacked [M] ([M.ckey]) with [src].")
log_attack(" [user.name] ([user.ckey]) used the [src.name] on [M.name] ([M.ckey])")
M.eye_blurry += force/7
@@ -145,8 +81,8 @@ Craftables (Cob pipes, potato batteries, pumpkinheads)
potency = newValue
force = round((5+potency/2.5), 1)
-//Crafting
+//Crafting
/obj/item/weapon/corncob/attackby(obj/item/weapon/W as obj, mob/user as mob)
..()
if(istype(W, /obj/item/weapon/circular_saw) || istype(W, /obj/item/weapon/hatchet) || istype(W, /obj/item/weapon/kitchen/utensil/knife))
@@ -154,22 +90,3 @@ Craftables (Cob pipes, potato batteries, pumpkinheads)
new /obj/item/clothing/mask/pipe/cobpipe (user.loc)
del(src)
return
-
-/obj/item/weapon/reagent_containers/food/snacks/grown/pumpkin/attackby(obj/item/weapon/W as obj, mob/user as mob)
- ..()
- if(istype(W, /obj/item/weapon/circular_saw) || istype(W, /obj/item/weapon/hatchet) || istype(W, /obj/item/weapon/twohanded/fireaxe) || istype(W, /obj/item/weapon/kitchen/utensil/knife) || istype(W, /obj/item/weapon/melee/energy))
- user.show_message("You carve a face into [src]!", 1)
- new /obj/item/clothing/head/helmet/hardhat/pumpkinhead (user.loc)
- del(src)
- return
-
-/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/weapon/cable_coil))
- if(W:amount >= 5)
- W:amount -= 5
- if(!W:amount) del(W)
- user << "You add some cable to the potato and slide it inside the battery encasing."
- new /obj/item/weapon/cell/potato(user.loc)
- del(src)
- return
\ No newline at end of file
diff --git a/code/game/objects/items/weapons/implants/implant.dm b/code/game/objects/items/weapons/implants/implant.dm
index 934b7c33c5..de4773218f 100644
--- a/code/game/objects/items/weapons/implants/implant.dm
+++ b/code/game/objects/items/weapons/implants/implant.dm
@@ -1,8 +1,5 @@
/obj/item/weapon/implant
name = "implant"
- desc = "An implant. Not usually seen outside a body."
- icon = 'items.dmi'
- icon_state = "implant"
var/implanted = null
var/mob/imp_in = null
color = "b"
@@ -14,14 +11,15 @@
proc/activate()
return
- proc/implanted(source as mob)
- return
+ // What does the implant do upon injection?
+ // return 0 if the implant fails (ex. Revhead and loyalty implant.)
+ // return 1 if the implant succeeds (ex. Nonrevhead and loyalty implant.)
+ proc/implanted(var/mob/source)
+ return 1
proc/get_data()
return
- proc/hear(message, source as mob)
- return
trigger(emote, source as mob)
@@ -31,61 +29,19 @@
activate()
return
- attackby(obj/item/weapon/I as obj, mob/user as mob)
- ..()
- if (istype(I, /obj/item/weapon/implanter))
- if (I:imp)
- return
- else
- src.loc = I
- I:imp = src
-// del(src)
- I:update()
- return
- implanted(source as mob)
- return
+ implanted(mob/source)
+ return 1
get_data()
return "No information available"
- hear(message, source as mob)
- return
-
-
-
-/obj/item/weapon/implant/uplink
- name = "uplink implant"
- desc = "A micro-telecrystal implant which allows for instant transportation of equipment."
- var/activation_emote = "chuckle"
- var/obj/item/device/uplink/radio/uplink = null
-
-
- New()
- activation_emote = pick("blink", "blink_r", "eyebrow", "chuckle", "twitch_s", "frown", "nod", "blush", "giggle", "grin", "groan", "shrug", "smile", "pale", "sniff", "whimper", "wink")
- uplink = new /obj/item/device/uplink/radio/implanted(src)
- ..()
- return
-
-
- implanted(mob/source as mob)
- activation_emote = input("Choose activation emote:") in list("blink", "blink_r", "eyebrow", "chuckle", "twitch_s", "frown", "nod", "blush", "giggle", "grin", "groan", "shrug", "smile", "pale", "sniff", "whimper", "wink")
- source.mind.store_memory("Uplink implant can be activated by using the [src.activation_emote] emote, say *[src.activation_emote] to attempt to activate.", 0, 0)
- source << "The implanted uplink implant can be activated by using the [src.activation_emote] emote, say *[src.activation_emote] to attempt to activate."
- return
-
-
- trigger(emote, mob/source as mob)
- if(emote == activation_emote)
- uplink.attack_self(source)
- return
-
/obj/item/weapon/implant/tracking
- name = "tracking implant"
- desc = "An implant which relays information to the appropriate tracking computer."
+ name = "tracking"
+ desc = "Track with this."
var/id = 1.0
@@ -107,15 +63,11 @@ Implant Specifics: "}
return dat
-//Nuke Agent Explosive
-/obj/item/weapon/implant/dexplosive
- name = "explosive implant"
- desc = "A military grade micro bio-explosive. Highly dangerous."
- var/activation_emote = "deathgasp"
- var/coded = 0
- New()
- verbs += /obj/item/weapon/implant/dexplosive/proc/set_emote
+/obj/item/weapon/implant/explosive
+ name = "explosive"
+ desc = "And boom goes the weasel."
+
get_data()
var/dat = {"
@@ -132,7 +84,7 @@ Implant Specifics: "}
trigger(emote, source as mob)
- if(emote == activation_emote)
+ if(emote == "deathgasp")
src.activate("death")
return
@@ -143,25 +95,11 @@ Implant Specifics: "}
if(src.imp_in)
src.imp_in.gib()
- proc/set_emote()
- set name = "Set Emote"
- set category = "Object"
- set src in usr
- if(coded != 0)
- usr << "You've already set up your implant!"
- return
- activation_emote = input("Choose activation emote:") in list("deathgasp","blink", "blink_r", "eyebrow", "chuckle", "twitch_s", "frown", "nod", "blush", "giggle", "grin", "groan", "shrug", "smile", "pale", "sniff", "whimper", "wink")
- usr.mind.store_memory("Explosive implant can be activated by using the [src.activation_emote] emote, say *[src.activation_emote] to attempt to activate.", 0, 0)
- usr << "The implanted explosive implant can be activated by using the [src.activation_emote] emote, say *[src.activation_emote] to attempt to activate."
- coded = 1
- verbs -= /obj/item/weapon/implant/dexplosive/proc/set_emote
- return
-
/obj/item/weapon/implant/chem
- name = "chemical implant"
- desc = "A micro-injector that can be triggered remotely."
+ name = "chem"
+ desc = "Injects things."
allow_reagents = 1
get_data()
@@ -210,33 +148,33 @@ the implant may become unstable and either pre-maturely inject the subject or si
/obj/item/weapon/implant/loyalty
- name = "loyalty implant"
- desc = "An implant which contains a small pod of nanobots which manipulate host mental functions to induce loyalty."
+ name = "loyalty"
+ desc = "Makes you loyal or such."
get_data()
var/dat = {"
Implant Specifications:
-Name: NanoTrasen Employee Management Implant
+Name: Nanotrasen Employee Management Implant Life: Ten years. Important Notes: Personnel injected with this device tend to be much more loyal to the company. Implant Details: Function: Contains a small pod of nanobots that manipulate the host's mental functions. Special Features: Will prevent and cure most forms of brainwashing.
-Integrity: Degradation can occur within nanobots, re-application may be necessary to ensure full cooperation."}
+Integrity: Implant will last so long as the nanobots are inside the bloodstream."}
return dat
- implanted(M as mob)
- if(!istype(M, /mob/living/carbon/human)) return
+ implanted(mob/M)
+ if(!istype(M, /mob/living/carbon/human)) return 0
var/mob/living/carbon/human/H = M
if(H.mind in ticker.mode.head_revolutionaries)
- H.visible_message("[H] seems to resist the implant!", "You feel the corporate tendrils of NanoTrasen try to invade your mind!")
- return
+ H.visible_message("[H] seems to resist the implant!", "You feel the corporate tendrils of Nanotrasen try to invade your mind!")
+ return 0
else if(H.mind in ticker.mode:revolutionaries)
ticker.mode:remove_revolutionary(H.mind)
- H << "\blue You feel a surge of loyalty towards NanoTrasen."
- return
+ H << "\blue You feel a surge of loyalty towards Nanotrasen."
+ return 1
/obj/item/weapon/implant/adrenalin
@@ -270,235 +208,7 @@ the implant may become unstable and either pre-maturely inject the subject or si
return
- implanted(mob/source as mob)
+ implanted(mob/source)
source.mind.store_memory("A implant can be activated by using the pale emote, say *pale to attempt to activate.", 0, 0)
source << "The implanted freedom implant can be activated by using the pale emote, say *pale to attempt to activate."
- return
-
-
-//BS12 Explosive
-/obj/item/weapon/implant/explosive
- name = "explosive implant"
- desc = "A military grade micro bio-explosive. Highly dangerous."
- var/phrase = "supercalifragilisticexpialidocious"
-
-
- get_data()
- var/dat = {"
-Implant Specifications:
-Name: Robust Corp RX-78 Intimidation Class Implant
-Life: Activates upon codephrase.
-Important Notes: Explodes
-
-Implant Details:
-Function: Contains a compact, electrically detonated explosive that detonates upon receiving a specially encoded signal or upon host death.
-Special Features: Explodes
-Integrity: Implant will occasionally be degraded by the body's immune system and thus will occasionally malfunction."}
- return dat
-
- hear_talk(mob/M as mob, msg)
- hear(msg)
- return
-
- hear(var/msg)
- var/list/replacechars = list("'" = "","\"" = "",">" = "","<" = "","(" = "",")" = "")
- msg = sanitize_simple(msg, replacechars)
- if(findtext(msg,phrase))
- if(istype(imp_in, /mob/))
- var/mob/T = imp_in
- T.gib()
- explosion(get_turf(imp_in), 1, 3, 4, 6, 3)
- var/turf/t = get_turf(imp_in)
- if(t)
- t.hotspot_expose(3500,125)
- del(src)
-
- implanted(mob/source as mob)
- phrase = input("Choose activation phrase:") as text
- var/list/replacechars = list("'" = "","\"" = "",">" = "","<" = "","(" = "",")" = "")
- phrase = sanitize_simple(phrase, replacechars)
- usr.mind.store_memory("Explosive implant in [source] can be activated by saying something containing the phrase ''[src.phrase]'', say [src.phrase] to attempt to activate.", 0, 0)
- usr << "The implanted explosive implant in [source] can be activated by saying something containing the phrase ''[src.phrase]'', say [src.phrase] to attempt to activate."
-
-/obj/item/weapon/implant/death_alarm
- name = "death alarm implant"
- desc = "An alarm which monitors host vital signs and transmits a radio message upon death."
- var/mobname = "Will Robinson"
-
- get_data()
- var/dat = {"
-Implant Specifications:
-Name: NanoTrasen \"Profit Margin\" Class Employee Lifesign Sensor
-Life: Activates upon death.
-Important Notes: Alerts crew to crewmember death.
-
-Implant Details:
-Function: Contains a compact radio signaler that triggers when the host's lifesigns cease.
-Special Features: Alerts crew to crewmember death.
-Integrity: Implant will occasionally be degraded by the body's immune system and thus will occasionally malfunction."}
- return dat
-
- process()
- var/mob/M = imp_in
-
- var/area/t = get_area(M)
-
- if(isnull(M)) // If the mob got gibbed
- var/obj/item/device/radio/headset/a = new /obj/item/device/radio/headset(null)
- a.autosay("states, \"[mobname] has died-zzzzt in-in-in...\"", "[mobname]'s Death Alarm")
- del(a)
- processing_objects.Remove(src)
- else if(M.stat == 2)
- var/obj/item/device/radio/headset/a = new /obj/item/device/radio/headset(null)
- if(istype(t, /area/syndicate_station) || istype(t, /area/syndicate_mothership) || istype(t, /area/shuttle/syndicate_elite) )
- //give the syndies a bit of stealth
- a.autosay("states, \"[mobname] has died in Space!\"", "[mobname]'s Death Alarm")
- else
- a.autosay("states, \"[mobname] has died in [t.name]!\"", "[mobname]'s Death Alarm")
- del(a)
- processing_objects.Remove(src)
-
-
- implanted(mob/source as mob)
- mobname = source.real_name
- processing_objects.Add(src)
-
-/obj/item/weapon/implant/compressed
- name = "compressed matter implant"
- desc = "Based on compressed matter technology, can store a single item."
- var/activation_emote = "sigh"
- var/obj/item/scanned = null
-
- get_data()
- var/dat = {"
-Implant Specifications:
-Name: NanoTrasen \"Profit Margin\" Class Employee Lifesign Sensor
-Life: Activates upon death.
-Important Notes: Alerts crew to crewmember death.
-
-Implant Details:
-Function: Contains a compact radio signaler that triggers when the host's lifesigns cease.
-Special Features: Alerts crew to crewmember death.
-Integrity: Implant will occasionally be degraded by the body's immune system and thus will occasionally malfunction."}
- return dat
-
- trigger(emote, mob/source as mob)
- if (src.scanned == null)
- return 0
-
- if (emote == src.activation_emote)
- source << "The air glows as \the [src.scanned.name] uncompresses."
- var/turf/t = get_turf(source)
- src.scanned.loc = t
- del src
-
- implanted(mob/source as mob)
- src.activation_emote = input("Choose activation emote:") in list("blink", "blink_r", "eyebrow", "chuckle", "twitch_s", "frown", "nod", "blush", "giggle", "grin", "groan", "shrug", "smile", "pale", "sniff", "whimper", "wink")
- source.mind.store_memory("Freedom implant can be activated by using the [src.activation_emote] emote, say *[src.activation_emote] to attempt to activate.", 0, 0)
- source << "The implanted freedom implant can be activated by using the [src.activation_emote] emote, say *[src.activation_emote] to attempt to activate."
-
-/*// --------------------LASERS WORK FROM HERE, AUGMENTATIONS SHIZZLE----------------------
-/obj/item/weapon/implant/augmentation/thermalscanner
- name = "Thermal Scanner Augmentation"
- desc = "Makes you see humans through walls"
-
- get_data()
- var/dat = {"
-Implant Specifications:
-Name: NanoTrasen Thermal Implant
-Life: Ten years.
-Important Notes: Personnel injected with this device tend to be able to see lifeforms through life using thermal.
-
-Implant Details:
-Function: Contains a small pod of nanobots that manipulate the host's eye functions.
-Integrity: Implant will occasionally be degraded by the body's immune system and thus will occasionally malfunction."}
- return dat
-
-
- implanted(M as mob)
- if(istype(M, /mob/living/carbon/human))
- vision_flags = SEE_MOBS
- invisa_view = 2
- usr << "You suddenly start seeing body temperatures of whoever is around you."
- else
- usr << "This implant is not compatible!"
- return
-
-/obj/item/weapon/implant/augmentation/mesonscanner
- name = "Meson Scanner Augmentation"
- desc = "Makes you see floor and wall layouts through walls."
-
- get_data()
- var/dat = {"
-Implant Specifications:
-Name: NanoTrasen Meson Implant
-Life: Ten years.
-Important Notes: Personnel injected with this device tend to be able to see floor and wall layouts through walls.
-
-Implant Details:
-Function: Contains a small pod of nanobots that manipulate the host's eye functions.
-Integrity: Implant will occasionally be degraded by the body's immune system and thus will occasionally malfunction."}
- return dat
-
-
- implanted(M as mob)
- if(istype(M, /mob/living/carbon/human))
- vision_flags = SEE_TURFS
- usr << "You suddenly start seeing body temperatures of whoever is around you."
- else
- usr << "This implant is not compatible!"
- return
-
-/obj/item/weapon/implant/augmentation/medicalhud
- name = "Medical HUD Augmentation"
- desc = "Makes you see the medical condition of a person."
-
- get_data()
- var/dat = {"
-Implant Specifications:
-Name: NanoTrasen Med HUD Implant
-Life: Ten years.
-Important Notes: Personnel injected with this device tend to be able to see the medical condition of a person.
-
-Implant Details:
-Function: Contains a small pod of nanobots that manipulate the host's eye functions.
-Integrity: Implant will occasionally be degraded by the body's immune system and thus will occasionally malfunction."}
- return dat
-
-
- implanted(M as mob)
- if(istype(M, /mob/living/carbon/human))
-
- src.hud = new/obj/item/clothing/glasses/hud/health(src)
- usr << "You suddenly start seeing body temperatures of whoever is around you."
- else
- usr << "This implant is not compatible!"
- return
-
-/obj/item/weapon/implant/augmentation/securityhud
- name = "Security HUD Augmentation"
- desc = "Makes you see the Security standings of a person."
-
- get_data()
- var/dat = {"
-Implant Specifications:
-Name: NanoTrasen Sec HUD Implant
-Life: Ten years.
-Important Notes: Personnel injected with this device tend to be able to see the security standings of a person.
-
-Implant Details:
-Function: Contains a small pod of nanobots that manipulate the host's eye functions.
-Integrity: Implant will occasionally be degraded by the body's immune system and thus will occasionally malfunction."}
- return dat
-
-
- implanted(M as mob)
- if(istype(M, /mob/living/carbon/human))
- var/obj/item/clothing/glasses/hud/security/hud = null
-
- src.hud = new/obj/item/clothing/glasses/hud/security(src)
-
- usr << "You suddenly start seeing body temperatures of whoever is around you."
- else
- usr << "This implant is not compatible!"
- return*/
\ No newline at end of file
+ return 1
diff --git a/code/game/objects/items/weapons/implants/implantcase.dm b/code/game/objects/items/weapons/implants/implantcase.dm
index 9593966346..4f6d81f5fb 100644
--- a/code/game/objects/items/weapons/implants/implantcase.dm
+++ b/code/game/objects/items/weapons/implants/implantcase.dm
@@ -1,4 +1,4 @@
-//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:05
+//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32
/obj/item/weapon/implantcase
name = "Glass Case"
@@ -25,7 +25,7 @@
..()
if (istype(I, /obj/item/weapon/pen))
var/t = input(user, "What would you like the label to be?", text("[]", src.name), null) as text
- if (user.equipped() != I)
+ if (user.get_active_hand() != I)
return
if((!in_range(src, usr) && src.loc != user))
return
@@ -68,7 +68,7 @@
/obj/item/weapon/implantcase/tracking
name = "Glass Case- 'Tracking'"
desc = "A case containing a tracking implant."
- icon = 'items.dmi'
+ icon = 'icons/obj/items.dmi'
icon_state = "implantcase-b"
@@ -80,9 +80,9 @@
/obj/item/weapon/implantcase/explosive
- name = "Glass Case- '(BIO-HAZARD) BIO-detpack'"
+ name = "Glass Case- 'Explosive'"
desc = "A case containing an explosive implant."
- icon = 'items.dmi'
+ icon = 'icons/obj/items.dmi'
icon_state = "implantcase-r"
@@ -96,7 +96,7 @@
/obj/item/weapon/implantcase/chem
name = "Glass Case- 'Chem'"
desc = "A case containing a chemical implant."
- icon = 'items.dmi'
+ icon = 'icons/obj/items.dmi'
icon_state = "implantcase-b"
/obj/item/weapon/implantcase/chem/New()
@@ -108,7 +108,7 @@
/obj/item/weapon/implantcase/loyalty
name = "Glass Case- 'Loyalty'"
desc = "A case containing a loyalty implant."
- icon = 'items.dmi'
+ icon = 'icons/obj/items.dmi'
icon_state = "implantcase-r"
@@ -116,14 +116,3 @@
src.imp = new /obj/item/weapon/implant/loyalty( src )
..()
return
-
-/obj/item/weapon/implantcase/death_alarm
- name = "Glass Case- 'Death Alarm'"
- desc = "A case containing a death alarm implant."
- icon = 'items.dmi'
- icon_state = "implantcase-b"
-
- New()
- src.imp = new /obj/item/weapon/implant/death_alarm( src )
- ..()
- return
diff --git a/code/game/objects/items/weapons/implants/implantchair.dm b/code/game/objects/items/weapons/implants/implantchair.dm
index 4f49e2ca49..215d591532 100644
--- a/code/game/objects/items/weapons/implants/implantchair.dm
+++ b/code/game/objects/items/weapons/implants/implantchair.dm
@@ -1,9 +1,9 @@
-//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:05
+//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32
/obj/machinery/implantchair
name = "Loyalty Implanter"
desc = "Used to implant occupants with loyalty implants."
- icon = 'implantchair.dmi'
+ icon = 'icons/obj/machines/implantchair.dmi'
icon_state = "implantchair"
density = 1
opacity = 0
@@ -116,7 +116,7 @@
if(M.client)
M.client.perspective = EYE_PERSPECTIVE
M.client.eye = src
- M.pulling = null
+ M.stop_pulling()
M.loc = src
src.occupant = M
src.add_fingerprint(usr)
@@ -133,10 +133,11 @@
if(istype(imp, /obj/item/weapon/implant/loyalty))
for (var/mob/O in viewers(M, null))
O.show_message("\red [M] has been implanted by the [src.name].", 1)
- imp.loc = M
- imp.imp_in = M
- imp.implanted = 1
- imp.implanted(M)
+
+ if(imp.implanted(M))
+ imp.loc = M
+ imp.imp_in = M
+ imp.implanted = 1
implant_list -= imp
break
return
diff --git a/code/game/objects/items/weapons/implants/implanter.dm b/code/game/objects/items/weapons/implants/implanter.dm
index 4f80a89a60..aed447472c 100644
--- a/code/game/objects/items/weapons/implants/implanter.dm
+++ b/code/game/objects/items/weapons/implants/implanter.dm
@@ -1,6 +1,6 @@
/obj/item/weapon/implanter
name = "implanter"
- icon = 'items.dmi'
+ icon = 'icons/obj/items.dmi'
icon_state = "implanter0"
item_state = "syringe_0"
throw_speed = 1
@@ -12,46 +12,37 @@
/obj/item/weapon/implanter/update()
- if (imp)
- icon_state = "implanter1"
+ if (src.imp)
+ src.icon_state = "implanter1"
else
- icon_state = "implanter0"
+ src.icon_state = "implanter0"
return
/obj/item/weapon/implanter/attack(mob/M as mob, mob/user as mob)
if (!istype(M, /mob/living/carbon))
return
- if (user && imp)
- if (M != user)
- user.visible_message("\red \The [user] tries to implant \the [M] with \the [src]!","\red You try to implant \the [M] with \the [src]!")
- else
- user.visible_message("\red \The [user] tries to implant [user.get_visible_gender() == MALE ? "himself" : user.get_visible_gender() == FEMALE ? "herself" : "themselves"] with \the [src]!","\red You try to implant yourself with \the [src]!")
- if(!do_mob(user, M,60))
- return
- if(hasorgans(M))
- var/datum/organ/external/target = M:get_organ(check_zone(user.zone_sel.selecting))
- if(target.status & ORGAN_DESTROYED)
- user << "What [target.display_name]?"
- return
- if(!target.implant)
- target.implant = list()
- target.implant += imp
- imp.loc = target
- if (M != user)
- user.visible_message("\red \The [user] implants \the [M]'s [target.display_name] with \the [src]!","\red You implant \the [M]'s [target.display_name] with \the [src]!")
- else
- user.visible_message("\red \The [user] implants [user.get_visible_gender() == MALE ? "his" : user.get_visible_gender() == FEMALE ? "her" : "their"] own [target.display_name] with \the [src]!","\red You implant your [target.display_name] with \the [src]!")
- M.attack_log += text("\[[time_stamp()]\] Implanted with [src] ([imp]) by [user] ([user.ckey])")
- user.attack_log += text("\[[time_stamp()]\] Used the [src] ([imp]) to implant [M] ([M.ckey])")
- log_admin("ATTACK: [user] ([user.ckey]) implanted [M] ([M.ckey]) with [src].")
- message_admins("ATTACK: [user] ([user.ckey]) implanted [M] ([M.ckey]) with [src].")
- log_attack("[user.name] ([user.ckey]) implanted [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])")
- imp.imp_in = M
- imp.implanted = 1
- imp.implanted(M)
- imp = null
- icon_state = "implanter0"
+ if (user && src.imp)
+ for (var/mob/O in viewers(M, null))
+ O.show_message("\red [user] is attemping to implant [M].", 1)
+
+ var/turf/T1 = get_turf(M)
+ if (T1 && ((M == user) || do_after(user, 50)))
+ if(user && M && (get_turf(M) == T1) && src && src.imp)
+ for (var/mob/O in viewers(M, null))
+ O.show_message("\red [M] has been implanted by [user].", 1)
+ M.attack_log += text("\[[time_stamp()]\] Implanted with [src.name] ([src.imp.name]) by [user.name] ([user.ckey])")
+ user.attack_log += text("\[[time_stamp()]\] Used the [src.name] ([src.imp.name]) to implant [M.name] ([M.ckey])")
+ log_attack("[user.name] ([user.ckey]) implanted [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])")
+
+ user.show_message("\red You implanted the implant into [M].")
+ if(src.imp.implanted(M))
+ src.imp.loc = M
+ src.imp.imp_in = M
+ src.imp.implanted = 1
+
+ src.imp = null
+ update()
return
@@ -60,7 +51,7 @@
name = "implanter-loyalty"
/obj/item/weapon/implanter/loyalty/New()
- imp = new /obj/item/weapon/implant/loyalty( src )
+ src.imp = new /obj/item/weapon/implant/loyalty( src )
..()
update()
return
@@ -68,10 +59,10 @@
/obj/item/weapon/implanter/explosive
- name = "implanter (E)"
+ name = "implanter-explosive"
/obj/item/weapon/implanter/explosive/New()
- imp = new /obj/item/weapon/implant/explosive( src )
+ src.imp = new /obj/item/weapon/implant/explosive( src )
..()
update()
return
@@ -83,38 +74,4 @@
src.imp = new /obj/item/weapon/implant/adrenalin(src)
..()
update()
- return
-
-/obj/item/weapon/implanter/compressed
- name = "implanter (C)"
- icon_state = "cimplanter0"
-
-/obj/item/weapon/implanter/compressed/New()
- imp = new /obj/item/weapon/implant/compressed( src )
- ..()
- update()
- return
-
-/obj/item/weapon/implanter/compressed/update()
- if (imp)
- var/obj/item/weapon/implant/compressed/c = imp
- if(!c.scanned)
- icon_state = "cimplanter0"
- else
- icon_state = "cimplanter1"
- else
- icon_state = "cimplanter2"
- return
-
-/obj/item/weapon/implanter/compressed/attack(mob/M as mob, mob/user as mob)
- var/obj/item/weapon/implant/compressed/c = imp
- if (c.scanned == null)
- user << "Please scan an object with the implanter first."
- return
- ..()
-
-/obj/item/weapon/implanter/compressed/afterattack(atom/A, mob/user as mob)
- if(istype(A,/obj/item) && imp)
- imp:scanned = A
- A.loc.contents.Remove(A)
- update()
+ return
\ No newline at end of file
diff --git a/code/game/objects/items/weapons/implants/implantfreedom.dm b/code/game/objects/items/weapons/implants/implantfreedom.dm
index 7540061142..df1fd274ca 100644
--- a/code/game/objects/items/weapons/implants/implantfreedom.dm
+++ b/code/game/objects/items/weapons/implants/implantfreedom.dm
@@ -1,4 +1,4 @@
-//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:05
+//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32
/obj/item/weapon/implant/freedom
name = "freedom"
@@ -9,7 +9,7 @@
New()
- activation_emote = pick("blink", "blink_r", "eyebrow", "chuckle", "twitch_s", "frown", "nod", "blush", "giggle", "grin", "groan", "shrug", "smile", "pale", "sniff", "whimper", "wink")
+ src.activation_emote = pick("blink", "blink_r", "eyebrow", "chuckle", "twitch_s", "frown", "nod", "blush", "giggle", "grin", "groan", "shrug", "smile", "pale", "sniff", "whimper", "wink")
src.uses = rand(1, 5)
..()
return
@@ -23,6 +23,18 @@
if (source.handcuffed)
var/obj/item/weapon/W = source.handcuffed
source.handcuffed = null
+ source.update_inv_handcuffed()
+ if (source.client)
+ source.client.screen -= W
+ if (W)
+ W.loc = source.loc
+ dropped(source)
+ if (W)
+ W.layer = initial(W.layer)
+ if (source.legcuffed)
+ var/obj/item/weapon/W = source.legcuffed
+ source.legcuffed = null
+ source.update_inv_legcuffed()
if (source.client)
source.client.screen -= W
if (W)
@@ -30,15 +42,13 @@
dropped(source)
if (W)
W.layer = initial(W.layer)
- source.update_clothing()
return
- implanted(mob/source as mob)
- activation_emote = input("Choose activation emote:") in list("blink", "blink_r", "eyebrow", "chuckle", "twitch_s", "frown", "nod", "blush", "giggle", "grin", "groan", "shrug", "smile", "pale", "sniff", "whimper", "wink")
+ implanted(mob/source)
source.mind.store_memory("Freedom implant can be activated by using the [src.activation_emote] emote, say *[src.activation_emote] to attempt to activate.", 0, 0)
source << "The implanted freedom implant can be activated by using the [src.activation_emote] emote, say *[src.activation_emote] to attempt to activate."
- return
+ return 1
get_data()
diff --git a/code/game/objects/items/weapons/implants/implantnanoaug.dm b/code/game/objects/items/weapons/implants/implantnanoaug.dm
index 2914a8da19..32a23e967b 100644
--- a/code/game/objects/items/weapons/implants/implantnanoaug.dm
+++ b/code/game/objects/items/weapons/implants/implantnanoaug.dm
@@ -9,7 +9,7 @@
var/dat = {"
Implant Specifications: Name: Cybersun Industries Nano-Robotic Biological Augmentation Suite
-Life: Infinite. WARNING: Biological chances are irreversable.
+Life: Infinite. WARNING: Biological changes are irreversable. Important Notes: Illegal. Subjects exposed to nanorobotic agent are considered dangerous. Implant Details:
@@ -19,27 +19,12 @@
return dat
- implanted(mob/M as mob)
- if(!istype(M, /mob/living/carbon/human)) return
- var/mob/living/carbon/human/H = M
- H.augmentations.Add(augmentation) // give them the mutation
- H << "\blue [augment_text]"
- if(istype(src, /obj/item/weapon/implant/nanoaug/eswordsynth))
- activation_emote = pick("blink", "blink_r", "eyebrow", "chuckle", "twitch_s", "frown", "nod", "blush", "giggle", "grin", "groan", "shrug", "smile", "pale", "sniff", "whimper", "wink")
- H.mind.store_memory("Freedom nanoaugmentation can be activated by using the [src.activation_emote] emote, say *[src.activation_emote] to attempt to activate.", 0, 0)
- H << "The nanoaugmentation implant can be activated by using the [src.activation_emote] emote, say *[src.activation_emote] to attempt to activate."
+ implanted(mob/M)
+ if(!istype(M, /mob/living/carbon/human)) return 0
+ M.augmentations.Add(augmentation) // give them the mutation
+ M << "\blue [augment_text]"
- if(istype(src, /obj/item/weapon/implant/nanoaug/radar))
- H << "Red blips on the map are Security."
- H << "White blips are civlians."
- H << "Monochrome Green blips are cyborgs and AIs."
- H << "Light blue blips are heads of staff."
- H << "Purple blips are unidentified organisms."
- H << "Dead biologicals will not display on the radar."
-
- spawn()
- H.start_radar()
- return
+ return 1
/obj/item/weapon/implant/nanoaug/strength
@@ -52,6 +37,20 @@
augmentation = RADAR
augment_text = "You begin to sense the presence or lack of presence of others around you."
+ implanted(mob/M)
+ if(..())
+ M << "Red blips on the map are Security."
+ M << "White blips are civlians."
+ M << "Monochrome Green blips are cyborgs and AIs."
+ M << "Light blue blips are heads of staff."
+ M << "Purple blips are unidentified organisms."
+ M << "Dead biologicals will not display on the radar."
+ spawn()
+ var/mob/living/carbon/human/H = M
+ H.start_radar()
+ return 1
+ return 0
+
/obj/item/weapon/implant/nanoaug/electrichands
name = "Electric Hands"
augmentation = ELECTRICHANDS
@@ -62,6 +61,14 @@
augmentation = ESWORDSYNTH
augment_text = "Your hands throb and pulsate. They feel sharper, and strangely hot."
+ implanted(mob/M)
+ if(..())
+ activation_emote = pick("blink", "blink_r", "eyebrow", "chuckle", "twitch_s", "frown", "nod", "blush", "giggle", "grin", "groan", "shrug", "smile", "pale", "sniff", "whimper", "wink")
+ M.mind.store_memory("Freedom nanoaugmentation can be activated by using the [src.activation_emote] emote, say *[src.activation_emote] to attempt to activate.", 0, 0)
+ M << "The nanoaugmentation implant can be activated by using the [src.activation_emote] emote, say *[src.activation_emote] to attempt to activate."
+ return 1
+ return 0
+
trigger(emote, source as mob)
if(emote == activation_emote)
src.activate(source)
@@ -71,7 +78,7 @@
var/obj/item/weapon/melee/energy/blade/swordspawn = new /obj/item/weapon/melee/energy/blade
if(!source.get_active_hand())
- source.put_in_hand(swordspawn)
+ source.put_in_hands(swordspawn)
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
spark_system.set_up(5, 0, source.loc)
diff --git a/code/game/objects/items/weapons/implants/implantpad.dm b/code/game/objects/items/weapons/implants/implantpad.dm
index 5b2b4da7f0..650a343013 100644
--- a/code/game/objects/items/weapons/implants/implantpad.dm
+++ b/code/game/objects/items/weapons/implants/implantpad.dm
@@ -1,9 +1,9 @@
-//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:05
+//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32
/obj/item/weapon/implantpad
name = "implantpad"
desc = "Used to modify implants."
- icon = 'items.dmi'
+ icon = 'icons/obj/items.dmi'
icon_state = "implantpad-0"
item_state = "electronic"
throw_speed = 1
@@ -26,15 +26,11 @@
attack_hand(mob/user as mob)
if ((src.case && (user.l_hand == src || user.r_hand == src)))
- if (user.hand)
- user.l_hand = src.case
- else
- user.r_hand = src.case
- src.case.loc = user
- src.case.layer = 20
+ user.put_in_active_hand(case)
+
src.case.add_fingerprint(user)
src.case = null
- user.update_clothing()
+
src.add_fingerprint(user)
update()
else
diff --git a/code/game/objects/items/weapons/kitchen.dm b/code/game/objects/items/weapons/kitchen.dm
index 358c0fb40e..da0812e7e2 100644
--- a/code/game/objects/items/weapons/kitchen.dm
+++ b/code/game/objects/items/weapons/kitchen.dm
@@ -18,78 +18,35 @@ KNIFE
// FORK
-/obj/item/weapon/kitchen/utensil/fork/attack(mob/living/M as mob, mob/living/carbon/user as mob)
- if(istype(M,/mob/living/carbon) || istype(M,/mob/living/simple_animal/livestock))
- if (bite)
- if(M == user)
- user.visible_message( \
- "\blue [user] eats a delicious forkful of [bite]!", \
- "\blue You eat a delicious forkful of [bite]!")
- else
- user.visible_message( \
- "\blue [user] feeds [M] a delicious forkful of [bite]!", \
- "\blue You feed [M] a delicious forkful of [bite]!")
- spawn(0)
- bite.reagents.reaction(M, INGEST)
- bite.reagents.trans_to(M)
- del(bite)
- src.icon_state = "fork"
- else if(user.zone_sel.selecting == "eyes")
- if((CLUMSY in user.mutations) && prob(50))
- M = user
- return eyestab(M, user)
- else
- user << "\red Your fork does not have any food on it."
- else
- user << "\red You can't seem to feed [M]."
-
-/obj/item/weapon/kitchen/utensil/fork/afterattack(obj/item/weapon/reagent_containers/food/snacks/snack as obj, mob/living/carbon/user as mob)
- if(istype(snack))
- if(bite)
- user << "\red You already have [bite] on your fork."
- else
- bite = new snack.type(src)
- icon_state = "forkloaded"
- user.visible_message( \
- "[user] takes a piece of [bite] with their fork!", \
- "\blue You take a piece of [bite] with your fork!" \
- )
- if(bite.reagents && snack.reagents) //transfer bit's worth of reagents to
- bite.reagents.clear_reagents()
- if(snack.reagents.total_volume)
- snack.reagents.reaction(src, TOUCH) // react "food" with fork
- spawn(0)
- if(snack.reagents.total_volume > snack.bitesize)
- snack.reagents.trans_to(bite, snack.bitesize)
- else
- snack.reagents.trans_to(bite, snack.reagents.total_volume)
- snack.bitecount++
- if(!snack.reagents.total_volume)
- // due to the trash code being hard-coded to place in hand, do magic trick
- // free active hand
- user.drop_item(src)
-
- // consumption fills active hand, drop it back down
- snack.On_Consume()
- var/obj/trash = user.get_active_hand()
- if(trash)
- user.drop_item(trash)
- trash.loc = get_turf(snack.loc) // move trash to snack's turf
-
- // put fork back in hand
- user.put_in_hand(src)
- user << "\red You grab the last bite of [snack]."
- del(snack)
- else
+/obj/item/weapon/kitchen/utensil/fork/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
+ if(!istype(M))
return ..()
+ if(user.zone_sel.selecting != "eyes" && user.zone_sel.selecting != "head")
+ return ..()
+
+ if (src.icon_state == "forkloaded") //This is a poor way of handling it, but a proper rewrite of the fork to allow for a more varied foodening can happen when I'm in the mood. --NEO
+ if(M == user)
+ for(var/mob/O in viewers(M, null))
+ O.show_message(text("\blue [] eats a delicious forkful of omelette!", user), 1)
+ M.reagents.add_reagent("nutriment", 1)
+ else
+ for(var/mob/O in viewers(M, null))
+ O.show_message(text("\blue [] feeds [] a delicious forkful of omelette!", user, M), 1)
+ M.reagents.add_reagent("nutriment", 1)
+ src.icon_state = "fork"
+ return
+ else
+ if((CLUMSY in user.mutations) && prob(50))
+ M = user
+ return eyestab(M,user)
// ROLLING PIN
-/* //Honestly this doesn't even work and is very silly. -- Erthilo
-/obj/item/weapon/kitchen/rollingpin/attack(mob/M as mob, mob/living/user as mob)
+
+/obj/item/weapon/kitchen/rollingpin/attack(mob/living/M as mob, mob/living/user as mob)
if ((CLUMSY in user.mutations) && prob(50))
user << "\red The [src] slips out of your hand and hits your head."
user.take_organ_damage(10)
@@ -98,30 +55,30 @@ KNIFE
M.attack_log += text("\[[time_stamp()]\] Has been attacked with [src.name] by [user.name] ([user.ckey])")
user.attack_log += text("\[[time_stamp()]\] Used the [src.name] to attack [M.name] ([M.ckey])")
- log_admin("ATTACK: [user] ([user.ckey]) attacked [M] ([M.ckey]) with [src].")
- message_admins("ATTACK: [user] ([user.ckey]) attacked [M] ([M.ckey]) with [src].")
log_attack("[user.name] ([user.ckey]) used the [src.name] to attack [M.name] ([M.ckey])")
- if (M.stat < 2 && M.health < 50 && prob(90))
- var/mob/H = M
- // ******* Check
- if ((istype(H, /mob/living/carbon/human) && istype(H, /obj/item/clothing/head) && H.flags & 8 && prob(80)))
- M << "\red The helmet protects you from being hit hard in the head!"
- return
- var/time = rand(2, 6)
- if (prob(75))
- M.Paralyse(time)
- else
- M.Stun(time)
- if(M.stat != 2) M.stat = 1
- for(var/mob/O in viewers(M, null))
- O.show_message(text("\red [] has been knocked unconscious!", M), 1, "\red You hear someone fall.", 2)
- else
- M << text("\red [] tried to knock you unconcious!",user)
- M.eye_blurry += 3
+ var/t = user:zone_sel.selecting
+ if (t == "head")
+ if(ishuman(M))
+ var/mob/living/carbon/human/H = M
+ if (H.stat < 2 && H.health < 50 && prob(90))
+ // ******* Check
+ if (istype(H, /obj/item/clothing/head) && H.flags & 8 && prob(80))
+ H << "\red The helmet protects you from being hit hard in the head!"
+ return
+ var/time = rand(2, 6)
+ if (prob(75))
+ H.Paralyse(time)
+ else
+ H.Stun(time)
+ if(H.stat != 2) H.stat = 1
+ for(var/mob/O in viewers(H, null))
+ O.show_message(text("\red [] has been knocked unconscious!", H), 1, "\red You hear someone fall.", 2)
+ else
+ H << text("\red [] tried to knock you unconscious!",user)
+ H.eye_blurry += 3
return
-*/
@@ -158,16 +115,16 @@ KNIFE
M.Weaken(1)
user.take_organ_damage(2)
if(prob(50))
- playsound(M, 'trayhit1.ogg', 50, 1)
+ playsound(M, 'sound/items/trayhit1.ogg', 50, 1)
return
else
- playsound(M, 'trayhit2.ogg', 50, 1) //sound playin'
+ playsound(M, 'sound/items/trayhit2.ogg', 50, 1) //sound playin'
return //it always returns, but I feel like adding an extra return just for safety's sakes. EDIT; Oh well I won't :3
- var/mob/living/carbon/human/H = M // Let's have this ready for later.
+ var/mob/living/carbon/human/H = M ///////////////////////////////////// /Let's have this ready for later.
- if(user.zone_sel.selecting != "eyes" && user.zone_sel.selecting != "head") //hitting anything else other than the eyes
+ if(!(user.zone_sel.selecting == ("eyes" || "head"))) //////////////hitting anything else other than the eyes
if(prob(33))
src.add_blood(H)
var/turf/location = H.loc
@@ -177,8 +134,6 @@ KNIFE
M.attack_log += text("\[[time_stamp()]\] Has been attacked with [src.name] by [user.name] ([user.ckey])")
user.attack_log += text("\[[time_stamp()]\] Used the [src.name] to attack [M.name] ([M.ckey])")
- log_admin("ATTACK: [user] ([user.ckey]) attacked [M] ([M.ckey]) with [src].")
- message_admins("ATTACK: [user] ([user.ckey]) attacked [M] ([M.ckey]) with [src].")
log_attack("[user.name] ([user.ckey]) used the [src.name] to attack [M.name] ([M.ckey])")
@@ -188,12 +143,12 @@ KNIFE
else
M.take_organ_damage(5)
if(prob(50))
- playsound(M, 'trayhit1.ogg', 50, 1)
+ playsound(M, 'sound/items/trayhit1.ogg', 50, 1)
for(var/mob/O in viewers(M, null))
O.show_message(text("\red [] slams [] with the tray!", user, M), 1)
return
else
- playsound(M, 'trayhit2.ogg', 50, 1) //we applied the damage, we played the sound, we showed the appropriate messages. Time to return and stop the proc
+ playsound(M, 'sound/items/trayhit2.ogg', 50, 1) //we applied the damage, we played the sound, we showed the appropriate messages. Time to return and stop the proc
for(var/mob/O in viewers(M, null))
O.show_message(text("\red [] slams [] with the tray!", user, M), 1)
return
@@ -216,11 +171,11 @@ KNIFE
location.add_blood(H)
if(prob(50))
- playsound(M, 'trayhit1.ogg', 50, 1)
+ playsound(M, 'sound/items/trayhit1.ogg', 50, 1)
for(var/mob/O in viewers(M, null))
O.show_message(text("\red [] slams [] with the tray!", user, M), 1)
else
- playsound(M, 'trayhit2.ogg', 50, 1) //sound playin'
+ playsound(M, 'sound/items/trayhit2.ogg', 50, 1) //sound playin'
for(var/mob/O in viewers(M, null))
O.show_message(text("\red [] slams [] with the tray!", user, M), 1)
if(prob(10))
@@ -240,11 +195,11 @@ KNIFE
location.add_blood(H)
if(prob(50))
- playsound(M, 'trayhit1.ogg', 50, 1)
+ playsound(M, 'sound/items/trayhit1.ogg', 50, 1)
for(var/mob/O in viewers(M, null))
O.show_message(text("\red [] slams [] in the face with the tray!", user, M), 1)
else
- playsound(M, 'trayhit2.ogg', 50, 1) //sound playin' again
+ playsound(M, 'sound/items/trayhit2.ogg', 50, 1) //sound playin' again
for(var/mob/O in viewers(M, null))
O.show_message(text("\red [] slams [] in the face with the tray!", user, M), 1)
if(prob(30))
@@ -336,7 +291,7 @@ KNIFE
if (W.icon_state == "forkloaded")
user << "\red You already have omelette on your fork."
return
- W.icon = 'kitchen.dmi'
+ W.icon = 'icons/obj/kitchen.dmi'
W.icon_state = "forkloaded"
viewers(3,user) << "[user] takes a piece of omelette with his fork!"
reagents.remove_reagent("nutriment", 1)
diff --git a/code/game/objects/items/weapons/manuals.dm b/code/game/objects/items/weapons/manuals.dm
index fad2ad4a7a..e5e5d4059a 100644
--- a/code/game/objects/items/weapons/manuals.dm
+++ b/code/game/objects/items/weapons/manuals.dm
@@ -1,26 +1,24 @@
/*********************MANUALS (BOOKS)***********************/
+//Oh god what the fuck I am not good at computer
/obj/item/weapon/book/manual
- icon = 'library.dmi'
+ icon = 'icons/obj/library.dmi'
due_date = 0 // Game time in 1/10th seconds
unique = 1 // 0 - Normal book, 1 - Should not be treated as normal book, unable to be copied, unable to be modified
- New()
- if(!title)
- title = name // make this simple for manuals
/obj/item/weapon/book/manual/engineering_construction
name = "Station Repairs and Construction"
icon_state ="bookEngineering"
author = "Engineering Encyclopedia" // Who wrote the thing, can be changed by pen or PC. It is not automatically assigned
-
+ title = "Station Repairs and Construction"
dat = {"
-
+
@@ -31,7 +29,7 @@
name = "Particle Accelerator User's Guide"
icon_state ="bookParticleAccelerator"
author = "Engineering Encyclopedia" // Who wrote the thing, can be changed by pen or PC. It is not automatically assigned
-
+ title = "Particle Accelerator User's Guide"
//big pile of shit below.
dat = {"
@@ -74,7 +72,7 @@
name = "Hacking"
icon_state ="bookHacking"
author = "Engineering Encyclopedia" // Who wrote the thing, can be changed by pen or PC. It is not automatically assigned
-
+ title = "Hacking"
//big pile of shit below.
dat = {"
@@ -83,7 +81,7 @@
-
+
@@ -94,7 +92,7 @@
name = "Singularity Safety in Special Circumstances"
icon_state ="bookEngineeringSingularitySafety"
author = "Engineering Encyclopedia" // Who wrote the thing, can be changed by pen or PC. It is not automatically assigned
-
+ title = "Singularity Safety in Special Circumstances"
//big pile of shit below.
dat = {"
@@ -142,7 +140,7 @@
name = "The Human Harvest - From seed to market"
icon_state ="bookHydroponicsPodPeople"
author = "Farmer John"
-
+ title = "The Human Harvest - From seed to market"
dat = {"
+
+
+
+
How to Clone People
+ So there’s 50 dead people lying on the floor, chairs are spinning like no tomorrow and you haven’t the foggiest idea of what to do? Not to worry! This guide is intended to teach you how to clone people and how to do it right, in a simple step-by-step process! If at any point of the guide you have a mental meltdown, genetics probably isn’t for you and you should get a job-change as soon as possible before you’re sued for malpractice.
+
+
+
Click on the cloning console to bring up its menu.
-
Click Scan.
-
Note: If you see Mental Interface Error, wait a few seconds and try again. If it still comes up, the body is not viable for cloning (they logged off) and should be taken to the morgue.
-
-
Click View Records to make sure their record is listed in the cloning database.
-
-
Making the Clone
-
Remember, a clone can only be made when the person you're making a clone for is dead. If they aren't dead, you'll see a "Unable to initiate cloning cycle" error in the Cloning System Control.
-
-
Head to the cloning console beside the cloning pod, and click on it to open its menu.
-
Click View Records, select the person you wish to clone, then click Clone.
-
Note: After clicking "Clone" the dead person will get a pop-up window asking if they want to come back to life. If they choose "No", the console will say "Unable to initiate cloning cycle". If they choose "Yes", the console will say "Cloning cycle activated", and their body will be remade in a few minutes.
-
Note #2: When a new clone is made, that person's record is deleted from the database, so they must be scanned again if they are to be cloned a second time.
-
-
-
Finishing a New Clone
-
Grab the new clone and take it to Cryo, the room with large cryo cells.
-
Click on one of the cells to place the clone inside and set the Cryo status to On.
-
Take a nearby beaker filled with Cryoxadone and then click on the same cell you placed the clone in to load the beaker into the cell.
-
Note: At this point, the clone will begin to heal slowly, shown by the increasing health indication in the cryo cell's menu. If you wish to speed up the effect, continue with the next steps.
-
-
Use the nearby on both O2 canisters to secure them (if they aren't already).
-
Put the wrench down, then click on both O2 canisters and Open them.
-
Set the freezer's Target gas temperature to its lowest amount by clicking on the far-left "-" until the number in the center no longer decreases.
-
Set the freezer to On.
-
Click on the cyro cell to check on your clone. When its health reaches 100, it is considered finished and can then be ejected (right-click > Eject Occupant).
-
Note: Though waiting for the health to reach 100 is optimum, in emergencies when the cryo cells are needed the clone can be ejected at ~50 health and finished in a sleeper.
-
-
Don't forget! when you're done with the cryo room, turn everything to Off or Closed so the room doesn't get freezing cold! Also, if you still have their old body, drag it to the morgue to prevent Clone Memory Disorder (which is purely for role-play purposes).
-
-
Clone Memory Disorder
-
There are a few basic rules that apply to most patients, all symptoms of Clone Memory Disorder.
-It is caused by the unexpected circumstances after awakening in cryo (if cloned from a backup), or the traumatizing experience of death which is much worse, (if cloned from the corpse).
-
These are the usual symptoms.
-
-
They will be disoriented after being cloned.
-
They will have forgotten about their death/everything that happened after the backup.
-
They will sometimes feel strange urges or fears when confronted with anything that can be directly related to their death. (Only if cloned from the corpse). See also Symptoms of Trauma for how people in reality would possibly react (read this if you are unsure how to RP Clone Memory Disorder for when you get cloned from a corpse).
-
-
This applies for cloned criminals as well!
-
Take an example clone. He died under suspicious circumstances, but we always take good care of our patients, and we do not want them to commit suicide or fall into manic depression. As such, we will have to prevent any Post-Mortem Traumatic Relapses (Refer to it as 'complications' to less scientific personnel).
-
-
The first thing to do is ask the patient how they feel.
-
Symptom 1 of CMD will most of the time be apparent in the subject.
-
They will most likely ask questions about why they are there.
-
Give an excuse: Tell them that they have hurt their head, were wounded, or otherwise put into cryo. (You might also want to tell them that they fainted after their back-up, which is common for patients that were nervous to get into the machine.)
-
Inform all involved personnel of the excuse.
-
"}
@@ -251,7 +253,7 @@ It is caused by the unexpected circumstances after awakening in cryo (if cloned
name = "APLU \"Ripley\" Construction and Operation Manual"
icon_state ="book"
author = "Weyland-Yutani Corp" // Who wrote the thing, can be changed by pen or PC. It is not automatically assigned
-
+ title = "APLU \"Ripley\" Construction and Operation Manual"
//big pile of shit below.
dat = {"
@@ -300,10 +302,10 @@ It is caused by the unexpected circumstances after awakening in cryo (if cloned
Secure the mainboard with a screwdriver.
Install the peripherals control module (Not included. Use supplied datadisk to create one).
Secure the peripherals control module with a screwdriver
-
Install the internal armor plating (Not included due to NanoTrasen regulations. Can be made using 5 metal sheets.)
+
Install the internal armor plating (Not included due to Nanotrasen regulations. Can be made using 5 metal sheets.)
Secure the internal armor plating with a wrench
Weld the internal armor plating to the chassis
-
Install the external reinforced armor plating (Not included due to NanoTrasen regulations. Can be made using 5 reinforced metal sheets.)
+
Install the external reinforced armor plating (Not included due to Nanotrasen regulations. Can be made using 5 reinforced metal sheets.)
Secure the external reinforced armor plating with a wrench
Weld the external reinforced armor plating to the chassis
@@ -313,7 +315,7 @@ It is caused by the unexpected circumstances after awakening in cryo (if cloned
Internal armor is plasteel for additional strength.
External armor must be installed in 2 parts, totaling 10 sheets.
Completed mech is more resiliant against fire, and is a bit more durable overall
-
NanoTrasen is determined to the safety of its investments employees.
+
Nanotrasen is determined to the safety of its investments employees.
@@ -327,7 +329,7 @@ It is caused by the unexpected circumstances after awakening in cryo (if cloned
name = "Research and Development 101"
icon_state = "rdbook"
author = "Dr. L. Ight"
-
+ title = "Research and Development 101"
dat = {"
+
+
- dat = {"
-
+
Food for Dummies
+ Here is a guide on basic food recipes and also how to not poison your customers accidentally.
-
-
-
+
Burger:
+ Put 1 meat and 1 flour into the microwave and turn it on. Then wait.
-
+
Bread:
+ Put 3 flour into the microwave and then wait.
+
Waffles:
+ Add 2 flour and 2 egg to the microwave and then wait.
+
+
Popcorn:
+ Add 1 corn to the microwave and wait.
+
+
Meat Steak:
+ Put 1 meat, 1 unit of salt and 1 unit of pepper into the microwave and wait.
+
+
Meat Pie:
+ Put 1 meat and 2 flour into the microwave and wait.
+
+
Boiled Spagetti:
+ Put 1 spagetti and 5 units of water into the microwave and wait.
+
+
Donuts:
+ Add 1 egg and 1 flour to the microwave and wait.
+
+
Fries:
+ Add one potato to the processor and wait.
+
+
+
+
"}
/obj/item/weapon/book/manual/barman_recipes
name = "Barman Recipes"
icon_state = "barbook"
author = "Sir John Rose"
-
+ title = "Barman Recipes"
dat = {"