Penlight fits in medical belt.

Fixed several runtime errors.
Monkeys and aliens won't stack dozens of blood stains.
Fixed crash in FEA code related to melting floors.
When screwdrived destructive analyzer unlink from RD console protolate instead of itself.


git-svn-id: http://tgstation13.googlecode.com/svn/trunk@1443 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
rastaf.zero@gmail.com
2011-04-14 03:52:09 +00:00
parent e84d394289
commit ad6a6e42aa
38 changed files with 427 additions and 521 deletions

View File

@@ -23,7 +23,7 @@
process() process()
..() ..()
if(!on) if(!on || !network)
return 0 return 0
var/air_heat_capacity = air_contents.heat_capacity() var/air_heat_capacity = air_contents.heat_capacity()
var/combined_heat_capacity = current_heat_capacity + air_heat_capacity var/combined_heat_capacity = current_heat_capacity + air_heat_capacity

View File

@@ -152,9 +152,14 @@ obj
loc:active_hotspot = null loc:active_hotspot = null
src.sd_SetLuminosity(0) src.sd_SetLuminosity(0)
var/chance_of_deletion = min(100, T.max_fire_temperature_sustained / T.heat_capacity * 8)
if(T.to_be_destroyed) if(T.to_be_destroyed)
var/chance_of_deletion
if (T.heat_capacity) //beware of division by zero
chance_of_deletion = T.max_fire_temperature_sustained / T.heat_capacity * 8 //there is no problem with prob(23456), min() was redundant --rastaf0
else
chance_of_deletion = 100
if(prob(chance_of_deletion)) if(prob(chance_of_deletion))
T.ReplaceWithSpace() T.ReplaceWithSpace()
else else

View File

@@ -87,51 +87,50 @@ datum
return return
reaction_turf(var/turf/T, var/volume)//splash the blood all over the place reaction_turf(var/turf/simulated/T, var/volume)//splash the blood all over the place
if(!istype(T)) return
var/datum/reagent/blood/self = src var/datum/reagent/blood/self = src
src = null src = null
if(!istype(T, /turf/simulated/)) return
var/datum/disease/D = self.data["virus"] var/datum/disease/D = self.data["virus"]
if(istype(self.data["donor"], /mob/living/carbon/human) || !self.data["donor"]) if(!self.data["donor"] || istype(self.data["donor"], /mob/living/carbon/human))
var/turf/simulated/source2 = T var/obj/decal/cleanable/blood/blood_prop = locate() in T //find some blood here
var/list/objsonturf = range(0,T) if(!blood_prop) //first blood!
var/i blood_prop = new(T)
for(i=1, i<=objsonturf.len, i++) blood_prop.blood_DNA = self.data["blood_DNA"]
if(istype(objsonturf[i],/obj/decal/cleanable/blood)) blood_prop.blood_type = self.data["blood_type"]
return if(D && !blood_prop.virus) //TODO: multiple viruses
var/obj/decal/cleanable/blood/blood_prop = new /obj/decal/cleanable/blood(source2)
blood_prop.blood_DNA = self.data["blood_DNA"]
blood_prop.blood_type = self.data["blood_type"]
if(D)
blood_prop.virus = new D.type blood_prop.virus = new D.type
blood_prop.virus.holder = blood_prop blood_prop.virus.holder = blood_prop
if(istype(T, /turf/simulated/floor) && D) if(T.density==0)
blood_prop.virus.spread_type = CONTACT_FEET blood_prop.virus.spread_type = CONTACT_FEET
else if (D) else
blood_prop.virus.spread_type = CONTACT_HANDS blood_prop.virus.spread_type = CONTACT_HANDS
else if(istype(self.data["donor"], /mob/living/carbon/monkey)) else if(istype(self.data["donor"], /mob/living/carbon/monkey))
var/turf/simulated/source1 = T var/obj/decal/cleanable/blood/blood_prop = locate() in T
var/obj/decal/cleanable/blood/blood_prop = new /obj/decal/cleanable/blood(source1) if(!blood_prop)
blood_prop.blood_DNA = self.data["blood_DNA"] blood_prop = new(T)
if(D) blood_prop.blood_DNA = self.data["blood_DNA"]
if(D && !blood_prop.virus)
blood_prop.virus = new D.type blood_prop.virus = new D.type
blood_prop.virus.holder = blood_prop blood_prop.virus.holder = blood_prop
if(istype(T, /turf/simulated/floor)) if(T.density==0)
blood_prop.virus.spread_type = CONTACT_FEET blood_prop.virus.spread_type = CONTACT_FEET
else else
blood_prop.virus.spread_type = CONTACT_HANDS blood_prop.virus.spread_type = CONTACT_HANDS
else if(istype(self.data["donor"], /mob/living/carbon/alien)) else if(istype(self.data["donor"], /mob/living/carbon/alien))
var/turf/simulated/source2 = T var/obj/decal/cleanable/xenoblood/blood_prop = locate() in T
var/obj/decal/cleanable/xenoblood/blood_prop = new /obj/decal/cleanable/xenoblood(source2) if(!blood_prop)
if(D) blood_prop = new(T)
blood_prop.blood_DNA = self.data["blood_DNA"]
if(D && !blood_prop.virus)
blood_prop.virus = new D.type blood_prop.virus = new D.type
blood_prop.virus.holder = blood_prop blood_prop.virus.holder = blood_prop
if(istype(T, /turf/simulated/floor)) if(T.density==0)
blood_prop.virus.spread_type = CONTACT_FEET blood_prop.virus.spread_type = CONTACT_FEET
else else
blood_prop.virus.spread_type = CONTACT_HANDS blood_prop.virus.spread_type = CONTACT_HANDS
return return
/* Must check the transfering of reagents and their data first. They all can point to one disease datum. /* Must check the transfering of reagents and their data first. They all can point to one disease datum.
@@ -165,24 +164,25 @@ datum
description = "A ubiquitous chemical substance that is composed of hydrogen and oxygen." description = "A ubiquitous chemical substance that is composed of hydrogen and oxygen."
reagent_state = LIQUID reagent_state = LIQUID
reaction_turf(var/turf/T, var/volume) reaction_turf(var/turf/simulated/T, var/volume)
if (istype(T, /turf/space)) return if (!istype(T)) return
src = null src = null
if(volume >= 3) if(volume >= 3)
if(T:wet >= 1) return if(T.wet >= 1) return
T:wet = 1 T.wet = 1
if(T:wet_overlay) if(T.wet_overlay)
T:overlays -= T:wet_overlay T.overlays -= T.wet_overlay
T:wet_overlay = null T.wet_overlay = null
T:wet_overlay = image('water.dmi',T,"wet_floor") T.wet_overlay = image('water.dmi',T,"wet_floor")
T:overlays += T:wet_overlay T.overlays += T.wet_overlay
spawn(800) spawn(800)
if(T:wet >= 2) return if (!istype(T)) return
T:wet = 0 if(T.wet >= 2) return
if(T:wet_overlay) T.wet = 0
T:overlays -= T:wet_overlay if(T.wet_overlay)
T:wet_overlay = null T.overlays -= T.wet_overlay
T.wet_overlay = null
var/hotspot = (locate(/obj/hotspot) in T) var/hotspot = (locate(/obj/hotspot) in T)
if(hotspot && !istype(T, /turf/space)) if(hotspot && !istype(T, /turf/space))
@@ -210,16 +210,17 @@ datum
description = "Lubricant is a substance introduced between two moving surfaces to reduce the friction and wear between them. giggity." description = "Lubricant is a substance introduced between two moving surfaces to reduce the friction and wear between them. giggity."
reagent_state = LIQUID reagent_state = LIQUID
reaction_turf(var/turf/T, var/volume) reaction_turf(var/turf/simulated/T, var/volume)
if (istype(T, /turf/space)) return if (!istype(T)) return
src = null src = null
if(T:wet >= 2) return if(T.wet >= 2) return
T:wet = 2 T.wet = 2
spawn(800) spawn(800)
T:wet = 0 if (!istype(T)) return
if(T:wet_overlay) T.wet = 0
T:overlays -= T:wet_overlay if(T.wet_overlay)
T:wet_overlay = null T.overlays -= T.wet_overlay
T.wet_overlay = null
return return
bilk bilk
@@ -1430,23 +1431,25 @@ datum
M:nutrition += nutriment_factor M:nutrition += nutriment_factor
..() ..()
return return
reaction_turf(var/turf/T, var/volume) reaction_turf(var/turf/simulated/T, var/volume)
if (!istype(T)) return
src = null src = null
if(volume >= 3) if(volume >= 3)
if(T:wet >= 1) return if(T.wet >= 1) return
T:wet = 1 T.wet = 1
if(T:wet_overlay) if(T.wet_overlay)
T:overlays -= T:wet_overlay T.overlays -= T.wet_overlay
T:wet_overlay = null T.wet_overlay = null
T:wet_overlay = image('water.dmi',T,"wet_floor") T.wet_overlay = image('water.dmi',T,"wet_floor")
T:overlays += T:wet_overlay T.overlays += T.wet_overlay
spawn(800) spawn(800)
if(T:wet >= 2) return if (!istype(T)) return
T:wet = 0 if(T.wet >= 2) return
if(T:wet_overlay) T.wet = 0
T:overlays -= T:wet_overlay if(T.wet_overlay)
T:wet_overlay = null T.overlays -= T.wet_overlay
T.wet_overlay = null
var/hotspot = (locate(/obj/hotspot) in T) var/hotspot = (locate(/obj/hotspot) in T)
if(hotspot) if(hotspot)
var/datum/gas_mixture/lowertemp = T.remove_air( T:air:total_moles() ) var/datum/gas_mixture/lowertemp = T.remove_air( T:air:total_moles() )
@@ -2223,7 +2226,6 @@ datum
description = "Deny drinking this and prepare for THE LAW." description = "Deny drinking this and prepare for THE LAW."
reagent_state = LIQUID reagent_state = LIQUID
on_mob_life(var/mob/M) on_mob_life(var/mob/M)
spawn(5)
M.stunned = 2 M.stunned = 2
if(!data) data = 1 if(!data) data = 1
data++ data++

View File

@@ -815,7 +815,7 @@
user << "\red You cannot directly remove reagents from this object." user << "\red You cannot directly remove reagents from this object."
return return
var/trans = target.reagents.trans_to(src, target:amount_per_transfer_from_this) var/trans = target.reagents.trans_to(src, amount_per_transfer_from_this) // transfer from, transfer to - who cares?
user << "\blue You fill the syringe with [trans] units of the solution." user << "\blue You fill the syringe with [trans] units of the solution."
if (reagents.total_volume >= reagents.maximum_volume) if (reagents.total_volume >= reagents.maximum_volume)

View File

@@ -11,10 +11,11 @@
attack_hand(mob/user as mob) attack_hand(mob/user as mob)
src.wrapped.loc = (get_turf(src.loc)) if (src.wrapped) //sometimes items can disappear. For example, bombs. --rastaf0
if (istype(src.wrapped,/obj/closet)) src.wrapped.loc = (get_turf(src.loc))
var/obj/closet/O = src.wrapped if (istype(src.wrapped,/obj/closet))
O.welded = 0 var/obj/closet/O = src.wrapped
O.welded = 0
del(src) del(src)
return return
@@ -36,7 +37,8 @@
attack_hand(mob/user as mob) attack_hand(mob/user as mob)
src.wrapped.loc = (get_turf(src.loc)) if (src.wrapped) //sometimes items can disappear. For example, bombs. --rastaf0
src.wrapped.loc = (get_turf(src.loc))
del(src) del(src)
return return

View File

@@ -87,9 +87,10 @@
/datum/recipe/proc/make_food(var/obj/container as obj) /datum/recipe/proc/make_food(var/obj/container as obj)
var/obj/result_obj = new result(container) var/obj/result_obj = new result(container)
for (var/obj/O in (container.contents-result_obj)) for (var/obj/O in (container.contents-result_obj))
O.reagents.del_reagent("nutriment") if (O.reagents)
O.reagents.update_total() O.reagents.del_reagent("nutriment")
O.reagents.trans_to(result_obj, O.reagents.total_volume) O.reagents.update_total()
O.reagents.trans_to(result_obj, O.reagents.total_volume)
del(O) del(O)
container.reagents.clear_reagents() container.reagents.clear_reagents()
return result_obj return result_obj
@@ -110,7 +111,9 @@
var/i_count = 0 var/i_count = 0
. = possible_recipes[1] . = possible_recipes[1]
for (var/datum/recipe/recipe in possible_recipes) for (var/datum/recipe/recipe in possible_recipes)
if (recipe.items.len > i_count || (recipe.items.len == i_count && recipe.reagents.len > r_count )) 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 = recipe.reagents.len r_count = recipe.reagents.len
i_count = recipe.items.len i_count = recipe.items.len
. = recipe . = recipe

View File

@@ -34,7 +34,9 @@
"/obj/item/weapon/zippo", "/obj/item/weapon/zippo",
"/obj/item/weapon/cigpacket", "/obj/item/weapon/cigpacket",
"/obj/item/weapon/storage/pill_bottle", "/obj/item/weapon/storage/pill_bottle",
"/obj/item/weapon/medical") "/obj/item/weapon/medical",
"/obj/item/device/flashlight/pen"
)
flags = FPRINT | TABLEPASS | ONBELT flags = FPRINT | TABLEPASS | ONBELT
/obj/item/weapon/storage /obj/item/weapon/storage

View File

@@ -183,7 +183,7 @@
world << sound('intercept.ogg') world << sound('intercept.ogg')
check_finished() check_finished()
if(!changeling.current) if(!changeling)
return 1 return 1
if(istype(changeling.current,/mob/living/silicon)) if(istype(changeling.current,/mob/living/silicon))

View File

@@ -169,13 +169,7 @@
implants += W implants += W
for(var/obj/item/W in usr) for(var/obj/item/W in usr)
usr.u_equip(W) usr.drop_from_slot(W)
if (usr.client)
usr.client.screen -= W
if (W)
W.loc = usr.loc
W.dropped(usr)
W.layer = initial(W.layer)
usr.update_clothing() usr.update_clothing()
usr.monkeyizing = 1 usr.monkeyizing = 1

View File

@@ -36,13 +36,13 @@
event = 1 event = 1
command_alert("Space-time anomalies detected on the station. There is no additional data.", "Anomaly Alert") command_alert("Space-time anomalies detected on the station. There is no additional data.", "Anomaly Alert")
world << sound('spanomalies.ogg') world << sound('spanomalies.ogg')
var/list/turfs = list( ) var/list/turfs = new
var/turf/picked var/turf/picked
for(var/turf/T in world) for(var/turf/simulated/floor/T in world)
if(T.z == 1 && istype(T,/turf/simulated/floor) && !istype(T,/turf/space)) if(T.z == 1)
turfs += T turfs += T
for(var/turf/T in world) for(var/turf/simulated/floor/T in turfs)
if(prob(20) && T.z == 1 && istype(T,/turf/simulated/floor)) if(prob(20))
spawn(50+rand(0,3000)) spawn(50+rand(0,3000))
picked = pick(turfs) picked = pick(turfs)
var/obj/portal/P = new /obj/portal( T ) var/obj/portal/P = new /obj/portal( T )

View File

@@ -205,7 +205,7 @@ datum
return num_to_eat return num_to_eat
check_completion() check_completion()
if((owner.current.absorbed_dna.len - 1) >= num_to_eat) if(owner && owner.current && owner.current.absorbed_dna && ((owner.current.absorbed_dna.len - 1) >= num_to_eat))
return 1 return 1
else else
return 0 return 0

View File

@@ -275,6 +275,8 @@
return return
/obj/machinery/camera/attack_ai(var/mob/living/silicon/ai/user as mob) /obj/machinery/camera/attack_ai(var/mob/living/silicon/ai/user as mob)
if (!istype(user))
return
if (src.network != user.network || !(src.status)) if (src.network != user.network || !(src.status))
return return
user.current = src user.current = src

View File

@@ -91,13 +91,13 @@
new O.type (src) new O.type (src)
O:use(1) O:use(1)
user.visible_message( \ user.visible_message( \
"[user] has added one of [O] to \the [src].", \ "\blue [user] has added one of [O] to \the [src].", \
"\blue You add one of [O] to \the [src].") "\blue You add one of [O] to \the [src].")
else else
user.before_take_item(O) user.before_take_item(O)
O.loc = src O.loc = src
user.visible_message( \ user.visible_message( \
"[user] has added \the [O] to \the [src].", \ "\blue [user] has added \the [O] to \the [src].", \
"\blue You add \the [O] to \the [src].") "\blue You add \the [O] to \the [src].")
else if(istype(O,/obj/item/weapon/reagent_containers/glass) || \ else if(istype(O,/obj/item/weapon/reagent_containers/glass) || \
istype(O,/obj/item/weapon/reagent_containers/food/drinks) || \ istype(O,/obj/item/weapon/reagent_containers/food/drinks) || \

View File

@@ -331,7 +331,8 @@
R.amount-- R.amount--
throw_item = new dump_path(src.loc) throw_item = new dump_path(src.loc)
break break
if (!throw_item)
return 0
spawn(0) spawn(0)
throw_item.throw_at(target, 16, 3) throw_item.throw_at(target, 16, 3)
src.visible_message("\red <b>[src] launches [throw_item.name] at [target.name]!</b>") src.visible_message("\red <b>[src] launches [throw_item.name] at [target.name]!</b>")

View File

@@ -513,7 +513,10 @@ var/list/sacrificed = list()
communicate() communicate()
var/input = input(usr, "Please choose a message to tell to the other acolytes.", "Voice of Blood", "") as text|null var/input = input(usr, "Please choose a message to tell to the other acolytes.", "Voice of Blood", "") as text|null
if(!input) if(!input)
return fizzle() if (istype(src))
return fizzle()
else
return
if(istype(src,/obj/rune)) if(istype(src,/obj/rune))
usr.say("O bidai nabora se'sma!") usr.say("O bidai nabora se'sma!")
else else

View File

@@ -223,8 +223,9 @@
src.use_power = 2 src.use_power = 2
src.updateUsrDialog() src.updateUsrDialog()
sleep(get_construction_time_w_coeff(part,0.1)) sleep(get_construction_time_w_coeff(part,0.1))
if(!src) return //if(!src) return // you do not need to check it, all sleeping procedires will be terminated when src dies. -- rastaf0
src.use_power = 1 src.use_power = 1
if(!being_built) return //was runtime error with null.Move()
src.being_built.Move(get_step(src,EAST)) src.being_built.Move(get_step(src,EAST))
src.icon_state = initial(src.icon_state) src.icon_state = initial(src.icon_state)
src.visible_message("<b>[src]</b> beeps, \"The [src.being_built] is complete\".") src.visible_message("<b>[src]</b> beeps, \"The [src.being_built] is complete\".")

View File

@@ -108,7 +108,8 @@
return return
var/obj/mecha/Mech = M.loc var/obj/mecha/Mech = M.loc
spawn() //this helps prevent clickspam fest. spawn() //this helps prevent clickspam fest.
Mech.click_action(object,M) if (Mech)
Mech.click_action(object,M)
else else
return ..() return ..()

View File

@@ -24,7 +24,7 @@
user << "\red It appears to be broken." user << "\red It appears to be broken."
return return
var/obj/item/weapon/card/id/I = W var/obj/item/weapon/card/id/I = W
if (src.allowed(user) || !src.registered || (istype(W, /obj/item/weapon/card/id) && src.registered == I.registered)) if (src.allowed(user) || !src.registered || (istype(I) && (src.registered == I.registered)))
//they can open all lockers, or nobody owns this, or they own this locker //they can open all lockers, or nobody owns this, or they own this locker
src.locked = !( src.locked ) src.locked = !( src.locked )
for(var/mob/O in viewers(user, 3)) for(var/mob/O in viewers(user, 3))

View File

@@ -82,6 +82,8 @@ MASS SPECTROMETER
/obj/item/device/detective_scanner/attack(mob/living/carbon/human/M as mob, mob/user as mob) /obj/item/device/detective_scanner/attack(mob/living/carbon/human/M as mob, mob/user as mob)
if (!istype(M))
user << "\red [M] is not humas and cannot have the fingerprints."
if (( !( istype(M.dna, /datum/dna) ) || M.gloves) ) if (( !( istype(M.dna, /datum/dna) ) || M.gloves) )
user << "\blue No fingerprints found on [M]" user << "\blue No fingerprints found on [M]"
else else

View File

@@ -58,12 +58,9 @@ FINGERPRINT CARD
if(istype(W,/obj/item/weapon/photo)) if(istype(W,/obj/item/weapon/photo))
if(!(PHOTO)) if(!(PHOTO))
src.PHOTO = W src.PHOTO = W
usr.u_equip(W) usr.before_take_item(W)
W.loc = src W.loc = src
if ((usr.client && usr.s_active != src))
usr.client.screen -= W
//src.orient2hud(usr) //src.orient2hud(usr)
W.dropped(usr)
add_fingerprint(usr) add_fingerprint(usr)
usr << "\blue You add the photo to the ID" usr << "\blue You add the photo to the ID"
else else

View File

@@ -10,9 +10,9 @@
del(src) del(src)
/obj/item/weapon/tank/attack_self(mob/user as mob) /obj/item/weapon/tank/attack_self(mob/user as mob)
user.machine = src
if (!(src.air_contents)) if (!(src.air_contents))
return return
user.machine = src
var/using_internal var/using_internal
if(istype(loc,/mob/living/carbon)) if(istype(loc,/mob/living/carbon))
@@ -45,22 +45,26 @@
if(istype(loc,/mob/living/carbon)) if(istype(loc,/mob/living/carbon))
var/mob/living/carbon/location = loc var/mob/living/carbon/location = loc
if(location.internal == src) if(location.internal == src)
usr << "\blue You close the tank release valve." usr << "\blue You close \the [src] release valve."
if (location.internals) if (location.internals)
location.internals.icon_state = "internal0" location.internals.icon_state = "internal0"
else else
if(location.wear_mask && (location.wear_mask.flags & MASKINTERNALS)) if(location.wear_mask && (location.wear_mask.flags & MASKINTERNALS))
location.internal = src location.internal = src
usr << "\blue You open the tank valve." usr << "\blue You open \the [src] valve."
if (location.internals) if (location.internals)
location.internals.icon_state = "internal1" location.internals.icon_state = "internal1"
else else
usr << "\blue The valve immediately closes." usr << "\blue You need something to connect to \the [src]."
src.add_fingerprint(usr) src.add_fingerprint(usr)
/*
* the following is needed for a tank lying on the floor. But currently we restrict players to use not weared tanks as intrals. --rastaf
for(var/mob/M in viewers(1, src.loc)) for(var/mob/M in viewers(1, src.loc))
if ((M.client && M.machine == src)) if ((M.client && M.machine == src))
src.attack_self(M) src.attack_self(M)
*/
src.attack_self(usr)
else else
usr << browse(null, "window=tank") usr << browse(null, "window=tank")
return return
@@ -144,10 +148,10 @@
else if(integrity < 3) else if(integrity < 3)
integrity++ integrity++
/* redundant. --rastaf0
/obj/item/weapon/tank/attack(mob/M as mob, mob/user as mob) /obj/item/weapon/tank/attack(mob/M as mob, mob/user as mob)
..() ..()
*/
/* /*
if ((prob(30) && M.stat < 2)) if ((prob(30) && M.stat < 2))
var/mob/living/carbon/human/H = M var/mob/living/carbon/human/H = M
@@ -173,7 +177,7 @@
/obj/item/weapon/tank/attackby(obj/item/weapon/W as obj, mob/user as mob) /obj/item/weapon/tank/attackby(obj/item/weapon/W as obj, mob/user as mob)
..() ..()
var/obj/item/weapon/icon = src var/obj/icon = src
if (istype(src.loc, /obj/item/assembly)) if (istype(src.loc, /obj/item/assembly))
icon = src.loc icon = src.loc
if ((istype(W, /obj/item/device/analyzer) || (istype(W, /obj/item/device/pda))) && get_dist(user, src) <= 1) if ((istype(W, /obj/item/device/analyzer) || (istype(W, /obj/item/device/pda))) && get_dist(user, src) <= 1)
@@ -228,7 +232,7 @@
..() ..()
/obj/item/weapon/tank/examine() /obj/item/weapon/tank/examine()
var/obj/item/weapon/icon = src var/obj/icon = src
if (istype(src.loc, /obj/item/assembly)) if (istype(src.loc, /obj/item/assembly))
icon = src.loc icon = src.loc
if (!in_range(src, usr)) if (!in_range(src, usr))
@@ -371,7 +375,8 @@
ground_zero.assume_air(air_contents) ground_zero.assume_air(air_contents)
ground_zero.hotspot_expose(1000, 125) ground_zero.hotspot_expose(1000, 125)
if(src.master) del(src.master) if(src.master)
del(src.master)
del(src) del(src)
/obj/item/weapon/tank/plasma/attackby(obj/item/weapon/W as obj, mob/user as mob) /obj/item/weapon/tank/plasma/attackby(obj/item/weapon/W as obj, mob/user as mob)
@@ -381,178 +386,128 @@
var/obj/item/assembly/rad_ignite/S = W var/obj/item/assembly/rad_ignite/S = W
if (!( S.status )) if (!( S.status ))
return return
var/obj/item/assembly/r_i_ptank/R = new /obj/item/assembly/r_i_ptank( user ) var/obj/item/assembly/r_i_ptank/R = new
R.part1 = S.part1 R.part1 = S.part1
S.part1.loc = R S.part1.loc = R
S.part1.master = R S.part1.master = R
R.part2 = S.part2 R.part2 = S.part2
S.part2.loc = R S.part2.loc = R
S.part2.master = R S.part2.master = R
S.layer = initial(S.layer)
if (user.client)
user.client.screen -= S
if (user.r_hand == S)
user.u_equip(S)
user.r_hand = R
else
user.u_equip(S)
user.l_hand = R
src.master = R src.master = R
src.layer = initial(src.layer)
user.u_equip(src)
if (user.client)
user.client.screen -= src
src.loc = R
R.part3 = src R.part3 = src
R.layer = 20
R.loc = user user.put_in_hand(R)
user.before_take_item(src)
src.loc = R
S.part1 = null S.part1 = null
S.part2 = null S.part2 = null
//S = null
del(S) del(S)
if (istype(W, /obj/item/assembly/prox_ignite)) if (istype(W, /obj/item/assembly/prox_ignite))
var/obj/item/assembly/prox_ignite/S = W var/obj/item/assembly/prox_ignite/S = W
if (!( S.status )) if (!( S.status ))
return return
var/obj/item/assembly/m_i_ptank/R = new /obj/item/assembly/m_i_ptank( user ) var/obj/item/assembly/m_i_ptank/R = new
R.part1 = S.part1 R.part1 = S.part1
S.part1.loc = R S.part1.loc = R
S.part1.master = R S.part1.master = R
R.part2 = S.part2 R.part2 = S.part2
S.part2.loc = R S.part2.loc = R
S.part2.master = R S.part2.master = R
S.layer = initial(S.layer)
if (user.client)
user.client.screen -= S
if (user.r_hand == S)
user.u_equip(S)
user.r_hand = R
else
user.u_equip(S)
user.l_hand = R
src.master = R src.master = R
src.layer = initial(src.layer)
user.u_equip(src)
if (user.client)
user.client.screen -= src
src.loc = R
R.part3 = src R.part3 = src
R.layer = 20
R.loc = user user.put_in_hand(R)
user.before_take_item(src)
src.loc = R
S.part1 = null S.part1 = null
S.part2 = null S.part2 = null
//S = null
del(S) del(S)
if (istype(W, /obj/item/assembly/time_ignite)) if (istype(W, /obj/item/assembly/time_ignite))
var/obj/item/assembly/time_ignite/S = W var/obj/item/assembly/time_ignite/S = W
if (!( S.status )) if (!( S.status ))
return return
var/obj/item/assembly/t_i_ptank/R = new /obj/item/assembly/t_i_ptank( user ) var/obj/item/assembly/t_i_ptank/R = new
R.part1 = S.part1 R.part1 = S.part1
if (S.part1) S.part1.loc = R
S.part1.loc = R S.part1.master = R
S.part1.master = R
R.part2 = S.part2 R.part2 = S.part2
if (S.part2) S.part2.loc = R
S.part2.loc = R S.part2.master = R
S.part2.master = R
S.layer = initial(S.layer)
if (user.client)
user.client.screen -= S
if (user.r_hand == S)
user.u_equip(S)
user.r_hand = R
else
user.u_equip(S)
user.l_hand = R
src.master = R src.master = R
src.layer = initial(src.layer)
user.u_equip(src)
if (user.client)
user.client.screen -= src
src.loc = R
R.part3 = src R.part3 = src
R.layer = 20
R.loc = user user.put_in_hand(R)
user.before_take_item(src)
src.loc = R
S.part1 = null S.part1 = null
S.part2 = null S.part2 = null
//S = null
del(S) del(S)
if (istype(W, /obj/item/assembly/a_i_a)) if (istype(W, /obj/item/assembly/a_i_a))
var/obj/item/assembly/a_i_a/S = W var/obj/item/assembly/a_i_a/S = W
if (!( S.status )) if (!( S.status ))
return return
var/obj/item/clothing/suit/armor/a_i_a_ptank/R = new /obj/item/clothing/suit/armor/a_i_a_ptank( user ) var/obj/item/clothing/suit/armor/a_i_a_ptank/R = new
R.part1 = S.part1 R.part1 = S.part1
S.part1.loc = R S.part1.loc = R
S.part1.master = R S.part1.master = R
R.part2 = S.part2 R.part2 = S.part2
S.part2.loc = R S.part2.loc = R
S.part2.master = R S.part2.master = R
R.part3 = S.part3 R.part3 = S.part3
S.part3.loc = R S.part3.loc = R
S.part3.master = R S.part3.master = R
S.layer = initial(S.layer)
if (user.client)
user.client.screen -= S
if (user.r_hand == S)
user.u_equip(S)
user.r_hand = R
else
user.u_equip(S)
user.l_hand = R
src.master = R src.master = R
src.layer = initial(src.layer)
user.u_equip(src)
if (user.client)
user.client.screen -= src
src.loc = R
R.part4 = src R.part4 = src
R.layer = 20
R.loc = user user.put_in_hand(R)
user.before_take_item(src)
src.loc = R
S.part1 = null S.part1 = null
S.part2 = null S.part2 = null
S.part3 = null S.part3 = null
//S = null
del(S) del(S)
// PantsNote: More flamethrower assembly code. WOO! // PantsNote: More flamethrower assembly code. WOO!
if (istype(W, /obj/item/assembly/w_r_ignite)) if (istype(W, /obj/item/assembly/w_r_ignite))
var/obj/item/assembly/w_r_ignite/S = W var/obj/item/assembly/w_r_ignite/S = W
if (!( S.status )) if (!( S.status ))
return return
var/obj/item/weapon/flamethrower/R = new /obj/item/weapon/flamethrower( user ) var/obj/item/weapon/flamethrower/R = new
R.part1 = S.part1 R.part1 = S.part1
S.part1.loc = R S.part1.loc = R
S.part1.master = R S.part1.master = R
R.part2 = S.part2 R.part2 = S.part2
S.part2.loc = R S.part2.loc = R
S.part2.master = R S.part2.master = R
R.part3 = S.part3 R.part3 = S.part3
S.part3.loc = R S.part3.loc = R
S.part3.master = R S.part3.master = R
S.layer = initial(S.layer)
if (user.client)
user.client.screen -= S
if (user.r_hand == S)
user.u_equip(S)
user.r_hand = R
else
user.u_equip(S)
user.l_hand = R
src.master = R src.master = R
src.layer = initial(src.layer)
user.u_equip(src)
if (user.client)
user.client.screen -= src
src.loc = R
R.part4 = src R.part4 = src
R.layer = 20
R.loc = user user.put_in_hand(R)
user.before_take_item(src)
src.loc = R
S.part1 = null S.part1 = null
S.part2 = null S.part2 = null
S.part3 = null S.part3 = null
//S = null
del(S) del(S)
return
return

View File

@@ -114,6 +114,8 @@
return return
/obj/item/assembly/time_ignite/receive_signal() /obj/item/assembly/time_ignite/receive_signal()
if (!status)
return
for(var/mob/O in hearers(1, src.loc)) for(var/mob/O in hearers(1, src.loc))
O.show_message(text("\icon[] *beep* *beep*", src), 3, "*beep* *beep*", 2) O.show_message(text("\icon[] *beep* *beep*", src), 3, "*beep* *beep*", 2)
src.part2.ignite() src.part2.ignite()
@@ -130,14 +132,12 @@
var/turf/T = src.loc var/turf/T = src.loc
if (ismob(T)) if (ismob(T))
T = T.loc T = T.loc
if (src.part1) src.part1.loc = T
src.part1.loc = T src.part1.master = null
src.part1.master = null src.part1 = null
src.part1 = null src.part2.loc = T
if (src.part2) src.part2.master = null
src.part2.loc = T src.part2 = null
src.part2.master = null
src.part2 = null
del(src) del(src)
return return
@@ -148,8 +148,7 @@
user.show_message("\blue The timer is now secured!", 1) user.show_message("\blue The timer is now secured!", 1)
else else
user.show_message("\blue The timer is now unsecured!", 1) user.show_message("\blue The timer is now unsecured!", 1)
if (src.part2) src.part2.status = src.status
src.part2.status = src.status
src.add_fingerprint(user) src.add_fingerprint(user)
return return
@@ -166,10 +165,10 @@
if (ismob(T)) if (ismob(T))
T = T.loc T = T.loc
src.part1.loc = T src.part1.loc = T
src.part2.loc = T
src.part1.master = null src.part1.master = null
src.part2.master = null
src.part1 = null src.part1 = null
src.part2.loc = T
src.part2.master = null
src.part2 = null src.part2 = null
del(src) del(src)
@@ -183,7 +182,22 @@
src.part2.status = src.status src.part2.status = src.status
src.add_fingerprint(user) src.add_fingerprint(user)
if(( istype(W, /obj/item/clothing/suit/armor/vest) ) && src.status) if(( istype(W, /obj/item/clothing/suit/armor/vest) ) && src.status)
var/obj/item/assembly/a_i_a/R = new /obj/item/assembly/a_i_a( user ) var/obj/item/assembly/a_i_a/R = new
R.part1 = part1
R.part1.master = R
part1 = null
R.part2 = part2
R.part2.master = R
part2 = null
user.put_in_hand(R)
user.before_take_item(W)
R.part3 = W
R.part3.master = R
del(src)
/* WTF THIS SHIT? It is working? Shouldn't. --rastaf0
W.loc = R W.loc = R
R.part1 = W R.part1 = W
R.part2 = W R.part2 = W
@@ -207,6 +221,7 @@
R.layer = 20 R.layer = 20
R.loc = user R.loc = user
src.add_fingerprint(user) src.add_fingerprint(user)
*/
return return
/* else if ((istype(W, /obj/item/device/timer) && !( src.status ))) /* else if ((istype(W, /obj/item/device/timer) && !( src.status )))
@@ -241,18 +256,21 @@
if (ismob(T)) if (ismob(T))
T = T.loc T = T.loc
src.part1.loc = T src.part1.loc = T
src.part2.loc = T
src.part3.loc = T
src.part1.master = null src.part1.master = null
src.part2.master = null
src.part3.master = null
src.part1 = null src.part1 = null
src.part2.loc = T
src.part2.master = null
src.part2 = null src.part2 = null
src.part3.loc = T
src.part3.master = null
src.part3 = null src.part3 = null
del(src) del(src)
return return
if (( istype(W, /obj/item/weapon/screwdriver) )) if (( istype(W, /obj/item/weapon/screwdriver) ))
if (!src.status && (!part1||!part2||!part3))
user << "\red You cannot finish the assembly, not all components are in place!"
return
src.status = !( src.status ) src.status = !( src.status )
if (src.status) if (src.status)
user.show_message("\blue The armor is now secured!", 1) user.show_message("\blue The armor is now secured!", 1)
@@ -306,7 +324,6 @@
return return
/obj/item/assembly/rad_time/attack_self(mob/user as mob) /obj/item/assembly/rad_time/attack_self(mob/user as mob)
src.part1.attack_self(user, src.status) src.part1.attack_self(user, src.status)
src.part2.attack_self(user, src.status) src.part2.attack_self(user, src.status)
src.add_fingerprint(user) src.add_fingerprint(user)
@@ -369,7 +386,6 @@
return return
/obj/item/assembly/rad_prox/receive_signal(datum/signal/signal) /obj/item/assembly/rad_prox/receive_signal(datum/signal/signal)
if (!src.part2 || !src.part1) return
if (signal.source == src.part2) if (signal.source == src.part2)
src.part1.send_signal("ACTIVATE") src.part1.send_signal("ACTIVATE")
return return
@@ -425,7 +441,6 @@
return return
/obj/item/assembly/rad_infra/attack_self(mob/user as mob) /obj/item/assembly/rad_infra/attack_self(mob/user as mob)
src.part1.attack_self(user, src.status) src.part1.attack_self(user, src.status)
src.part2.attack_self(user, src.status) src.part2.attack_self(user, src.status)
src.add_fingerprint(user) src.add_fingerprint(user)
@@ -516,7 +531,8 @@
/obj/item/assembly/prox_ignite/attack_self(mob/user as mob) /obj/item/assembly/prox_ignite/attack_self(mob/user as mob)
src.part1.attack_self(user, src.status) if (src.part1)
src.part1.attack_self(user, src.status)
src.add_fingerprint(user) src.add_fingerprint(user)
return return
@@ -578,7 +594,8 @@
/obj/item/assembly/rad_ignite/attack_self(mob/user as mob) /obj/item/assembly/rad_ignite/attack_self(mob/user as mob)
src.part1.attack_self(user, src.status) if (src.part1)
src.part1.attack_self(user, src.status)
src.add_fingerprint(user) src.add_fingerprint(user)
return return
@@ -631,13 +648,13 @@
/obj/item/assembly/m_i_ptank/dropped() /obj/item/assembly/m_i_ptank/dropped()
spawn( 0 ) spawn( 0 )
src.part1.sense() part1.sense()
return return
return return
/obj/item/assembly/m_i_ptank/examine() /obj/item/assembly/m_i_ptank/examine()
..() ..()
src.part3.examine() part3.examine()
/obj/item/assembly/m_i_ptank/Del() /obj/item/assembly/m_i_ptank/Del()
@@ -654,36 +671,25 @@
..() ..()
if (istype(W, /obj/item/device/analyzer)) if (istype(W, /obj/item/device/analyzer))
src.part3.attackby(W, user) src.part3.attackby(W, user)
return
if ((istype(W, /obj/item/weapon/wrench) && !( src.status ))) if ((istype(W, /obj/item/weapon/wrench) && !( src.status )))
var/obj/item/assembly/prox_ignite/R = new /obj/item/assembly/prox_ignite( ) var/obj/item/assembly/prox_ignite/R = new(get_turf(src.loc))
R.part1 = src.part1 R.part1 = src.part1
R.part1.master = R
R.part1.loc = R
R.part2 = src.part2 R.part2 = src.part2
R.loc = src.loc R.part2.master = R
if (user.r_hand == src) R.part2.loc = R
user.r_hand = R if (user.get_inactive_hand()==src)
R.layer = 20 user.put_in_inactive_hand(part3)
else else
if (user.l_hand == src) part3.loc = src.loc
user.l_hand = R
R.layer = 20
src.part1.loc = R
src.part2.loc = R
src.part1.master = R
src.part2.master = R
var/turf/T = src.loc
if (!( istype(T, /turf) ))
T = T.loc
if (!( istype(T, /turf) ))
T = T.loc
src.part3.loc = T
src.part1 = null src.part1 = null
src.part2 = null src.part2 = null
src.part3 = null src.part3 = null
//SN src = null
del(src) del(src)
return return
if (!( istype(W, /obj/item/weapon/weldingtool) )) if (!( istype(W, /obj/item/weapon/weldingtool)&&W:welding ))
return return
if (!( src.status )) if (!( src.status ))
src.status = 1 src.status = 1
@@ -754,35 +760,22 @@
if (istype(W, /obj/item/device/analyzer)) if (istype(W, /obj/item/device/analyzer))
src.part3.attackby(W, user) src.part3.attackby(W, user)
return
if ((istype(W, /obj/item/weapon/wrench) && !( src.status ))) if ((istype(W, /obj/item/weapon/wrench) && !( src.status )))
var/obj/item/assembly/time_ignite/R = new /obj/item/assembly/time_ignite( ) var/obj/item/assembly/time_ignite/R = new(get_turf(src.loc))
R.part1 = src.part1 R.part1 = src.part1
R.part1.master = R
R.part1.loc = R
R.part2 = src.part2 R.part2 = src.part2
R.loc = src.loc R.part2.master = R
if (user.r_hand == src) R.part2.loc = R
user.r_hand = R if (user.get_inactive_hand()==src)
R.layer = 20 user.put_in_inactive_hand(part3)
else else
if (user.l_hand == src) part3.loc = src.loc
user.l_hand = R
R.layer = 20
if(src.part1)
src.part1.loc = R
src.part1.master = R
if(src.part2)
src.part2.loc = R
src.part2.master = R
var/turf/T = src.loc
if (!( istype(T, /turf) ))
T = T.loc
if (!( istype(T, /turf) ))
T = T.loc
src.part3.loc = T
src.part1 = null src.part1 = null
src.part2 = null src.part2 = null
src.part3 = null src.part3 = null
//SN src = null
del(src) del(src)
return return
if (!( istype(W, /obj/item/weapon/weldingtool) && W:welding)) if (!( istype(W, /obj/item/weapon/weldingtool) && W:welding))
@@ -798,15 +791,13 @@
bombers += "[key_name(user)] unwelded a time bomb. Temp: [src.part3.air_contents.temperature-T0C]" bombers += "[key_name(user)] unwelded a time bomb. Temp: [src.part3.air_contents.temperature-T0C]"
user << "\blue The hole has been closed." user << "\blue The hole has been closed."
src.part2.status = src.status src.part2.status = src.status
src.add_fingerprint(user) src.add_fingerprint(user)
return return
/obj/item/assembly/t_i_ptank/attack_self(mob/user as mob) /obj/item/assembly/t_i_ptank/attack_self(mob/user as mob)
if (src.part1) src.part1.attack_self(user, 1)
src.part1.attack_self(user, 1) playsound(src.loc, 'armbomb.ogg', 100, 1)
playsound(src.loc, 'armbomb.ogg', 100, 1)
src.add_fingerprint(user) src.add_fingerprint(user)
return return
@@ -848,33 +839,22 @@
if (istype(W, /obj/item/device/analyzer)) if (istype(W, /obj/item/device/analyzer))
src.part3.attackby(W, user) src.part3.attackby(W, user)
return
if ((istype(W, /obj/item/weapon/wrench) && !( src.status ))) if ((istype(W, /obj/item/weapon/wrench) && !( src.status )))
var/obj/item/assembly/rad_ignite/R = new /obj/item/assembly/rad_ignite( ) var/obj/item/assembly/rad_ignite/R = new(get_turf(src.loc))
R.part1 = src.part1 R.part1 = src.part1
R.part1.master = R
R.part1.loc = R
R.part2 = src.part2 R.part2 = src.part2
R.loc = src.loc R.part2.master = R
if (user.r_hand == src) R.part2.loc = R
user.r_hand = R if (user.get_inactive_hand()==src)
R.layer = 20 user.put_in_inactive_hand(part3)
else else
if (user.l_hand == src) part3.loc = src.loc
user.l_hand = R
R.layer = 20
src.part1.loc = R
src.part2.loc = R
src.part1.master = R
src.part2.master = R
var/turf/T = src.loc
if (!( istype(T, /turf) ))
T = T.loc
if (!( istype(T, /turf) ))
T = T.loc
src.part3.loc = T
src.part1 = null src.part1 = null
src.part2 = null src.part2 = null
src.part3 = null src.part3 = null
//SN src = null
del(src) del(src)
return return
if (!( istype(W, /obj/item/weapon/weldingtool) && W:welding )) if (!( istype(W, /obj/item/weapon/weldingtool) && W:welding ))
@@ -904,37 +884,26 @@
..() ..()
if (istype(W, /obj/item/device/analyzer)) if (istype(W, /obj/item/device/analyzer))
src.part4.attackby(W, user) src.part4.attackby(W, user)
return
if ((istype(W, /obj/item/weapon/wrench) && !( src.status ))) if ((istype(W, /obj/item/weapon/wrench) && !( src.status )))
var/obj/item/assembly/a_i_a/R = new /obj/item/assembly/a_i_a( ) var/obj/item/assembly/a_i_a/R = new(get_turf(src.loc))
R.part1 = src.part1 R.part1 = src.part1
R.part1.master = R
R.part1.loc = R
R.part2 = src.part2 R.part2 = src.part2
R.part2.master = R
R.part2.loc = R
R.part3 = src.part3 R.part3 = src.part3
R.loc = src.loc R.part3.master = R
if (user.r_hand == src) R.part3.loc = R
user.r_hand = R if (user.get_inactive_hand()==src)
R.layer = 20 user.put_in_inactive_hand(part4)
else else
if (user.l_hand == src) part4.loc = src.loc
user.l_hand = R
R.layer = 20
src.part1.loc = R
src.part2.loc = R
src.part3.loc = R
src.part1.master = R
src.part2.master = R
src.part3.master = R
var/turf/T = src.loc
if (!( istype(T, /turf) ))
T = T.loc
if (!( istype(T, /turf) ))
T = T.loc
src.part4.loc = T
src.part1 = null src.part1 = null
src.part2 = null src.part2 = null
src.part3 = null src.part3 = null
src.part4 = null src.part4 = null
//SN src = null
del(src) del(src)
return return
if (( istype(W, /obj/item/weapon/weldingtool) && W:welding)) if (( istype(W, /obj/item/weapon/weldingtool) && W:welding))
@@ -953,10 +922,8 @@
return return
/obj/item/assembly/r_i_ptank/attack_self(mob/user as mob) /obj/item/assembly/r_i_ptank/attack_self(mob/user as mob)
playsound(src.loc, 'armbomb.ogg', 100, 1)
if (src.part1) src.part1.attack_self(user, 1)
playsound(src.loc, 'armbomb.ogg', 100, 1)
src.part1.attack_self(user, 1)
src.add_fingerprint(user) src.add_fingerprint(user)
return return

View File

@@ -46,7 +46,7 @@ Note: Must be placed within 3 tiles of the R&D Console
if (!opened) if (!opened)
opened = 1 opened = 1
if(linked_console) if(linked_console)
linked_console.linked_lathe = null linked_console.linked_destroy = null
linked_console = null linked_console = null
icon_state = "d_analyzer_t" icon_state = "d_analyzer_t"
user << "You open the maintenance hatch of [src]." user << "You open the maintenance hatch of [src]."

View File

@@ -5,14 +5,7 @@
src << "Only administrators may use this command." src << "Only administrators may use this command."
return return
for(var/obj/item/W in M) for(var/obj/item/W in M)
if (istype(W,/obj/item)) M.drop_from_slot(W)
M.u_equip(W)
if (M.client)
M.client.screen -= W
if (W)
W.loc = M.loc
W.dropped(M)
W.layer = initial(W.layer)
log_admin("[key_name(usr)] made [key_name(M)] drop everything!") log_admin("[key_name(usr)] made [key_name(M)] drop everything!")
message_admins("[key_name_admin(usr)] made [key_name_admin(M)] drop everything!", 1) message_admins("[key_name_admin(usr)] made [key_name_admin(M)] drop everything!", 1)
@@ -29,14 +22,7 @@
return return
//strip their stuff before they teleport into a cell :downs: //strip their stuff before they teleport into a cell :downs:
for(var/obj/item/W in M) for(var/obj/item/W in M)
if (!istype(W,/datum/organ)) M.drop_from_slot(W)
M.u_equip(W)
if (M.client)
M.client.screen -= W
if (W)
W.loc = M.loc
W.dropped(M)
W.layer = initial(W.layer)
//teleport person to cell //teleport person to cell
M.paralysis += 5 M.paralysis += 5
sleep(5) //so they black out before warping sleep(5) //so they black out before warping

View File

@@ -173,4 +173,13 @@ var/list/karma_spenders = list()
src << "You are now excluded from alien candidate lists until end of round." src << "You are now excluded from alien candidate lists until end of round."
else if(!src.client.be_alien) else if(!src.client.be_alien)
src.client.be_alien = 1 src.client.be_alien = 1
src << "You are now included in alien candidate lists until end of round." src << "You are now included in alien candidate lists until end of round."
/mob/dead/observer/memory()
set hidden = 1
src << "\red You are dead! You have no mind to store memory!"
/mob/dead/observer/add_memory()
set hidden = 1
src << "\red You are dead! You have no mind to store memory!"

View File

@@ -13,15 +13,18 @@ Doesn't work on other aliens/AI.*/
if(src.stat) if(src.stat)
src << "\green You must be conscious to do this." src << "\green You must be conscious to do this."
return return
if(src.toxloss >= 100) if(!isturf(src.loc) || istype(src.loc, /turf/space))
src.toxloss -= 100 src << "\green Bad place for garden!"
for(var/mob/O in viewers(src, null)) return
O.show_message(text("\green <B>[src] has planted some alien weeds!</B>"), 1) if(src.toxloss < 100)
var/obj/alien/weeds/W = new /obj/alien/weeds(src.loc)
W.Life()
else
src << "\green Not enough plasma stored." src << "\green Not enough plasma stored."
return
src.toxloss -= 100
for(var/mob/O in viewers(src, null))
O.show_message(text("\green <B>[src] has planted some alien weeds!</B>"), 1)
var/obj/alien/weeds/W = new (src.loc)
W.Life()
return return
/mob/living/carbon/alien/humanoid/verb/call_to() /mob/living/carbon/alien/humanoid/verb/call_to()

View File

@@ -1,18 +1,18 @@
/mob/living/carbon/alien/humanoid/drone/New() /mob/living/carbon/alien/humanoid/drone/New()
var/datum/reagents/R = new/datum/reagents(100)
reagents = R
R.my_atom = src
if(src.name == "alien drone")
src.name = text("alien drone ([rand(1, 1000)])")
src.real_name = src.name
spawn (1) spawn (1)
src.verbs += /mob/living/carbon/alien/humanoid/proc/corrode_target src.verbs += /mob/living/carbon/alien/humanoid/proc/corrode_target
src.verbs -= /mob/living/carbon/alien/humanoid/verb/call_to src.verbs -= /mob/living/carbon/alien/humanoid/verb/call_to
var/datum/reagents/R = new/datum/reagents(100)
reagents = R
R.my_atom = src
src.stand_icon = new /icon('alien.dmi', "aliend_s") src.stand_icon = new /icon('alien.dmi', "aliend_s")
src.lying_icon = new /icon('alien.dmi', "aliend_l") src.lying_icon = new /icon('alien.dmi', "aliend_l")
src.icon = src.stand_icon src.icon = src.stand_icon
if(src.name == "alien drone") src.name = text("alien drone ([rand(1, 1000)])")
src.real_name = src.name
src << "\blue Your icons have been generated!"
update_clothing() update_clothing()
src << "\blue Your icons have been generated!"
//Drones use the same base as generic humanoids. //Drones use the same base as generic humanoids.
//Drone verbs //Drone verbs

View File

@@ -1,17 +1,17 @@
/mob/living/carbon/alien/humanoid/hunter/New() /mob/living/carbon/alien/humanoid/hunter/New()
var/datum/reagents/R = new/datum/reagents(100)
reagents = R
R.my_atom = src
if(src.name == "alien hunter")
src.name = text("alien hunter ([rand(1, 1000)])")
src.real_name = src.name
spawn (1) spawn (1)
src.verbs -= /mob/living/carbon/alien/humanoid/verb/corrode src.verbs -= /mob/living/carbon/alien/humanoid/verb/corrode
var/datum/reagents/R = new/datum/reagents(100)
reagents = R
R.my_atom = src
src.stand_icon = new /icon('alien.dmi', "alienh_s") src.stand_icon = new /icon('alien.dmi', "alienh_s")
src.lying_icon = new /icon('alien.dmi', "alienh_l") src.lying_icon = new /icon('alien.dmi', "alienh_l")
src.icon = src.stand_icon src.icon = src.stand_icon
if(src.name == "alien hunter") src.name = text("alien hunter ([rand(1, 1000)])")
src.real_name = src.name
src << "\blue Your icons have been generated!"
update_clothing() update_clothing()
src << "\blue Your icons have been generated!"
/mob/living/carbon/alien/humanoid/hunter /mob/living/carbon/alien/humanoid/hunter

View File

@@ -1,17 +1,17 @@
/mob/living/carbon/alien/humanoid/sentinel/New() /mob/living/carbon/alien/humanoid/sentinel/New()
var/datum/reagents/R = new/datum/reagents(100)
reagents = R
R.my_atom = src
if(src.name == "alien sentinel")
src.name = text("alien sentinel ([rand(1, 1000)])")
src.real_name = src.name
spawn (1) spawn (1)
src.verbs += /mob/living/carbon/alien/humanoid/proc/corrode_target src.verbs += /mob/living/carbon/alien/humanoid/proc/corrode_target
var/datum/reagents/R = new/datum/reagents(100)
reagents = R
R.my_atom = src
src.stand_icon = new /icon('alien.dmi', "aliens_s") src.stand_icon = new /icon('alien.dmi', "aliens_s")
src.lying_icon = new /icon('alien.dmi', "aliens_l") src.lying_icon = new /icon('alien.dmi', "aliens_l")
src.icon = src.stand_icon src.icon = src.stand_icon
if(src.name == "alien sentinel") src.name = text("alien sentinel ([rand(1, 1000)])")
src.real_name = src.name
src << "\blue Your icons have been generated!"
update_clothing() update_clothing()
src << "\blue Your icons have been generated!"
/mob/living/carbon/alien/humanoid/sentinel /mob/living/carbon/alien/humanoid/sentinel

View File

@@ -1,20 +1,19 @@
//This is fine right now, if we're adding organ specific damage this needs to be updated //This is fine right now, if we're adding organ specific damage this needs to be updated
/mob/living/carbon/alien/humanoid/New() /mob/living/carbon/alien/humanoid/New()
var/datum/reagents/R = new/datum/reagents(100)
reagents = R
R.my_atom = src
if(src.name == "alien")
src.name = text("alien ([rand(1, 1000)])")
src.real_name = src.name
spawn (1) spawn (1)
var/datum/reagents/R = new/datum/reagents(100)
reagents = R
R.my_atom = src
if(!istype(src, /mob/living/carbon/alien/humanoid/queen)) if(!istype(src, /mob/living/carbon/alien/humanoid/queen))
src.stand_icon = new /icon('alien.dmi', "alien_s") src.stand_icon = new /icon('alien.dmi', "alien_s")
src.lying_icon = new /icon('alien.dmi', "alien_l") src.lying_icon = new /icon('alien.dmi', "alien_l")
src.icon = src.stand_icon src.icon = src.stand_icon
if(src.name == "alien") src.name = text("alien ([rand(1, 1000)])")
src.real_name = src.name
src << "\blue Your icons have been generated!"
update_clothing() update_clothing()
src << "\blue Your icons have been generated!"
..() ..()

View File

@@ -1,21 +1,20 @@
/mob/living/carbon/alien/humanoid/queen/New() /mob/living/carbon/alien/humanoid/queen/New()
var/datum/reagents/R = new/datum/reagents(100)
reagents = R
R.my_atom = src
//there should only be one queen
// if(src.name == "alien")
// src.name = text("alien ([rand(1, 1000)])")
src.real_name = src.name
spawn (1) spawn (1)
src.verbs += /mob/living/carbon/alien/humanoid/proc/corrode_target src.verbs += /mob/living/carbon/alien/humanoid/proc/corrode_target
src.verbs += /mob/living/carbon/alien/humanoid/sentinel/verb/spit src.verbs += /mob/living/carbon/alien/humanoid/sentinel/verb/spit
src.verbs -= /mob/living/carbon/alien/humanoid/verb/ventcrawl src.verbs -= /mob/living/carbon/alien/humanoid/verb/ventcrawl
var/datum/reagents/R = new/datum/reagents(100)
reagents = R
R.my_atom = src
src.stand_icon = new /icon('alien.dmi', "queen_s") src.stand_icon = new /icon('alien.dmi', "queen_s")
src.lying_icon = new /icon('alien.dmi', "queen_l") src.lying_icon = new /icon('alien.dmi', "queen_l")
src.icon = src.stand_icon src.icon = src.stand_icon
//there should only be one queen
// if(src.name == "alien") src.name = text("alien ([rand(1, 1000)])")
src.real_name = src.name
src << "\blue Your icons have been generated!"
update_clothing() update_clothing()
src << "\blue Your icons have been generated!"
/mob/living/carbon/alien/humanoid/queen /mob/living/carbon/alien/humanoid/queen

View File

@@ -1,15 +1,14 @@
//This is fine right now, if we're adding organ specific damage this needs to be updated //This is fine right now, if we're adding organ specific damage this needs to be updated
/mob/living/carbon/alien/larva/New() /mob/living/carbon/alien/larva/New()
var/datum/reagents/R = new/datum/reagents(100)
reagents = R
R.my_atom = src
if(src.name == "alien larva")
src.name = text("alien larva ([rand(1, 1000)])")
src.real_name = src.name
spawn (1) spawn (1)
var/datum/reagents/R = new/datum/reagents(100)
reagents = R
R.my_atom = src
if(src.name == "alien larva") src.name = text("alien larva ([rand(1, 1000)])")
src.real_name = src.name
src << "\blue Your icons have been generated!"
update_clothing() update_clothing()
src << "\blue Your icons have been generated!"
// spawn(1200) grow() Grow after 120 seconds -- TLE Commented out because life.dm has better version -- Urist // spawn(1200) grow() Grow after 120 seconds -- TLE Commented out because life.dm has better version -- Urist
..() ..()

View File

@@ -2,10 +2,10 @@
var/obj/item/device/mmi/container = null var/obj/item/device/mmi/container = null
New() New()
spawn(1) var/datum/reagents/R = new/datum/reagents(1000)
var/datum/reagents/R = new/datum/reagents(1000) reagents = R
reagents = R R.my_atom = src
R.my_atom = src ..()
say_understands(var/other) say_understands(var/other)
if (istype(other, /mob/living/silicon/ai)) if (istype(other, /mob/living/silicon/ai))

View File

@@ -7,62 +7,59 @@
if (!dna) if (!dna)
dna = new /datum/dna( null ) dna = new /datum/dna( null )
var/datum/organ/external/chest/chest = new /datum/organ/external/chest( src )
chest.owner = src
var/datum/organ/external/groin/groin = new /datum/organ/external/groin( src )
groin.owner = src
var/datum/organ/external/head/head = new /datum/organ/external/head( src )
head.owner = src
var/datum/organ/external/l_arm/l_arm = new /datum/organ/external/l_arm( src )
l_arm.owner = src
var/datum/organ/external/r_arm/r_arm = new /datum/organ/external/r_arm( src )
r_arm.owner = src
var/datum/organ/external/l_hand/l_hand = new /datum/organ/external/l_hand( src )
l_hand.owner = src
var/datum/organ/external/r_hand/r_hand = new /datum/organ/external/r_hand( src )
r_hand.owner = src
var/datum/organ/external/l_leg/l_leg = new /datum/organ/external/l_leg( src )
l_leg.owner = src
var/datum/organ/external/r_leg/r_leg = new /datum/organ/external/r_leg( src )
r_leg.owner = src
var/datum/organ/external/l_foot/l_foot = new /datum/organ/external/l_foot( src )
l_foot.owner = src
var/datum/organ/external/r_foot/r_foot = new /datum/organ/external/r_foot( src )
r_foot.owner = src
src.organs["chest"] = chest
src.organs["groin"] = groin
src.organs["head"] = head
src.organs["l_arm"] = l_arm
src.organs["r_arm"] = r_arm
src.organs["l_hand"] = l_hand
src.organs["r_hand"] = r_hand
src.organs["l_leg"] = l_leg
src.organs["r_leg"] = r_leg
src.organs["l_foot"] = l_foot
src.organs["r_foot"] = r_foot
var/g = "m"
if (src.gender == MALE)
g = "m"
else if (src.gender == FEMALE)
g = "f"
else
src.gender = MALE
g = "m"
spawn (1) spawn (1)
var/datum/organ/external/chest/chest = new /datum/organ/external/chest( src )
chest.owner = src
var/datum/organ/external/groin/groin = new /datum/organ/external/groin( src )
groin.owner = src
var/datum/organ/external/head/head = new /datum/organ/external/head( src )
head.owner = src
var/datum/organ/external/l_arm/l_arm = new /datum/organ/external/l_arm( src )
l_arm.owner = src
var/datum/organ/external/r_arm/r_arm = new /datum/organ/external/r_arm( src )
r_arm.owner = src
var/datum/organ/external/l_hand/l_hand = new /datum/organ/external/l_hand( src )
l_hand.owner = src
var/datum/organ/external/r_hand/r_hand = new /datum/organ/external/r_hand( src )
r_hand.owner = src
var/datum/organ/external/l_leg/l_leg = new /datum/organ/external/l_leg( src )
l_leg.owner = src
var/datum/organ/external/r_leg/r_leg = new /datum/organ/external/r_leg( src )
r_leg.owner = src
var/datum/organ/external/l_foot/l_foot = new /datum/organ/external/l_foot( src )
l_foot.owner = src
var/datum/organ/external/r_foot/r_foot = new /datum/organ/external/r_foot( src )
r_foot.owner = src
src.organs["chest"] = chest
src.organs["groin"] = groin
src.organs["head"] = head
src.organs["l_arm"] = l_arm
src.organs["r_arm"] = r_arm
src.organs["l_hand"] = l_hand
src.organs["r_hand"] = r_hand
src.organs["l_leg"] = l_leg
src.organs["r_leg"] = r_leg
src.organs["l_foot"] = l_foot
src.organs["r_foot"] = r_foot
var/g = "m"
if (src.gender == MALE)
g = "m"
else if (src.gender == FEMALE)
g = "f"
else
src.gender = MALE
g = "m"
if(!src.stand_icon) if(!src.stand_icon)
src.stand_icon = new /icon('human.dmi', "body_[g]_s") src.stand_icon = new /icon('human.dmi', "body_[g]_s")
if(!src.lying_icon) if(!src.lying_icon)
src.lying_icon = new /icon('human.dmi', "body_[g]_l") src.lying_icon = new /icon('human.dmi', "body_[g]_l")
src.icon = src.stand_icon src.icon = src.stand_icon
src << "\blue Your icons have been generated!"
update_clothing() update_clothing()
src << "\blue Your icons have been generated!"
..()
/mob/living/carbon/human/Bump(atom/movable/AM as mob|obj, yes) /mob/living/carbon/human/Bump(atom/movable/AM as mob|obj, yes)
if ((!( yes ) || src.now_pushing)) if ((!( yes ) || src.now_pushing))

View File

@@ -1,29 +1,27 @@
/mob/living/carbon/monkey/New() /mob/living/carbon/monkey/New()
spawn(1) var/datum/reagents/R = new/datum/reagents(1000)
var/datum/reagents/R = new/datum/reagents(1000) reagents = R
reagents = R R.my_atom = src
R.my_atom = src if (!(src.dna))
if (!(src.dna)) if(src.gender == NEUTER)
if(src.gender == NEUTER) src.gender = pick(MALE, FEMALE)
src.gender = pick(MALE, FEMALE) src.dna = new /datum/dna( null )
src.dna = new /datum/dna( null ) src.dna.uni_identity = "00600200A00E0110148FC01300B009"
src.dna.uni_identity = "00600200A00E0110148FC01300B009" src.dna.struc_enzymes = "0983E840344C39F4B059D5145FC5785DC6406A4BB8"
src.dna.struc_enzymes = "0983E840344C39F4B059D5145FC5785DC6406A4BB8" src.dna.unique_enzymes = md5(src.name)
src.dna.unique_enzymes = md5(src.name) //////////blah
//////////blah var/gendervar
var/gendervar if (src.gender == "male")
if (src.gender == "male") gendervar = add_zero2(num2hex((rand(1,2049)),1), 3)
gendervar = add_zero2(num2hex((rand(1,2049)),1), 3) else
else gendervar = add_zero2(num2hex((rand(2051,4094)),1), 3)
gendervar = add_zero2(num2hex((rand(2051,4094)),1), 3) src.dna.uni_identity += gendervar
src.dna.uni_identity += gendervar src.dna.uni_identity += "12C"
src.dna.uni_identity += "12C" src.dna.uni_identity += "4E2"
src.dna.uni_identity += "4E2"
if(src.name == "monkey") src.name = text("monkey ([rand(1, 1000)])") if(src.name == "monkey")
src.name = text("monkey ([rand(1, 1000)])")
src.real_name = src.name src.real_name = src.name
return
..() ..()
return return

View File

@@ -1122,8 +1122,9 @@
item.dropped(src) item.dropped(src)
if (item) if (item)
item.layer = initial(item.layer) item.layer = initial(item.layer)
var/turf/T = get_turf(src.loc) var/turf/T = get_turf(src.loc)
T.Entered(item) if (istype(T))
T.Entered(item)
return return
/mob/proc/drop_item() /mob/proc/drop_item()
@@ -1138,16 +1139,17 @@
if (W) if (W)
W.layer = initial(W.layer) W.layer = initial(W.layer)
var/turf/T = get_turf(src.loc) var/turf/T = get_turf(src.loc)
if (T) if (istype(T))
T.Entered(W) T.Entered(W)
return return
/mob/proc/before_take_item(var/obj/item/item) /mob/proc/before_take_item(var/obj/item/item)
u_equip(item)
if (src.client)
src.client.screen -= item
item.loc = null item.loc = null
src.update_clothing() item.layer = initial(item.layer)
u_equip(item)
//if (src.client)
// src.client.screen -= item
//src.update_clothing()
return return
/mob/proc/get_active_hand() /mob/proc/get_active_hand()
@@ -1299,7 +1301,10 @@
msg = copytext(msg, 1, MAX_MESSAGE_LEN) msg = copytext(msg, 1, MAX_MESSAGE_LEN)
msg = sanitize(msg) msg = sanitize(msg)
mind.store_memory(msg) if(mind)
mind.store_memory(msg)
else
src << "The game appears to have misplaced your mind datum, so we can't show you your notes."
/mob/proc/store_memory(msg as message, popup, sane = 1) /mob/proc/store_memory(msg as message, popup, sane = 1)
msg = copytext(msg, 1, MAX_MESSAGE_LEN) msg = copytext(msg, 1, MAX_MESSAGE_LEN)

View File

@@ -4,13 +4,7 @@
for(var/obj/item/W in src) for(var/obj/item/W in src)
if (W==src.w_uniform) // will be teared if (W==src.w_uniform) // will be teared
continue continue
src.u_equip(W) drop_from_slot(W)
if (src.client)
src.client.screen -= W
if (W)
W.loc = src.loc
W.dropped(src)
W.layer = initial(W.layer)
src.update_clothing() src.update_clothing()
src.monkeyizing = 1 src.monkeyizing = 1
src.canmove = 0 src.canmove = 0
@@ -58,15 +52,8 @@
/mob/living/carbon/AIize() /mob/living/carbon/AIize()
if (src.monkeyizing) if (src.monkeyizing)
return return
for(var/obj/item/weapon/W in src) for(var/obj/item/W in src)
src.u_equip(W) drop_from_slot(W)
if (src.client)
src.client.screen -= W
if (W)
W.loc = src.loc
W.dropped(src)
W.layer = initial(W.layer)
del(W)
src.update_clothing() src.update_clothing()
src.monkeyizing = 1 src.monkeyizing = 1
src.canmove = 0 src.canmove = 0
@@ -170,15 +157,8 @@
/mob/living/carbon/human/proc/Robotize() /mob/living/carbon/human/proc/Robotize()
if (src.monkeyizing) if (src.monkeyizing)
return return
for(var/obj/item/weapon/W in src) for(var/obj/item/W in src)
src.u_equip(W) drop_from_slot(W)
if (src.client)
src.client.screen -= W
if (W)
W.loc = src.loc
W.dropped(src)
W.layer = initial(W.layer)
del(W)
src.update_clothing() src.update_clothing()
src.monkeyizing = 1 src.monkeyizing = 1
src.canmove = 0 src.canmove = 0
@@ -235,14 +215,8 @@
/mob/living/carbon/human/proc/Alienize() /mob/living/carbon/human/proc/Alienize()
if (src.monkeyizing) if (src.monkeyizing)
return return
for(var/obj/item/weapon/W in src) for(var/obj/item/W in src)
src.u_equip(W) drop_from_slot(W)
if (src.client)
src.client.screen -= W
if (W)
W.loc = src.loc
W.dropped(src)
W.layer = initial(W.layer)
src.update_clothing() src.update_clothing()
src.monkeyizing = 1 src.monkeyizing = 1
src.canmove = 0 src.canmove = 0

View File

@@ -1 +1 @@
extended traitor