Merge branch 'bleeding-edge-freeze' of https://github.com/Baystation12/Baystation12 into bs12_with_tgport

Conflicts:
	baystation12.dme
	code/datums/supplypacks.dm
	code/game/jobs/job/captain.dm
	code/game/jobs/job/security.dm
	code/modules/clothing/spacesuits/rig.dm
	icons/mob/head.dmi
	icons/mob/suit.dmi

Signed-off-by: Cael_Aislinn <cael_aislinn@yahoo.com.au>
This commit is contained in:
Cael_Aislinn
2013-01-23 00:48:07 +10:00
96 changed files with 21015 additions and 17595 deletions
@@ -0,0 +1,63 @@
#define RIOTS 1
#define WILD_ANIMAL_ATTACK 2
#define INDUSTRIAL_ACCIDENT 3
#define BIOHAZARD_OUTBREAK 4
#define WARSHIPS_ARRIVE 5
#define PIRATES 6
#define CORPORATE_ATTACK 7
#define ALIEN_RAIDERS 8
#define AI_LIBERATION 9
#define MOURNING 10
#define CULT_CELL_REVEALED 11
#define SECURITY_BREACH 12
#define ANIMAL_RIGHTS_RAID 13
#define FESTIVAL 14
#define DEFAULT 1
#define ADMINISTRATIVE 2
#define CLOTHING 3
#define SECURITY 4
#define SPECIAL_SECURITY 5
#define FOOD 6
#define ANIMALS 7
#define MINERALS 8
#define EMERGENCY 9
#define GAS 10
#define MAINTENANCE 11
#define ELECTRICAL 12
#define ROBOTICS 13
#define BIOMEDICAL 14
#define EVA 15
//---- The following corporations are friendly with NanoTrasen and loosely enable trade and travel:
//Corporation NanoTrasen - Generalised / high tech research and plasma exploitation.
//Corporation Vessel Contracting - Ship and station construction, materials research.
//Corporation Osiris Atmospherics - Atmospherics machinery construction and chemical research.
//Corporation Second Red Cross Society - 26th century Red Cross reborn as a dominating economic force in biomedical science (research and materials).
//Corporation Blue Industries - High tech and high energy research, in particular into the mysteries of bluespace manipulation and power generation.
//Corporation Kusanagi Robotics - Founded by robotics legend Kaito Kusanagi in the 2070s, they have been on the forefront of mechanical augmentation and robotics development ever since.
//Corporation Free traders - Not so much a corporation as a loose coalition of spacers, Free Traders are a roving band of smugglers, traders and fringe elements following a rigid (if informal) code of loyalty and honour. Mistrusted by most corporations, they are tolerated because of their uncanny ability to smell out a profit.
//---- Descriptions of destination types
//Space stations can be purpose built for a number of different things, but generally require regular shipments of essential supplies.
//Corvettes are small, fast warships generally assigned to border patrol or chasing down smugglers.
//Battleships are large, heavy cruisers designed for slugging it out with other heavies or razing planets.
//Yachts are fast civilian craft, often used for pleasure or smuggling.
//Destroyers are medium sized vessels, often used for escorting larger ships but able to go toe-to-toe with them if need be.
//Frigates are medium sized vessels, often used for escorting larger ships. They will rapidly find themselves outclassed if forced to face heavy warships head on.
var/setup_economy = 0
/proc/setup_economy()
var/datum/feed_channel/newChannel = new /datum/feed_channel
newChannel.channel_name = "Tau Ceti Daily"
newChannel.author = "CentComm Minister of Information"
newChannel.locked = 1
newChannel.is_admin_channel = 1
news_network.network_channels += newChannel
setup_economy = 1
@@ -0,0 +1,102 @@
/datum/event/economic_event
endWhen = 50 //this will be set randomly, later
announceWhen = 15
var/event_type = 0
var/list/cheaper_goods = list()
var/list/dearer_goods = list()
var/datum/trade_destination/affected_dest
/datum/event/economic_event/start()
if(!setup_economy)
setup_economy()
var/type = pick(tradeable_destinations)
affected_dest = new type()
if(affected_dest.viable_random_events.len)
endWhen = rand(60,300)
event_type = pick(affected_dest.viable_random_events)
switch(event_type)
if(RIOTS)
dearer_goods = list(SECURITY)
cheaper_goods = list(MINERALS, FOOD)
if(WILD_ANIMAL_ATTACK)
cheaper_goods = list(ANIMALS)
dearer_goods = list(FOOD, BIOMEDICAL)
if(INDUSTRIAL_ACCIDENT)
dearer_goods = list(EMERGENCY, BIOMEDICAL, ROBOTICS)
if(BIOHAZARD_OUTBREAK)
dearer_goods = list(BIOMEDICAL, GAS)
if(PIRATES)
dearer_goods = list(SECURITY, MINERALS)
if(CORPORATE_ATTACK)
dearer_goods = list(SECURITY, MAINTENANCE)
if(ALIEN_RAIDERS)
dearer_goods = list(BIOMEDICAL, ANIMALS)
cheaper_goods = list(GAS, MINERALS)
if(AI_LIBERATION)
dearer_goods = list(EMERGENCY, GAS, MAINTENANCE)
if(MOURNING)
cheaper_goods = list(MINERALS, MAINTENANCE)
if(CULT_CELL_REVEALED)
dearer_goods = list(SECURITY, BIOMEDICAL, MAINTENANCE)
if(SECURITY_BREACH)
dearer_goods = list(SECURITY)
if(ANIMAL_RIGHTS_RAID)
dearer_goods = list(ANIMALS)
if(FESTIVAL)
dearer_goods = list(FOOD, ANIMALS)
for(var/good_type in dearer_goods)
affected_dest.temp_price_change[good_type] = rand(1,100)
for(var/good_type in cheaper_goods)
affected_dest.temp_price_change[good_type] = rand(1,100) / 100
/datum/event/economic_event/announce()
//copy-pasted from the admin verbs to submit new newscaster messages
var/datum/feed_message/newMsg = new /datum/feed_message
newMsg.author = "NanoTrasen Editor"
newMsg.is_admin_message = 1
switch(event_type)
if(RIOTS)
newMsg.body = "[pick("Riots have","Unrest has")] broken out on planet [affected_dest.name]. Authorities call for calm, as [pick("various parties","rebellious elements","peacekeeping forces","\'REDACTED\'")] begin stockpiling weaponry and armour. Meanwhile, food and mineral prices are dropping as local industries attempt empty their stocks in expectation of looting."
if(WILD_ANIMAL_ATTACK)
newMsg.body = "Local [pick("wildlife","animal life","fauna")] on planet [affected_dest.name] has been increasing in agression and raiding outlying settlements for food. Big game hunters have been called in to help alleviate the problem, but numerous injuries have already occurred."
if(INDUSTRIAL_ACCIDENT)
newMsg.body = "[pick("An industrial accident","A smelting accident","A malfunction","A malfunctioning piece of machinery","Negligent maintenance","A cooleant leak","A ruptured conduit")] at a [pick("factory","installation","power plant","dockyards")] on [affected_dest.name] resulted in severe structural damage and numerous injuries. Repairs are ongoing."
if(BIOHAZARD_OUTBREAK)
newMsg.body = "[pick("A \'REDACTED\'","A biohazard","An outbreak","A virus")] on [affected_dest.name] has resulted in quarantine, stopping much shipping in the area. Although the quarantine is now lifted, authorities are calling for deliveries of medical supplies to treat the infected, and gas to replace contaminated stocks."
if(PIRATES)
newMsg.body = "[pick("Pirates","Criminal elements","A [pick("Syndicate","Donk Co.","Waffle Co.","\'REDACTED\'")] strike force")] have [pick("raided","blockaded","attempted to blackmail","attacked")] [affected_dest.name] today. Security has been tightened, but many valuable minerals were taken."
if(CORPORATE_ATTACK)
newMsg.body = "A small [pick("pirate","Cybersun Industries","Gorlex Marauders","Syndicate")] fleet has precise-jumped into proximity with [affected_dest.name], [pick("for a smash-and-grab operation","in a hit and run attack","in an overt display of hostilities")]. Much damage was done, and security has been tightened since the incident."
if(ALIEN_RAIDERS)
if(prob(20))
newMsg.body = "The Tiger Co-operative have raided [affected_dest.name] today, no doubt on orders from their enigmatic masters. Stealing wildlife, farm animals, medical research materials and kidnapping civilians. NanoTrasen authorities are standing by to counter attempts at bio-terrorism."
else
newMsg.body = "[pick("The alien species designated \'United Exolitics\'","The alien species designated \'REDACTED\'","An unknown alien species")] have raided [affected_dest.name] today, stealing wildlife, farm animals, medical research materials and kidnapping civilians. It seems they desire to learn more about us, so the Navy will be standing by to accomodate them next time they try."
if(AI_LIBERATION)
newMsg.body = "A [pick("\'REDACTED\' was detected on","S.E.L.F operative infiltrated","malignant computer virus was detected on","rogue [pick("slicer","hacker")] was apprehended on")] [affected_dest.name] today, and managed to infect [pick("\'REDACTED\'","a sentient sub-system","a class one AI","a sentient defence installation")] before it could be stopped. Many lives were lost as it systematically begin murdering civilians, and considerable work must be done to repair the affected areas."
if(MOURNING)
newMsg.body = "[pick("The popular","The well-liked","The eminent","The well-known")] [pick("professor","entertainer","singer","researcher","public servant","administrator","ship captain","\'REDACTED\'")], [pick( random_name(pick(MALE,FEMALE)), 40; "\'REDACTED\'" )] has [pick("passed away","committed suicide","been murdered","died in a freakish accident")] on [affected_dest.name] today. The entire planet is in mourning, and prices have dropped for industrial goods as worker morale drops."
if(CULT_CELL_REVEALED)
newMsg.body = "A [pick("dastardly","blood-thirsty","villanous","crazed")] cult of [pick("The Elder Gods","Nar'sie","an apocalyptic sect","\'REDACTED\'")] has [pick("been discovered","been revealed","revealed themselves","gone public")] on [affected_dest.name] earlier today. Public morale has been shaken due to [pick("certain","several","one or two")] [pick("high-profile","well known","popular")] individuals [pick("performing \'REDACTED\'","claiming allegiance to the cult","swearing loyalty to the cult leader","promising to aid to the cult")] before those involved could be brought to justice. The editor reminds all personnel that supernatural myths will not be tolerated on NanoTrasen facilities."
if(SECURITY_BREACH)
newMsg.body = "There was [pick("a security breach in","an unauthorised access in","an attempted theft in","an anarchist attack in","violent sabotage of")] a [pick("high-security","restricted access","classified","\'REDACTED\'")] [pick("\'REDACTED\'","section","zone","area")] this morning. Security was tightened on [affected_dest.name] after the incident, and the editor reassures all NanoTrasen personnel that such lapses are rare."
if(ANIMAL_RIGHTS_RAID)
newMsg.body = "[pick("Militant animal rights activists","Members of the terrorist group Animal Rights Consortium","Members of the terrorist group \'REDACTED\'")] have [pick("launched a campaign of terror","unleashed a swathe of destruction","raided farms and pastures","forced entry to \'REDACTED\'")] on [affected_dest.name] earlier today, freeing numerous [pick("farm animals","animals","\'REDACTED\'")]. Prices for tame and breeding animals have spiked as a result."
if(FESTIVAL)
newMsg.body = "A [pick("festival","week long celebration","day of revelry","planet-wide holiday")] has been delcared on [affected_dest.name] by [pick("Governor","Commissioner","General","Commandant","Administrator")] [random_name(pick(MALE,FEMALE))] to celebrate [pick("the birth of their [pick("son","daughter")]","coming of age of their [pick("son","daughter")]","the pacification of rogue military cell","the apprehension of a violent criminal who had been terrorising the planet")]. Massive stocks of food and meat have been bought driving up prices across the planet."
for(var/datum/feed_channel/FC in news_network.network_channels)
if(FC.channel_name == "Tau Ceti Daily")
FC.messages += newMsg
break
for(var/obj/machinery/newscaster/NEWSCASTER in allCasters)
NEWSCASTER.newsAlert("Tau Ceti Daily")
/datum/event/economic_event/end()
for(var/good_type in dearer_goods)
affected_dest.temp_price_change[good_type] = 1
for(var/good_type in cheaper_goods)
affected_dest.temp_price_change[good_type] = 1
@@ -0,0 +1,85 @@
/datum/trade_destination
var/name = ""
var/description = ""
var/distance = 0
var/list/willing_to_buy = list()
var/list/willing_to_sell = list()
var/can_shuttle_here = 0 //one day crew from the exodus will be able to travel to this destination
var/list/viable_random_events = list()
var/list/temp_price_change[BIOMEDICAL]
//distance is measured in AU and co-relates to travel time
/datum/trade_destination/centcomm
name = "CentComm"
description = "NanoTrasen's administrative centre for Tau Ceti."
distance = 1.2
willing_to_buy = list()
willing_to_sell = list()
viable_random_events = list(SECURITY_BREACH, CORPORATE_ATTACK, AI_LIBERATION)
/datum/trade_destination/anansi
name = "NSS Anansi"
description = "Medical station ran by Second Red Cross (but owned by NT) for handling emergency cases from nearby colonies."
distance = 1.7
willing_to_buy = list()
willing_to_sell = list()
viable_random_events = list(SECURITY_BREACH, CULT_CELL_REVEALED, BIOHAZARD_OUTBREAK, PIRATES, ALIEN_RAIDERS)
/datum/trade_destination/icarus
name = "NMV Icarus"
description = "Corvette assigned to patrol NSS Exodus local space."
distance = 0.1
willing_to_buy = list()
willing_to_sell = list()
viable_random_events = list(SECURITY_BREACH, AI_LIBERATION, PIRATES)
/datum/trade_destination/redolant
name = "OAV Redolant"
description = "Osiris Atmospherics station in orbit around the only gas giant insystem. They retain tight control over shipping rights, and Osiris warships protecting their prize are not an uncommon sight in Tau Ceti."
distance = 0.6
willing_to_buy = list()
willing_to_sell = list()
viable_random_events = list(INDUSTRIAL_ACCIDENT, PIRATES, CORPORATE_ATTACK)
/datum/trade_destination/beltway
name = "Beltway mining chain"
description = "A co-operative effort between Beltway and NanoTrasen to exploit the rich outer asteroid belt of the Tau Ceti system."
distance = 7.5
willing_to_buy = list()
willing_to_sell = list()
viable_random_events = list(PIRATES, INDUSTRIAL_ACCIDENT)
/datum/trade_destination/biesel
name = "Biesel"
description = "Large ship yards, strong economy and a stable, well-educated populace, Biesel largely owes allegiance to Sol / Vessel Contracting and begrudgingly tolerates NT. Capital is Lowell City."
distance = 2.3
willing_to_buy = list()
willing_to_sell = list()
viable_random_events = list(RIOTS, INDUSTRIAL_ACCIDENT, BIOHAZARD_OUTBREAK, CULT_CELL_REVEALED, FESTIVAL, MOURNING)
/datum/trade_destination/new_gibson
name = "New Gibson"
description = "Heavily industrialised rocky planet containing the majority of the planet-bound resources in the system, New Gibson is torn by unrest and has very little wealth to call it's own except in the hands of the corporations who jostle with NT for control."
distance = 6.6
willing_to_buy = list()
willing_to_sell = list()
viable_random_events = list(RIOTS, INDUSTRIAL_ACCIDENT, BIOHAZARD_OUTBREAK, CULT_CELL_REVEALED, FESTIVAL, MOURNING)
/datum/trade_destination/luthien
name = "Luthien"
description = "A small colony established on a feral, untamed world (largely jungle). Savages and wild beasts attack the outpost regularly, although NT maintains tight military control."
distance = 8.9
willing_to_buy = list()
willing_to_sell = list()
viable_random_events = list(WILD_ANIMAL_ATTACK, CULT_CELL_REVEALED, FESTIVAL, MOURNING, ANIMAL_RIGHTS_RAID, ALIEN_RAIDERS)
/datum/trade_destination/reade
name = "Reade"
description = "A cold, metal-deficient world, NT maintains large pastures in whatever available space in an attempt to salvage something from this profitless colony."
distance = 7.5
willing_to_buy = list()
willing_to_sell = list()
viable_random_events = list(WILD_ANIMAL_ATTACK, CULT_CELL_REVEALED, FESTIVAL, MOURNING, ANIMAL_RIGHTS_RAID, ALIEN_RAIDERS)
var/list/tradeable_destinations = typesof(/datum/trade_destination) - /datum/trade_destination
@@ -235,7 +235,7 @@
var/obj/structure/closet/crate/secure/gear/C = new(src.loc)
var/num = rand(2,6)
for(var/i=0,i<num,i++)
var/spawn_type = pick(/obj/item/device/flashlight/flare, /obj/item/trash/candle, /obj/item/candle/, /obj/item/weapon/storage/matchbox)
var/spawn_type = pick(/obj/item/device/flashlight/flare, /obj/item/trash/candle, /obj/item/candle/, /obj/item/weapon/storage/box/matches)
new spawn_type(C)
if("engineering")
var/obj/structure/closet/crate/secure/gear/C = new(src.loc)
@@ -1,248 +1,248 @@
/mob/living/carbon/amorph/attack_paw(mob/living/carbon/monkey/M as mob)
if (!ticker)
M << "You cannot attack people before the game has started."
return
..()
switch(M.a_intent)
if ("help")
help_shake_act(M)
else
if (istype(wear_mask, /obj/item/clothing/mask/muzzle))
return
if (health > 0)
attacked += 10
playsound(loc, 'bite.ogg', 50, 1, -1)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[M.name] has bit [src]!</B>"), 1)
adjustBruteLoss(rand(0, 1))
updatehealth()
return
/mob/living/carbon/amorph/attack_hand(mob/living/carbon/human/M as mob)
if(M.gloves && istype(M.gloves,/obj/item/clothing/gloves))
var/obj/item/clothing/gloves/G = M.gloves
if(G.cell)
if(M.a_intent == "hurt")//Stungloves. Any contact will stun the alien.
if(G.cell.charge >= 2500)
G.cell.charge -= 2500
Weaken(5)
if (stuttering < 5)
stuttering = 5
Stun(5)
for(var/mob/O in viewers(src, null))
if (O.client)
O.show_message("\red <B>[src] has been touched with the stun gloves by [M]!</B>", 1, "\red You hear someone fall", 2)
return
else
M << "\red Not enough charge! "
return
if (M.a_intent == "help")
help_shake_act(M)
else
if (M.a_intent == "hurt")
var/attack_verb
switch(M.mutantrace)
if("lizard")
attack_verb = "scratch"
if("plant")
attack_verb = "slash"
else
attack_verb = "punch"
if(M.type == /mob/living/carbon/human/tajaran)
attack_verb = "slash"
if ((prob(75) && health > 0))
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has [attack_verb]ed [name]!</B>", M), 1)
var/damage = rand(5, 10)
if(M.type != /mob/living/carbon/human/tajaran)
playsound(loc, "punch", 25, 1, -1)
else if(M.type == /mob/living/carbon/human/tajaran)
damage += 10
playsound(loc, 'slice.ogg', 25, 1, -1)
adjustBruteLoss(damage/10)
updatehealth()
else
if(M.type != /mob/living/carbon/human/tajaran)
playsound(loc, 'punchmiss.ogg', 25, 1, -1)
else if(M.type == /mob/living/carbon/human/tajaran)
playsound(loc, 'slashmiss.ogg', 25, 1, -1)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has attempted to [attack_verb] [name]!</B>", M), 1)
else
if (M.a_intent == "grab")
if (M == src)
return
var/obj/item/weapon/grab/G = new /obj/item/weapon/grab( M )
G.assailant = M
if (M.hand)
M.l_hand = G
else
M.r_hand = G
G.layer = 20
G.affecting = src
grabbed_by += G
G.synch()
LAssailant = M
playsound(loc, 'thudswoosh.ogg', 50, 1, -1)
for(var/mob/O in viewers(src, null))
O.show_message(text("\red [] has grabbed [name] passively!", M), 1)
else
if (!( paralysis ))
drop_item()
playsound(loc, 'thudswoosh.ogg', 50, 1, -1)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has disarmed [name]!</B>", M), 1)
return
/mob/living/carbon/amorph/attack_alien(mob/living/carbon/alien/humanoid/M as mob)
switch(M.a_intent)
if ("help")
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\blue [M] caresses [src] with its scythe like arm."), 1)
if ("hurt")
if ((prob(95) && health > 0))
playsound(loc, 'slice.ogg', 25, 1, -1)
var/damage = rand(15, 30)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has slashed [name]!</B>", M), 1)
adjustBruteLoss(damage/10)
updatehealth()
react_to_attack(M)
else
playsound(loc, 'slashmiss.ogg', 25, 1, -1)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has attempted to lunge at [name]!</B>", M), 1)
if ("grab")
if (M == src)
return
var/obj/item/weapon/grab/G = new /obj/item/weapon/grab( M )
G.assailant = M
if (M.hand)
M.l_hand = G
else
M.r_hand = G
G.layer = 20
G.affecting = src
grabbed_by += G
G.synch()
LAssailant = M
playsound(loc, 'thudswoosh.ogg', 50, 1, -1)
for(var/mob/O in viewers(src, null))
O.show_message(text("\red [] has grabbed [name] passively!", M), 1)
if ("disarm")
playsound(loc, 'pierce.ogg', 25, 1, -1)
var/damage = 5
if(prob(95))
Weaken(rand(10,15))
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has tackled down [name]!</B>", M), 1)
else
drop_item()
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has disarmed [name]!</B>", M), 1)
adjustBruteLoss(damage)
react_to_attack(M)
updatehealth()
return
/mob/living/carbon/amorph/attack_animal(mob/living/simple_animal/M as mob)
if(M.melee_damage_upper == 0)
M.emote("[M.friendly] [src]")
else
for(var/mob/O in viewers(src, null))
O.show_message("\red <B>[M]</B> [M.attacktext] [src]!", 1)
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
bruteloss += damage
/mob/living/carbon/amorph/attack_metroid(mob/living/carbon/metroid/M as mob)
if(M.Victim) return // can't attack while eating!
if (health > -100)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>The [M.name] has [pick("bit","slashed")] []!</B>", src), 1)
var/damage = rand(1, 3)
if(istype(M, /mob/living/carbon/metroid/adult))
damage = rand(10, 35)
else
damage = rand(5, 25)
src.cloneloss += damage
UpdateDamageIcon()
if(M.powerlevel > 0)
var/stunprob = 10
var/power = M.powerlevel + rand(0,3)
switch(M.powerlevel)
if(1 to 2) stunprob = 20
if(3 to 4) stunprob = 30
if(5 to 6) stunprob = 40
if(7 to 8) stunprob = 60
if(9) stunprob = 70
if(10) stunprob = 95
if(prob(stunprob))
M.powerlevel -= 3
if(M.powerlevel < 0)
M.powerlevel = 0
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>The [M.name] has shocked []!</B>", src), 1)
Weaken(power)
if (stuttering < power)
stuttering = power
Stun(power)
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(5, 1, src)
s.start()
if (prob(stunprob) && M.powerlevel >= 8)
adjustFireLoss(M.powerlevel * rand(6,10))
updatehealth()
return
/mob/living/carbon/amorph/attack_paw(mob/living/carbon/monkey/M as mob)
if (!ticker)
M << "You cannot attack people before the game has started."
return
..()
switch(M.a_intent)
if ("help")
help_shake_act(M)
else
if (istype(wear_mask, /obj/item/clothing/mask/muzzle))
return
if (health > 0)
attacked += 10
playsound(loc, 'bite.ogg', 50, 1, -1)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[M.name] has bit [src]!</B>"), 1)
adjustBruteLoss(rand(0, 1))
updatehealth()
return
/mob/living/carbon/amorph/attack_hand(mob/living/carbon/human/M as mob)
if(M.gloves && istype(M.gloves,/obj/item/clothing/gloves))
var/obj/item/clothing/gloves/G = M.gloves
if(G.cell)
if(M.a_intent == "hurt")//Stungloves. Any contact will stun the alien.
if(G.cell.charge >= 2500)
G.cell.charge -= 2500
Weaken(5)
if (stuttering < 5)
stuttering = 5
Stun(5)
for(var/mob/O in viewers(src, null))
if (O.client)
O.show_message("\red <B>[src] has been touched with the stun gloves by [M]!</B>", 1, "\red You hear someone fall", 2)
return
else
M << "\red Not enough charge! "
return
if (M.a_intent == "help")
help_shake_act(M)
else
if (M.a_intent == "hurt")
var/attack_verb
switch(M.mutantrace)
if("lizard")
attack_verb = "scratch"
if("plant")
attack_verb = "slash"
else
attack_verb = "punch"
if(M.type == /mob/living/carbon/human/tajaran)
attack_verb = "slash"
if ((prob(75) && health > 0))
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has [attack_verb]ed [name]!</B>", M), 1)
var/damage = rand(5, 10)
if(M.type != /mob/living/carbon/human/tajaran)
playsound(loc, "punch", 25, 1, -1)
else if(M.type == /mob/living/carbon/human/tajaran)
damage += 10
playsound(loc, 'slice.ogg', 25, 1, -1)
adjustBruteLoss(damage/10)
updatehealth()
else
if(M.type != /mob/living/carbon/human/tajaran)
playsound(loc, 'punchmiss.ogg', 25, 1, -1)
else if(M.type == /mob/living/carbon/human/tajaran)
playsound(loc, 'slashmiss.ogg', 25, 1, -1)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has attempted to [attack_verb] [name]!</B>", M), 1)
else
if (M.a_intent == "grab")
if (M == src)
return
var/obj/item/weapon/grab/G = new /obj/item/weapon/grab( M )
G.assailant = M
if (M.hand)
M.l_hand = G
else
M.r_hand = G
G.layer = 20
G.affecting = src
grabbed_by += G
G.synch()
LAssailant = M
playsound(loc, 'thudswoosh.ogg', 50, 1, -1)
for(var/mob/O in viewers(src, null))
O.show_message(text("\red [] has grabbed [name] passively!", M), 1)
else
if (!( paralysis ))
drop_item()
playsound(loc, 'thudswoosh.ogg', 50, 1, -1)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has disarmed [name]!</B>", M), 1)
return
/mob/living/carbon/amorph/attack_alien(mob/living/carbon/alien/humanoid/M as mob)
switch(M.a_intent)
if ("help")
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\blue [M] caresses [src] with its scythe like arm."), 1)
if ("hurt")
if ((prob(95) && health > 0))
playsound(loc, 'slice.ogg', 25, 1, -1)
var/damage = rand(15, 30)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has slashed [name]!</B>", M), 1)
adjustBruteLoss(damage/10)
updatehealth()
react_to_attack(M)
else
playsound(loc, 'slashmiss.ogg', 25, 1, -1)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has attempted to lunge at [name]!</B>", M), 1)
if ("grab")
if (M == src)
return
var/obj/item/weapon/grab/G = new /obj/item/weapon/grab( M )
G.assailant = M
if (M.hand)
M.l_hand = G
else
M.r_hand = G
G.layer = 20
G.affecting = src
grabbed_by += G
G.synch()
LAssailant = M
playsound(loc, 'thudswoosh.ogg', 50, 1, -1)
for(var/mob/O in viewers(src, null))
O.show_message(text("\red [] has grabbed [name] passively!", M), 1)
if ("disarm")
playsound(loc, 'pierce.ogg', 25, 1, -1)
var/damage = 5
if(prob(95))
Weaken(rand(10,15))
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has tackled down [name]!</B>", M), 1)
else
drop_item()
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has disarmed [name]!</B>", M), 1)
adjustBruteLoss(damage)
react_to_attack(M)
updatehealth()
return
/mob/living/carbon/amorph/attack_animal(mob/living/simple_animal/M as mob)
if(M.melee_damage_upper == 0)
M.emote("[M.friendly] [src]")
else
for(var/mob/O in viewers(src, null))
O.show_message("\red <B>[M]</B> [M.attacktext] [src]!", 1)
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
bruteloss += damage
/mob/living/carbon/amorph/attack_metroid(mob/living/carbon/metroid/M as mob)
if(M.Victim) return // can't attack while eating!
if (health > -100)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>The [M.name] has [pick("bit","slashed")] []!</B>", src), 1)
var/damage = rand(1, 3)
if(istype(M, /mob/living/carbon/metroid/adult))
damage = rand(10, 35)
else
damage = rand(5, 25)
src.cloneloss += damage
UpdateDamageIcon()
if(M.powerlevel > 0)
var/stunprob = 10
var/power = M.powerlevel + rand(0,3)
switch(M.powerlevel)
if(1 to 2) stunprob = 20
if(3 to 4) stunprob = 30
if(5 to 6) stunprob = 40
if(7 to 8) stunprob = 60
if(9) stunprob = 70
if(10) stunprob = 95
if(prob(stunprob))
M.powerlevel -= 3
if(M.powerlevel < 0)
M.powerlevel = 0
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>The [M.name] has shocked []!</B>", src), 1)
Weaken(power)
if (stuttering < power)
stuttering = power
Stun(power)
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(5, 1, src)
s.start()
if (prob(stunprob) && M.powerlevel >= 8)
adjustFireLoss(M.powerlevel * rand(6,10))
updatehealth()
return
@@ -1,12 +1,12 @@
/mob/living/carbon/amorph/proc/HealDamage(zone, brute, burn)
return heal_overall_damage(brute, burn)
/mob/living/carbon/amorph/UpdateDamageIcon()
// no damage sprites for amorphs yet
return
/mob/living/carbon/amorph/apply_damage(var/damage = 0,var/damagetype = BRUTE, var/def_zone = null, var/blocked = 0, var/sharp = 0, var/used_weapon = null)
if(damagetype == BRUTE)
take_overall_damage(damage, 0)
else
/mob/living/carbon/amorph/proc/HealDamage(zone, brute, burn)
return heal_overall_damage(brute, burn)
/mob/living/carbon/amorph/UpdateDamageIcon()
// no damage sprites for amorphs yet
return
/mob/living/carbon/amorph/apply_damage(var/damage = 0,var/damagetype = BRUTE, var/def_zone = null, var/blocked = 0, var/sharp = 0, var/used_weapon = null)
if(damagetype == BRUTE)
take_overall_damage(damage, 0)
else
take_overall_damage(0, damage)
@@ -1,300 +1,300 @@
/obj/hud/proc/amorph_hud(var/ui_style='screen1_old.dmi')
src.adding = list( )
src.other = list( )
src.intents = list( )
src.mon_blo = list( )
src.m_ints = list( )
src.mov_int = list( )
src.vimpaired = list( )
src.darkMask = list( )
src.intent_small_hud_objects = list( )
src.g_dither = new /obj/screen( src )
src.g_dither.screen_loc = "WEST,SOUTH to EAST,NORTH"
src.g_dither.name = "Mask"
src.g_dither.icon = ui_style
src.g_dither.icon_state = "dither12g"
src.g_dither.layer = 18
src.g_dither.mouse_opacity = 0
src.alien_view = new /obj/screen(src)
src.alien_view.screen_loc = "WEST,SOUTH to EAST,NORTH"
src.alien_view.name = "Alien"
src.alien_view.icon = ui_style
src.alien_view.icon_state = "alien"
src.alien_view.layer = 18
src.alien_view.mouse_opacity = 0
src.blurry = new /obj/screen( src )
src.blurry.screen_loc = "WEST,SOUTH to EAST,NORTH"
src.blurry.name = "Blurry"
src.blurry.icon = ui_style
src.blurry.icon_state = "blurry"
src.blurry.layer = 17
src.blurry.mouse_opacity = 0
src.druggy = new /obj/screen( src )
src.druggy.screen_loc = "WEST,SOUTH to EAST,NORTH"
src.druggy.name = "Druggy"
src.druggy.icon = ui_style
src.druggy.icon_state = "druggy"
src.druggy.layer = 17
src.druggy.mouse_opacity = 0
var/obj/screen/using
using = new /obj/screen( src )
using.name = "act_intent"
using.dir = SOUTHWEST
using.icon = ui_style
using.icon_state = (mymob.a_intent == "hurt" ? "harm" : mymob.a_intent)
using.screen_loc = ui_acti
using.layer = 20
src.adding += using
action_intent = using
//intent small hud objects
var/icon/ico
ico = new(ui_style, "black")
ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
ico.DrawBox(rgb(255,255,255,1),1,ico.Height()/2,ico.Width()/2,ico.Height())
using = new /obj/screen( src )
using.name = "help"
using.icon = ico
using.screen_loc = ui_acti
using.layer = 21
src.adding += using
help_intent = using
ico = new(ui_style, "black")
ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
ico.DrawBox(rgb(255,255,255,1),ico.Width()/2,ico.Height()/2,ico.Width(),ico.Height())
using = new /obj/screen( src )
using.name = "disarm"
using.icon = ico
using.screen_loc = ui_acti
using.layer = 21
src.adding += using
disarm_intent = using
ico = new(ui_style, "black")
ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
ico.DrawBox(rgb(255,255,255,1),ico.Width()/2,1,ico.Width(),ico.Height()/2)
using = new /obj/screen( src )
using.name = "grab"
using.icon = ico
using.screen_loc = ui_acti
using.layer = 21
src.adding += using
grab_intent = using
ico = new(ui_style, "black")
ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
ico.DrawBox(rgb(255,255,255,1),1,1,ico.Width()/2,ico.Height()/2)
using = new /obj/screen( src )
using.name = "harm"
using.icon = ico
using.screen_loc = ui_acti
using.layer = 21
src.adding += using
hurt_intent = using
//end intent small hud objects
using = new /obj/screen( src )
using.name = "mov_intent"
using.dir = SOUTHWEST
using.icon = ui_style
using.icon_state = (mymob.m_intent == "run" ? "running" : "walking")
using.screen_loc = ui_movi
using.layer = 20
src.adding += using
move_intent = using
using = new /obj/screen( src )
using.name = "drop"
using.icon = ui_style
using.icon_state = "act_drop"
using.screen_loc = ui_dropbutton
using.layer = 19
src.adding += using
using = new /obj/screen( src )
using.name = "r_hand"
using.dir = WEST
using.icon = ui_style
using.icon_state = "hand_inactive"
if(mymob && !mymob.hand) //This being 0 or null means the right hand is in use
using.icon_state = "hand_active"
using.screen_loc = ui_rhand
using.layer = 19
src.r_hand_hud_object = using
src.adding += using
using = new /obj/screen( src )
using.name = "l_hand"
using.dir = EAST
using.icon = ui_style
using.icon_state = "hand_inactive"
if(mymob && mymob.hand) //This being 1 means the left hand is in use
using.icon_state = "hand_active"
using.screen_loc = ui_lhand
using.layer = 19
src.l_hand_hud_object = using
src.adding += using
using = new /obj/screen( src )
using.name = "hand"
using.dir = SOUTH
using.icon = ui_style
using.icon_state = "hand1"
using.screen_loc = ui_swaphand1
using.layer = 19
src.adding += using
using = new /obj/screen( src )
using.name = "hand"
using.dir = SOUTH
using.icon = ui_style
using.icon_state = "hand2"
using.screen_loc = ui_swaphand2
using.layer = 19
src.adding += using
using = new /obj/screen( src )
using.name = "mask"
using.dir = NORTH
using.icon = ui_style
using.icon_state = "equip"
using.screen_loc = ui_monkey_mask
using.layer = 19
src.adding += using
using = new /obj/screen( src )
using.name = "back"
using.dir = NORTHEAST
using.icon = ui_style
using.icon_state = "equip"
using.screen_loc = ui_back
using.layer = 19
src.adding += using
using = new /obj/screen( src )
using.name = null
using.icon = ui_style
using.icon_state = "dither50"
using.screen_loc = "1,1 to 5,15"
using.layer = 17
using.mouse_opacity = 0
src.vimpaired += using
using = new /obj/screen( src )
using.name = null
using.icon = ui_style
using.icon_state = "dither50"
using.screen_loc = "5,1 to 10,5"
using.layer = 17
using.mouse_opacity = 0
src.vimpaired += using
using = new /obj/screen( src )
using.name = null
using.icon = ui_style
using.icon_state = "dither50"
using.screen_loc = "6,11 to 10,15"
using.layer = 17
using.mouse_opacity = 0
src.vimpaired += using
using = new /obj/screen( src )
using.name = null
using.icon = ui_style
using.icon_state = "dither50"
using.screen_loc = "11,1 to 15,15"
using.layer = 17
using.mouse_opacity = 0
src.vimpaired += using
mymob.throw_icon = new /obj/screen(null)
mymob.throw_icon.icon = ui_style
mymob.throw_icon.icon_state = "act_throw_off"
mymob.throw_icon.name = "throw"
mymob.throw_icon.screen_loc = ui_throw
mymob.oxygen = new /obj/screen( null )
mymob.oxygen.icon = ui_style
mymob.oxygen.icon_state = "oxy0"
mymob.oxygen.name = "oxygen"
mymob.oxygen.screen_loc = ui_oxygen
mymob.pressure = new /obj/screen( null )
mymob.pressure.icon = ui_style
mymob.pressure.icon_state = "pressure0"
mymob.pressure.name = "pressure"
mymob.pressure.screen_loc = ui_pressure
mymob.toxin = new /obj/screen( null )
mymob.toxin.icon = ui_style
mymob.toxin.icon_state = "tox0"
mymob.toxin.name = "toxin"
mymob.toxin.screen_loc = ui_toxin
mymob.internals = new /obj/screen( null )
mymob.internals.icon = ui_style
mymob.internals.icon_state = "internal0"
mymob.internals.name = "internal"
mymob.internals.screen_loc = ui_internal
mymob.fire = new /obj/screen( null )
mymob.fire.icon = ui_style
mymob.fire.icon_state = "fire0"
mymob.fire.name = "fire"
mymob.fire.screen_loc = ui_fire
mymob.bodytemp = new /obj/screen( null )
mymob.bodytemp.icon = ui_style
mymob.bodytemp.icon_state = "temp1"
mymob.bodytemp.name = "body temperature"
mymob.bodytemp.screen_loc = ui_temp
mymob.healths = new /obj/screen( null )
mymob.healths.icon = ui_style
mymob.healths.icon_state = "health0"
mymob.healths.name = "health"
mymob.healths.screen_loc = ui_health
mymob.pullin = new /obj/screen( null )
mymob.pullin.icon = ui_style
mymob.pullin.icon_state = "pull0"
mymob.pullin.name = "pull"
mymob.pullin.screen_loc = ui_pull
mymob.blind = new /obj/screen( null )
mymob.blind.icon = ui_style
mymob.blind.icon_state = "blackanimate"
mymob.blind.name = " "
mymob.blind.screen_loc = "1,1 to 15,15"
mymob.blind.layer = 0
mymob.blind.mouse_opacity = 0
mymob.flash = new /obj/screen( null )
mymob.flash.icon = ui_style
mymob.flash.icon_state = "blank"
mymob.flash.name = "flash"
mymob.flash.screen_loc = "1,1 to 15,15"
mymob.flash.layer = 17
mymob.zone_sel = new /obj/screen/zone_sel( null )
mymob.zone_sel.overlays = null
mymob.zone_sel.overlays += image("icon" = 'zone_sel.dmi', "icon_state" = text("[]", mymob.zone_sel.selecting))
mymob.gun_setting_icon = new /obj/screen/gun/mode(null)
mymob.client.screen = null
//, mymob.i_select, mymob.m_select
mymob.client.screen += list( mymob.throw_icon, mymob.zone_sel, mymob.oxygen, mymob.pressure, mymob.toxin, mymob.bodytemp, mymob.internals, mymob.fire, mymob.healths, mymob.pullin, mymob.blind, mymob.flash, mymob.gun_setting_icon) //, mymob.hands, mymob.rest, mymob.sleep, mymob.mach, mymob.hands, )
mymob.client.screen += src.adding + src.other
//if(istype(mymob,/mob/living/carbon/monkey)) mymob.client.screen += src.mon_blo
return
/obj/hud/proc/amorph_hud(var/ui_style='screen1_old.dmi')
src.adding = list( )
src.other = list( )
src.intents = list( )
src.mon_blo = list( )
src.m_ints = list( )
src.mov_int = list( )
src.vimpaired = list( )
src.darkMask = list( )
src.intent_small_hud_objects = list( )
src.g_dither = new /obj/screen( src )
src.g_dither.screen_loc = "WEST,SOUTH to EAST,NORTH"
src.g_dither.name = "Mask"
src.g_dither.icon = ui_style
src.g_dither.icon_state = "dither12g"
src.g_dither.layer = 18
src.g_dither.mouse_opacity = 0
src.alien_view = new /obj/screen(src)
src.alien_view.screen_loc = "WEST,SOUTH to EAST,NORTH"
src.alien_view.name = "Alien"
src.alien_view.icon = ui_style
src.alien_view.icon_state = "alien"
src.alien_view.layer = 18
src.alien_view.mouse_opacity = 0
src.blurry = new /obj/screen( src )
src.blurry.screen_loc = "WEST,SOUTH to EAST,NORTH"
src.blurry.name = "Blurry"
src.blurry.icon = ui_style
src.blurry.icon_state = "blurry"
src.blurry.layer = 17
src.blurry.mouse_opacity = 0
src.druggy = new /obj/screen( src )
src.druggy.screen_loc = "WEST,SOUTH to EAST,NORTH"
src.druggy.name = "Druggy"
src.druggy.icon = ui_style
src.druggy.icon_state = "druggy"
src.druggy.layer = 17
src.druggy.mouse_opacity = 0
var/obj/screen/using
using = new /obj/screen( src )
using.name = "act_intent"
using.dir = SOUTHWEST
using.icon = ui_style
using.icon_state = (mymob.a_intent == "hurt" ? "harm" : mymob.a_intent)
using.screen_loc = ui_acti
using.layer = 20
src.adding += using
action_intent = using
//intent small hud objects
var/icon/ico
ico = new(ui_style, "black")
ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
ico.DrawBox(rgb(255,255,255,1),1,ico.Height()/2,ico.Width()/2,ico.Height())
using = new /obj/screen( src )
using.name = "help"
using.icon = ico
using.screen_loc = ui_acti
using.layer = 21
src.adding += using
help_intent = using
ico = new(ui_style, "black")
ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
ico.DrawBox(rgb(255,255,255,1),ico.Width()/2,ico.Height()/2,ico.Width(),ico.Height())
using = new /obj/screen( src )
using.name = "disarm"
using.icon = ico
using.screen_loc = ui_acti
using.layer = 21
src.adding += using
disarm_intent = using
ico = new(ui_style, "black")
ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
ico.DrawBox(rgb(255,255,255,1),ico.Width()/2,1,ico.Width(),ico.Height()/2)
using = new /obj/screen( src )
using.name = "grab"
using.icon = ico
using.screen_loc = ui_acti
using.layer = 21
src.adding += using
grab_intent = using
ico = new(ui_style, "black")
ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
ico.DrawBox(rgb(255,255,255,1),1,1,ico.Width()/2,ico.Height()/2)
using = new /obj/screen( src )
using.name = "harm"
using.icon = ico
using.screen_loc = ui_acti
using.layer = 21
src.adding += using
hurt_intent = using
//end intent small hud objects
using = new /obj/screen( src )
using.name = "mov_intent"
using.dir = SOUTHWEST
using.icon = ui_style
using.icon_state = (mymob.m_intent == "run" ? "running" : "walking")
using.screen_loc = ui_movi
using.layer = 20
src.adding += using
move_intent = using
using = new /obj/screen( src )
using.name = "drop"
using.icon = ui_style
using.icon_state = "act_drop"
using.screen_loc = ui_dropbutton
using.layer = 19
src.adding += using
using = new /obj/screen( src )
using.name = "r_hand"
using.dir = WEST
using.icon = ui_style
using.icon_state = "hand_inactive"
if(mymob && !mymob.hand) //This being 0 or null means the right hand is in use
using.icon_state = "hand_active"
using.screen_loc = ui_rhand
using.layer = 19
src.r_hand_hud_object = using
src.adding += using
using = new /obj/screen( src )
using.name = "l_hand"
using.dir = EAST
using.icon = ui_style
using.icon_state = "hand_inactive"
if(mymob && mymob.hand) //This being 1 means the left hand is in use
using.icon_state = "hand_active"
using.screen_loc = ui_lhand
using.layer = 19
src.l_hand_hud_object = using
src.adding += using
using = new /obj/screen( src )
using.name = "hand"
using.dir = SOUTH
using.icon = ui_style
using.icon_state = "hand1"
using.screen_loc = ui_swaphand1
using.layer = 19
src.adding += using
using = new /obj/screen( src )
using.name = "hand"
using.dir = SOUTH
using.icon = ui_style
using.icon_state = "hand2"
using.screen_loc = ui_swaphand2
using.layer = 19
src.adding += using
using = new /obj/screen( src )
using.name = "mask"
using.dir = NORTH
using.icon = ui_style
using.icon_state = "equip"
using.screen_loc = ui_monkey_mask
using.layer = 19
src.adding += using
using = new /obj/screen( src )
using.name = "back"
using.dir = NORTHEAST
using.icon = ui_style
using.icon_state = "equip"
using.screen_loc = ui_back
using.layer = 19
src.adding += using
using = new /obj/screen( src )
using.name = null
using.icon = ui_style
using.icon_state = "dither50"
using.screen_loc = "1,1 to 5,15"
using.layer = 17
using.mouse_opacity = 0
src.vimpaired += using
using = new /obj/screen( src )
using.name = null
using.icon = ui_style
using.icon_state = "dither50"
using.screen_loc = "5,1 to 10,5"
using.layer = 17
using.mouse_opacity = 0
src.vimpaired += using
using = new /obj/screen( src )
using.name = null
using.icon = ui_style
using.icon_state = "dither50"
using.screen_loc = "6,11 to 10,15"
using.layer = 17
using.mouse_opacity = 0
src.vimpaired += using
using = new /obj/screen( src )
using.name = null
using.icon = ui_style
using.icon_state = "dither50"
using.screen_loc = "11,1 to 15,15"
using.layer = 17
using.mouse_opacity = 0
src.vimpaired += using
mymob.throw_icon = new /obj/screen(null)
mymob.throw_icon.icon = ui_style
mymob.throw_icon.icon_state = "act_throw_off"
mymob.throw_icon.name = "throw"
mymob.throw_icon.screen_loc = ui_throw
mymob.oxygen = new /obj/screen( null )
mymob.oxygen.icon = ui_style
mymob.oxygen.icon_state = "oxy0"
mymob.oxygen.name = "oxygen"
mymob.oxygen.screen_loc = ui_oxygen
mymob.pressure = new /obj/screen( null )
mymob.pressure.icon = ui_style
mymob.pressure.icon_state = "pressure0"
mymob.pressure.name = "pressure"
mymob.pressure.screen_loc = ui_pressure
mymob.toxin = new /obj/screen( null )
mymob.toxin.icon = ui_style
mymob.toxin.icon_state = "tox0"
mymob.toxin.name = "toxin"
mymob.toxin.screen_loc = ui_toxin
mymob.internals = new /obj/screen( null )
mymob.internals.icon = ui_style
mymob.internals.icon_state = "internal0"
mymob.internals.name = "internal"
mymob.internals.screen_loc = ui_internal
mymob.fire = new /obj/screen( null )
mymob.fire.icon = ui_style
mymob.fire.icon_state = "fire0"
mymob.fire.name = "fire"
mymob.fire.screen_loc = ui_fire
mymob.bodytemp = new /obj/screen( null )
mymob.bodytemp.icon = ui_style
mymob.bodytemp.icon_state = "temp1"
mymob.bodytemp.name = "body temperature"
mymob.bodytemp.screen_loc = ui_temp
mymob.healths = new /obj/screen( null )
mymob.healths.icon = ui_style
mymob.healths.icon_state = "health0"
mymob.healths.name = "health"
mymob.healths.screen_loc = ui_health
mymob.pullin = new /obj/screen( null )
mymob.pullin.icon = ui_style
mymob.pullin.icon_state = "pull0"
mymob.pullin.name = "pull"
mymob.pullin.screen_loc = ui_pull
mymob.blind = new /obj/screen( null )
mymob.blind.icon = ui_style
mymob.blind.icon_state = "blackanimate"
mymob.blind.name = " "
mymob.blind.screen_loc = "1,1 to 15,15"
mymob.blind.layer = 0
mymob.blind.mouse_opacity = 0
mymob.flash = new /obj/screen( null )
mymob.flash.icon = ui_style
mymob.flash.icon_state = "blank"
mymob.flash.name = "flash"
mymob.flash.screen_loc = "1,1 to 15,15"
mymob.flash.layer = 17
mymob.zone_sel = new /obj/screen/zone_sel( null )
mymob.zone_sel.overlays = null
mymob.zone_sel.overlays += image("icon" = 'zone_sel.dmi', "icon_state" = text("[]", mymob.zone_sel.selecting))
mymob.gun_setting_icon = new /obj/screen/gun/mode(null)
mymob.client.screen = null
//, mymob.i_select, mymob.m_select
mymob.client.screen += list( mymob.throw_icon, mymob.zone_sel, mymob.oxygen, mymob.pressure, mymob.toxin, mymob.bodytemp, mymob.internals, mymob.fire, mymob.healths, mymob.pullin, mymob.blind, mymob.flash, mymob.gun_setting_icon) //, mymob.hands, mymob.rest, mymob.sleep, mymob.mach, mymob.hands, )
mymob.client.screen += src.adding + src.other
//if(istype(mymob,/mob/living/carbon/monkey)) mymob.client.screen += src.mon_blo
return
@@ -1,6 +1,6 @@
/mob/living/carbon/amorph/emote(var/act,var/m_type=1,var/message = null)
if(act == "me")
return custom_emote(m_type, message)
/mob/living/carbon/amorph/say_quote(var/text)
return "[src.say_message], \"[text]\"";
/mob/living/carbon/amorph/emote(var/act,var/m_type=1,var/message = null)
if(act == "me")
return custom_emote(m_type, message)
/mob/living/carbon/amorph/say_quote(var/text)
return "[src.say_message], \"[text]\"";
+14 -8
View File
@@ -2,10 +2,18 @@
//moved these here from code/defines/obj/weapon.dm
//please preference put stuff where it's easy to find - C
/obj/item/weapon/autopsy_scanner/var/list/datum/autopsy_data_scanner/wdata = list()
/obj/item/weapon/autopsy_scanner/var/list/datum/autopsy_data_scanner/chemtraces = list()
/obj/item/weapon/autopsy_scanner/var/target_name = null
/obj/item/weapon/autopsy_scanner/var/timeofdeath = null
/obj/item/weapon/autopsy_scanner
name = "autopsy scanner"
desc = "Extracts information on wounds."
icon = 'icons/obj/autopsy_scanner.dmi'
icon_state = ""
flags = FPRINT | TABLEPASS | CONDUCT
w_class = 1.0
origin_tech = "materials=1;biotech=1"
var/list/datum/autopsy_data_scanner/wdata = list()
var/list/datum/autopsy_data_scanner/chemtraces = list()
var/target_name = null
var/timeofdeath = null
/datum/autopsy_data_scanner
var/weapon = null // this is the DEFINITE weapon type that was used
@@ -74,10 +82,6 @@
usr << "No."
return
if(wdata.len == 0 && chemtraces.len == 0)
usr << "<b>* There is no data about any wounds in the scanner's database. You may have to scan more bodyparts, or otherwise this wound type may not be in the scanner's database."
return
var/scan_data = ""
if(timeofdeath)
@@ -179,6 +183,8 @@
if(target_name != M.name)
target_name = M.name
src.wdata = list()
src.chemtraces = list()
src.timeofdeath = null
user << "\red A new patient has been registered.. Purging data for previous patient."
src.timeofdeath = M.timeofdeath
File diff suppressed because it is too large Load Diff
+3 -3
View File
@@ -148,7 +148,7 @@ proc/Airflow(zone/A, zone/B)
//Check for knocking people over
if(ismob(M) && n > vsc.airflow_stun_pressure)
if(M:nodamage) continue
if(M:status_flags & GODMODE) continue
M:airflow_stun()
if(M.check_airflow_movable(n))
@@ -242,7 +242,7 @@ atom/movable
if(airflow_dest == loc)
step_away(src,loc)
if(ismob(src))
if(src:nodamage)
if(src:status_flags & GODMODE)
return
if(istype(src, /mob/living/carbon/human))
if(src:buckled)
@@ -307,7 +307,7 @@ atom/movable
if(airflow_dest == loc)
step_away(src,loc)
if(ismob(src))
if(src:nodamage)
if(src:status_flags & GODMODE)
return
if(istype(src, /mob/living/carbon/human))
if(src:buckled)
+2
View File
@@ -40,6 +40,8 @@ datum/controller/game_controller/New()
createRandomZlevel()
setup_economy()
if(!air_master)
air_master = new /datum/controller/air_system()
air_master.setup()
+7 -5
View File
@@ -224,6 +224,7 @@
proc/clamp()
var/rval = 0
src.status &= ~ORGAN_BLEEDING
for(var/datum/wound/W in wounds)
if(W.internal) continue
rval |= !W.clamped
@@ -610,11 +611,12 @@
take_damage(brute, burn, sharp, used_weapon = null, list/forbidden_limbs = list())
..(brute, burn, sharp, used_weapon, forbidden_limbs)
if (brute_dam > 40)
if (prob(50))
disfigure("brute")
if (burn_dam > 40)
disfigure("burn")
if (!disfigured)
if (brute_dam > 40)
if (prob(50))
disfigure("brute")
if (burn_dam > 40)
disfigure("burn")
proc/disfigure(var/type = "brute")
if (disfigured)
+103 -18
View File
@@ -5,6 +5,8 @@
//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.
var/list/all_supply_groups = list("Operations","Security","Hospitality","Engineering","Medical / Science","Hydroponics")
/datum/supply_packs
var/name = null
var/list/contains = list()
@@ -38,6 +40,7 @@
cost = 20
containertype = /obj/structure/closet/crate
containername = "Special Ops crate"
group = "Security"
hidden = 1
/datum/supply_packs/food
@@ -53,6 +56,7 @@
cost = 10
containertype = /obj/structure/closet/crate/freezer
containername = "Food crate"
group = "Hospitality"
/datum/supply_packs/monkey
name = "Monkey crate"
@@ -60,6 +64,7 @@
cost = 20
containertype = /obj/structure/closet/crate/freezer
containername = "Monkey crate"
group = "Hydroponics"
/datum/supply_packs/beanbagammo
@@ -77,6 +82,7 @@
cost = 10
containertype = /obj/structure/closet/crate
containername = "Beanbag shells"
group = "Security"
/datum/supply_packs/toner
name = "Toner Cartridges"
@@ -89,6 +95,7 @@
cost = 10
containertype = /obj/structure/closet/crate
containername = "Toner Cartridges"
group = "Operations"
/datum/supply_packs/party
name = "Party equipment"
@@ -105,6 +112,7 @@
cost = 20
containertype = /obj/structure/closet/crate
containername = "Party equipment"
group = "Hospitality"
/datum/supply_packs/internals
name = "Internals crate"
@@ -117,18 +125,19 @@
cost = 10
containertype = /obj/structure/closet/crate/internals
containername = "Internals crate"
group = "Engineering"
/datum/supply_packs/evacuation
name = "Emergency equipment"
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,
contains = list(/obj/item/weapon/storage/toolbox/emergency,
/obj/item/weapon/storage/toolbox/emergency,
/obj/item/clothing/suit/storage/hazardvest,
/obj/item/clothing/suit/storage/hazardvest,
/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,
/obj/item/clothing/mask/gas,
/obj/item/clothing/mask/gas,
/obj/item/clothing/mask/gas,
@@ -137,6 +146,7 @@
cost = 35
containertype = /obj/structure/closet/crate/internals
containername = "Emergency Crate"
group = "Engineering"
/datum/supply_packs/janitor
name = "Janitorial supplies"
@@ -157,6 +167,7 @@
cost = 10
containertype = /obj/structure/closet/crate
containername = "Janitorial supplies"
group = "Operations"
/datum/supply_packs/lightbulbs
name = "Replacement lights"
@@ -166,8 +177,8 @@
cost = 10
containertype = /obj/structure/closet/crate
containername = "Replacement lights"
//BS12 EDIT
/*
group = "Engineering"
/datum/supply_packs/costume
name = "Standard Costume crate"
contains = list(/obj/item/weapon/storage/backpack/clown,
@@ -186,7 +197,8 @@
containertype = /obj/structure/closet/crate/secure
containername = "Standard Costumes"
access = access_theatre
*/
group = "Operations"
/datum/supply_packs/wizard
name = "Wizard costume"
contains = list(/obj/item/weapon/staff,
@@ -196,6 +208,7 @@
cost = 20
containertype = /obj/structure/closet/crate
containername = "Wizard costume crate"
group = "Operations"
/datum/supply_packs/mule
name = "MULEbot Crate"
@@ -203,7 +216,15 @@
cost = 20
containertype = /obj/structure/largecrate/mule
containername = "MULEbot Crate"
group = "Operations"
/datum/supply_packs/lisa
name = "Corgi Crate"
contains = list()
cost = 50
containertype = /obj/structure/largecrate/lisa
containername = "Corgi Crate"
group = "Hydroponics"
/datum/supply_packs/hydroponics // -- Skie
name = "Hydroponics Supply Crate"
contains = list(/obj/item/weapon/reagent_containers/spray/plantbgone,
@@ -219,6 +240,7 @@
containertype = /obj/structure/closet/crate/hydroponics
containername = "Hydroponics crate"
access = access_hydroponics
group = "Hydroponics"
//farm animals - useless and annoying, but potentially a good source of food
/datum/supply_packs/cow
@@ -267,6 +289,7 @@
containertype = /obj/structure/closet/crate/hydroponics
containername = "Seeds crate"
access = access_hydroponics
group = "Hydroponics"
/datum/supply_packs/weedcontrol
name = "Weed Control Crate"
@@ -278,6 +301,7 @@
containertype = /obj/structure/closet/crate/secure/hydrosec
containername = "Weed control crate"
access = access_hydroponics
group = "Hydroponics"
/datum/supply_packs/exoticseeds
name = "Exotic Seeds Crate"
@@ -295,6 +319,7 @@
containertype = /obj/structure/closet/crate/hydroponics
containername = "Exotic Seeds crate"
access = access_hydroponics
group = "Hydroponics"
/datum/supply_packs/medical
name = "Medical crate"
@@ -309,6 +334,7 @@
cost = 10
containertype = /obj/structure/closet/crate/medical
containername = "Medical crate"
group = "Medical / Science"
/datum/supply_packs/virus
@@ -327,6 +353,7 @@
/obj/item/weapon/reagent_containers/glass/bottle/mutagen)
containername = "Virus crate"
access = access_cmo
group = "Medical / Science"
/datum/supply_packs/metal50
name = "50 Metal Sheets"
@@ -335,6 +362,7 @@
cost = 10
containertype = /obj/structure/closet/crate
containername = "Metal sheets crate"
group = "Engineering"
/datum/supply_packs/glass50
name = "50 Glass Sheets"
@@ -343,6 +371,7 @@
cost = 10
containertype = /obj/structure/closet/crate
containername = "Glass sheets crate"
group = "Engineering"
/datum/supply_packs/electrical
name = "Electrical maintenance crate"
@@ -357,6 +386,7 @@
cost = 15
containertype = /obj/structure/closet/crate
containername = "Electrical maintenance crate"
group = "Engineering"
/datum/supply_packs/mechanical
name = "Mechanical maintenance crate"
@@ -372,6 +402,7 @@
cost = 10
containertype = /obj/structure/closet/crate
containername = "Mechanical maintenance crate"
group = "Engineering"
/datum/supply_packs/watertank
name = "Water tank crate"
@@ -379,6 +410,7 @@
cost = 8
containertype = /obj/structure/largecrate
containername = "water tank crate"
group = "Hydroponics"
/datum/supply_packs/fueltank
name = "Fuel tank crate"
@@ -386,6 +418,7 @@
cost = 8
containertype = /obj/structure/largecrate
containername = "fuel tank crate"
group = "Engineering"
/datum/supply_packs/solar
name = "Solar Pack crate"
@@ -416,6 +449,7 @@
cost = 20
containertype = /obj/structure/closet/crate
containername = "solar pack crate"
group = "Engineering"
/datum/supply_packs/engine
name = "Emitter crate"
@@ -425,6 +459,7 @@
containertype = /obj/structure/closet/crate/secure
containername = "Emitter crate"
access = access_ce
group = "Engineering"
/datum/supply_packs/engine/field_gen
name = "Field Generator crate"
@@ -433,6 +468,7 @@
containertype = /obj/structure/closet/crate/secure
containername = "Field Generator crate"
access = access_ce
group = "Engineering"
/datum/supply_packs/engine/sing_gen
name = "Singularity Generator crate"
@@ -440,6 +476,7 @@
containertype = /obj/structure/closet/crate/secure
containername = "Singularity Generator crate"
access = access_ce
group = "Engineering"
/datum/supply_packs/engine/collector
name = "Collector crate"
@@ -447,6 +484,7 @@
/obj/machinery/power/rad_collector,
/obj/machinery/power/rad_collector)
containername = "Collector crate"
group = "Engineering"
/datum/supply_packs/engine/PA
name = "Particle Accelerator crate"
@@ -461,6 +499,7 @@
containertype = /obj/structure/closet/crate/secure
containername = "Particle Accelerator crate"
access = access_ce
group = "Engineering"
/datum/supply_packs/mecha_ripley
name = "Circuit Crate (\"Ripley\" APLU)"
@@ -471,6 +510,7 @@
containertype = /obj/structure/closet/crate/secure
containername = "APLU \"Ripley\" Circuit Crate"
access = access_robotics
group = "Engineering"
/datum/supply_packs/mecha_odysseus
name = "Circuit Crate (\"Odysseus\")"
@@ -480,6 +520,7 @@
containertype = /obj/structure/closet/crate/secure
containername = "\"Odysseus\" Circuit Crate"
access = access_robotics
group = "Engineering"
/datum/supply_packs/robotics
@@ -498,6 +539,7 @@
containertype = /obj/structure/closet/crate/secure/gear
containername = "Robotics Assembly"
access = access_robotics
group = "Engineering"
/datum/supply_packs/plasma
name = "Plasma assembly crate"
@@ -517,6 +559,7 @@
containertype = /obj/structure/closet/crate/secure/plasma
containername = "Plasma assembly crate"
access = access_tox_storage
group = "Medical / Science"
/datum/supply_packs/weapons
name = "Weapons crate"
@@ -532,6 +575,7 @@
containertype = /obj/structure/closet/crate/secure/weapon
containername = "Weapons crate"
access = access_security
group = "Security"
/datum/supply_packs/eweapons
name = "Experimental weapons crate"
@@ -546,6 +590,7 @@
containertype = /obj/structure/closet/crate/secure/weapon
containername = "Experimental weapons crate"
access = access_heads
group = "Security"
/datum/supply_packs/armor
name = "Armor crate"
@@ -557,6 +602,7 @@
containertype = /obj/structure/closet/crate/secure
containername = "Armor crate"
access = access_security
group = "Security"
/datum/supply_packs/riot
name = "Riot gear crate"
@@ -582,6 +628,7 @@
containertype = /obj/structure/closet/crate/secure
containername = "Riot gear crate"
access = access_armory
group = "Security"
/datum/supply_packs/loyalty
name = "Loyalty implant crate"
@@ -590,6 +637,7 @@
containertype = /obj/structure/closet/crate/secure
containername = "Loyalty implant crate"
access = access_armory
group = "Security"
/datum/supply_packs/ballistic
name = "Ballistic gear crate"
@@ -601,6 +649,7 @@
containertype = /obj/structure/closet/crate/secure
containername = "Ballistic gear crate"
access = access_armory
group = "Security"
/datum/supply_packs/expenergy
name = "Experimental energy gear crate"
@@ -612,6 +661,7 @@
containertype = /obj/structure/closet/crate/secure
containername = "Experimental energy gear crate"
access = access_armory
group = "Security"
/datum/supply_packs/exparmor
name = "Experimental armor crate"
@@ -623,6 +673,7 @@
containertype = /obj/structure/closet/crate/secure
containername = "Experimental armor crate"
access = access_armory
group = "Security"
/datum/supply_packs/securitybarriers
name = "Security Barriers"
@@ -633,6 +684,7 @@
cost = 20
containertype = /obj/structure/closet/crate/secure/gear
containername = "Security Barriers crate"
group = "Security"
/datum/supply_packs/securitybarriers
name = "Shield Generators"
@@ -644,6 +696,7 @@
containertype = /obj/structure/closet/crate/secure
containername = "Shield Generators crate"
access = access_teleporter
group = "Security"
/datum/supply_packs/randomised
var/num_contained = 3 //number of items picked to be contained in a randomised crate
@@ -671,6 +724,7 @@
cost = 200
containertype = /obj/structure/closet/crate
containername = "Collectable hats crate! Brought to you by Bass.inc!"
group = "Operations"
/datum/supply_packs/randomised/New()
manifest += "Contains any [num_contained] of:"
@@ -694,12 +748,11 @@
/obj/item/weapon/reagent_containers/glass/paint/remover,
/obj/item/weapon/wrapping_paper,
/obj/item/weapon/wrapping_paper,
/obj/item/weapon/wrapping_paper,
/obj/item/weapon/contraband/poster)
cost = 5
/obj/item/weapon/wrapping_paper)
cost = 10
containertype = "/obj/structure/closet/crate"
containername = "Arts and Crafts crate"
group = "Operations"
/datum/supply_packs/randomised/contraband
num_contained = 5
@@ -716,6 +769,7 @@
containertype = /obj/structure/closet/crate
containername = "Unlabeled crate"
contraband = 1
group = "Operations"
/datum/supply_packs/boxes
name = "Empty Box supplies"
@@ -729,9 +783,10 @@
/obj/item/weapon/storage/box,
/obj/item/weapon/storage/box,
/obj/item/weapon/storage/box)
cost = 5
cost = 10
containertype = "/obj/structure/closet/crate"
containername = "Empty Box crate"
group = "Operations"
/datum/supply_packs/surgery
name = "Surgery crate"
@@ -758,7 +813,37 @@
/obj/item/clothing/under/rank/medical/green,
/obj/item/weapon/storage/box/masks,
/obj/item/weapon/storage/box/gloves)
cost = 10
cost = 15
containertype = "/obj/structure/closet/crate"
containername = "Sterile equipment crate"
group = "Medical / Science"
/datum/supply_packs/randomised/pizza
num_contained = 6
contains = list(/obj/item/pizzabox/margherita,
/obj/item/pizzabox/mushroom,
/obj/item/pizzabox/meat,
/obj/item/pizzabox/vegetable)
name = "Surprise pack of half a dozen pizzas"
cost = 15
containertype = /obj/structure/closet/crate
containername = "Pizza crate"
group = "Hospitality"
/datum/supply_packs/formal_wear
contains = list(/obj/item/clothing/head/bowler,
/obj/item/clothing/head/that,
/obj/item/clothing/suit/storage/lawyer/bluejacket,
/obj/item/clothing/suit/storage/lawyer/purpjacket,
/obj/item/clothing/under/suit_jacket,
/obj/item/clothing/under/suit_jacket/female,
/obj/item/clothing/under/suit_jacket/really_black,
/obj/item/clothing/under/suit_jacket/red,
/obj/item/clothing/shoes/black,
/obj/item/clothing/shoes/black,
/obj/item/clothing/suit/wcoat)
name = "Formalwear closet"
cost = 30
containertype = /obj/structure/closet
containername = "Formalwear for the best occasions."
group = "Operations"
-248
View File
@@ -1,248 +0,0 @@
/atom
layer = 2
var/level = 2
var/flags = FPRINT
var/list/fingerprints
var/list/fingerprintshidden
var/fingerprintslast = null
var/list/blood_DNA
var/last_bumped = 0
var/pass_flags = 0
///Chemistry.
var/datum/reagents/reagents = null
//var/chem_is_open_container = 0
// 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
proc/remove_air(amount)
return null
proc/return_air()
if(loc)
return loc.return_air()
else
return null
// Convenience proc to see if a container is open for chemistry handling
// returns true if open
// false if closed
proc/is_open_container()
return flags & OPENCONTAINER
/*//Convenience proc to see whether a container can be accessed in a certain way.
proc/can_subract_container()
return flags & EXTRACT_CONTAINER
proc/can_add_container()
return flags & INSERT_CONTAINER
*/
obj
assume_air(datum/gas_mixture/giver)
if(loc)
return loc.assume_air(giver)
else
return null
remove_air(amount)
if(loc)
return loc.remove_air(amount)
else
return null
return_air()
if(loc)
return loc.return_air()
else
return null
/atom/proc/meteorhit(obj/meteor as obj)
return
/atom/proc/allow_drop()
return 1
/atom/proc/CheckExit()
return 1
/atom/proc/HasEntered(atom/movable/AM as mob|obj)
return
/atom/proc/HasProximity(atom/movable/AM as mob|obj)
return
/atom/proc/emp_act(var/severity)
return
/atom/proc/bullet_act(var/obj/item/projectile/Proj)
return 0
/atom/proc/in_contents_of(container)//can take class or object instance as argument
if(ispath(container))
if(istype(src.loc, container))
return 1
else if(src in container)
return 1
return
/*
* atom/proc/search_contents_for(path,list/filter_path=null)
* Recursevly searches all atom contens (including contents contents and so on).
*
* ARGS: path - search atom contents for atoms of this type
* list/filter_path - if set, contents of atoms not of types in this list are excluded from search.
*
* RETURNS: list of found atoms
*/
/atom/proc/search_contents_for(path,list/filter_path=null)
var/list/found = list()
for(var/atom/A in src)
if(istype(A, path))
found += A
if(filter_path)
var/pass = 0
for(var/type in filter_path)
pass |= istype(A, type)
if(!pass)
continue
if(A.contents.len)
found += A.search_contents_for(path,filter_path)
return found
/atom/movable/overlay/attackby(a, b)
if (src.master)
return src.master.attackby(a, b)
return
/atom/movable/overlay/attack_paw(a, b, c)
if (src.master)
return src.master.attack_paw(a, b, c)
return
/atom/movable/overlay/attack_hand(a, b, c)
if (src.master)
return src.master.attack_hand(a, b, c)
return
/atom/movable/overlay/New()
for(var/x in src.verbs)
src.verbs -= x
return
/atom/movable
layer = 3
var/last_move = null
var/anchored = 0
// var/elevation = 2 - not used anywhere
var/move_speed = 10
var/l_move_time = 1
var/m_flag = 1
var/throwing = 0
var/throw_speed = 2
var/throw_range = 7
var/moved_recently = 0
/atom/movable/overlay
var/atom/master = null
anchored = 1
/atom/movable/Move()
var/atom/A = src.loc
. = ..()
src.move_speed = world.timeofday - src.l_move_time
src.l_move_time = world.timeofday
src.m_flag = 1
if ((A != src.loc && A && A.z == src.z))
src.last_move = get_dir(A, src.loc)
return
/*
Beam code by Gunbuddy
Beam() proc will only allow one beam to come from a source at a time. Attempting to call it more than
once at a time per source will cause graphical errors.
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='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
//Icon_state is what icon state is used. Default is b_beam which is a blue beam.
//Maxdistance is the longest range the beam will persist before it gives up.
var/EndTime=world.time+time
while(BeamTarget&&world.time<EndTime&&get_dist(src,BeamTarget)<maxdistance&&z==BeamTarget.z)
//If the BeamTarget gets deleted, the time expires, or the BeamTarget gets out
//of range or to another z-level, then the beam will stop. Otherwise it will
//continue to draw.
dir=get_dir(src,BeamTarget) //Causes the source of the beam to rotate to continuosly face the BeamTarget.
for(var/obj/effect/overlay/beam/O in orange(10,src)) //This section erases the previously drawn beam because I found it was easier to
if(O.BeamSource==src) //just draw another instance of the beam instead of trying to manipulate all the
del O //pieces to a new orientation.
var/Angle=round(Get_Angle(src,BeamTarget))
var/icon/I=new(icon,icon_state)
I.Turn(Angle)
var/DX=(32*BeamTarget.x+BeamTarget.pixel_x)-(32*x+pixel_x)
var/DY=(32*BeamTarget.y+BeamTarget.pixel_y)-(32*y+pixel_y)
var/N=0
var/length=round(sqrt((DX)**2+(DY)**2))
for(N,N<length,N+=32)
var/obj/effect/overlay/beam/X=new(loc)
X.BeamSource=src
if(N+32>length)
var/icon/II=new(icon,icon_state)
II.DrawBox(null,1,(length-N),32,32)
II.Turn(Angle)
X.icon=II
else X.icon=I
var/Pixel_x=round(sin(Angle)+32*sin(Angle)*(N+16)/32)
var/Pixel_y=round(cos(Angle)+32*cos(Angle)*(N+16)/32)
if(DX==0) Pixel_x=0
if(DY==0) Pixel_y=0
if(Pixel_x>32)
for(var/a=0, a<=Pixel_x,a+=32)
X.x++
Pixel_x-=32
if(Pixel_x<-32)
for(var/a=0, a>=Pixel_x,a-=32)
X.x--
Pixel_x+=32
if(Pixel_y>32)
for(var/a=0, a<=Pixel_y,a+=32)
X.y++
Pixel_y-=32
if(Pixel_y<-32)
for(var/a=0, a>=Pixel_y,a-=32)
X.y--
Pixel_y+=32
X.pixel_x=Pixel_x
X.pixel_y=Pixel_y
sleep(3) //Changing this to a lower value will cause the beam to follow more smoothly with movement, but it will also be more laggy.
//I've found that 3 ticks provided a nice balance for my use.
for(var/obj/effect/overlay/beam/O in orange(10,src)) if(O.BeamSource==src) del O
atom/movable/proc/forceMove(atom/destination)
if(destination)
if(loc)
loc.Exited(src)
loc = destination
loc.Entered(src)
return 1
return 0
-238
View File
@@ -1,238 +0,0 @@
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31
var/global/obj/effect/datacore/data_core = null
var/global/obj/effect/overlay/plmaster = null
var/global/obj/effect/overlay/slmaster = null
//obj/hud/main_hud1 = null
var/global/list/machines = list()
var/global/list/processing_objects = list()
var/global/list/active_diseases = list()
//items that ask to be called every cycle
var/global/defer_powernet_rebuild = 0 // true if net rebuild will be called manually after an event
//list/global_map = null //Borked, do not touch. DMTG
//list/global_map = list(list(1,5),list(4,3))//an array of map Z levels.
//Resulting sector map looks like
//|_1_|_4_|
//|_5_|_3_|
//
//1 - SS13
//4 - Derelict
//3 - AI satellite
//5 - empty space
//////////////
var/BLINDBLOCK = 0
var/DEAFBLOCK = 0
var/HULKBLOCK = 0
var/TELEBLOCK = 0
var/FIREBLOCK = 0
var/XRAYBLOCK = 0
var/CLUMSYBLOCK = 0
var/FAKEBLOCK = 0
var/BLOCKADD = 0
var/DIFFMUT = 0
var/HEADACHEBLOCK = 0
var/COUGHBLOCK = 0
var/TWITCHBLOCK = 0
var/NERVOUSBLOCK = 0
var/NOBREATHBLOCK = 0
var/REMOTEVIEWBLOCK = 0
var/REGENERATEBLOCK = 0
var/INCREASERUNBLOCK = 0
var/REMOTETALKBLOCK = 0
var/MORPHBLOCK = 0
var/BLENDBLOCK = 0
var/HALLUCINATIONBLOCK = 0
var/NOPRINTSBLOCK = 0
var/SHOCKIMMUNITYBLOCK = 0
var/SMALLSIZEBLOCK = 0
var/GLASSESBLOCK = 0
var/MONKEYBLOCK = 27
var/skipupdate = 0
///////////////
var/eventchance = 1 //% per 2 mins
var/EventsOn = 1
var/hadevent = 0
var/blobevent = 0
///////////////
var/diary = null
var/diaryofmeanpeople = null
var/href_logfile = null
var/station_name = null
var/game_version = "Baystation 12"
var/datum/air_tunnel/air_tunnel1/SS13_airtunnel = null
var/going = 1.0
var/master_mode = "traitor"//"extended"
var/secret_force_mode = "secret" // if this is anything but "secret", the secret rotation will forceably choose this mode
var/datum/engine_eject/engine_eject_control = null
var/host = null
var/aliens_allowed = 1
var/ooc_allowed = 1
var/dooc_allowed = 1
var/traitor_scaling = 1
//var/goonsay_allowed = 0
var/dna_ident = 1
var/abandon_allowed = 1
var/enter_allowed = 1
var/guests_allowed = 0
var/shuttle_frozen = 0
var/shuttle_left = 0
var/tinted_weldhelh = 1
var/list/jobMax = list()
var/list/bombers = list( )
var/list/admin_log = list ( )
var/list/lastsignalers = list( ) //keeps last 100 signals here in format: "[src] used \ref[src] @ location [src.loc]: [freq]/[code]"
var/list/lawchanges = list( ) //Stores who uploaded laws to which silicon-based lifeform, and what the law was
var/list/admins = list( )
var/list/shuttles = list( )
var/list/reg_dna = list( )
// list/traitobj = list( )
var/CELLRATE = 0.002 // multiplier for watts per tick <> cell storage (eg: .002 means if there is a load of 1000 watts, 20 units will be taken from a cell per second)
var/CHARGELEVEL = 0.001 // Cap for how fast cells charge, as a percentage-per-tick (.001 means cellcharge is capped to 1% per second)
var/shuttle_z = 2 //default
var/airtunnel_start = 68 // default
var/airtunnel_stop = 68 // default
var/airtunnel_bottom = 72 // default
var/list/monkeystart = list()
var/list/wizardstart = list()
var/list/newplayer_start = list()
var/list/latejoin = list()
var/list/prisonwarp = list() //prisoners go to these
var/list/holdingfacility = list() //captured people go here
var/list/xeno_spawn = list()//Aliens spawn at these.
// list/mazewarp = list()
var/list/tdome1 = list()
var/list/tdome2 = list()
var/list/tdomeobserve = list()
var/list/tdomeadmin = list()
var/list/prisonsecuritywarp = list() //prison security goes to these
var/list/prisonwarped = list() //list of players already warped
var/list/blobstart = list()
// list/traitors = list() //traitor list
var/list/cardinal = list( NORTH, SOUTH, EAST, WEST )
var/list/alldirs = list(NORTH, SOUTH, EAST, WEST, NORTHEAST, NORTHWEST, SOUTHEAST, SOUTHWEST)
var/list/emclosets = list() //random emergency closets woo
var/datum/station_state/start_state = null
var/datum/configuration/config = null
var/datum/vote/vote = null
var/datum/sun/sun = null
var/list/combatlog = list()
var/list/IClog = list()
var/list/OOClog = list()
var/list/adminlog = list()
var/list/powernets = null
var/Debug = 0 // global debug switch
var/Debug2 = 0
var/datum/debug/debugobj
var/datum/moduletypes/mods = new()
var/wavesecret = 0
var/shuttlecoming = 0
var/join_motd = null
var/forceblob = 0
var/custom_event_msg = null
//airlockWireColorToIndex takes a number representing the wire color, e.g. the orange wire is always 1, the dark red wire is always 2, etc. It returns the index for whatever that wire does.
//airlockIndexToWireColor does the opposite thing - it takes the index for what the wire does, for example AIRLOCK_WIRE_IDSCAN is 1, AIRLOCK_WIRE_POWER1 is 2, etc. It returns the wire color number.
//airlockWireColorToFlag takes the wire color number and returns the flag for it (1, 2, 4, 8, 16, etc)
var/list/airlockWireColorToFlag = RandomAirlockWires()
var/list/airlockIndexToFlag
var/list/airlockIndexToWireColor
var/list/airlockWireColorToIndex
var/list/APCWireColorToFlag = RandomAPCWires()
var/list/APCIndexToFlag
var/list/APCIndexToWireColor
var/list/APCWireColorToIndex
var/list/BorgWireColorToFlag = RandomBorgWires()
var/list/BorgIndexToFlag
var/list/BorgIndexToWireColor
var/list/BorgWireColorToIndex
var/list/ScrambledFrequencies = list( ) //These are used for electrical storms, and anything else that jams radios.
var/list/UnscrambledFrequencies = list( )
var/list/AAlarmWireColorToFlag = RandomAAlarmWires() // Air Alarm hacking wires.
var/list/AAlarmIndexToFlag
var/list/AAlarmIndexToWireColor
var/list/AAlarmWireColorToIndex
var/list/paper_blacklist = list("script","frame","iframe","input","button","a","embed","object")
#define shuttle_time_in_station 1800 // 3 minutes in the station
#define shuttle_time_to_arrive 6000 // 10 minutes to arrive
// MySQL configuration. You can also use the config/dbconfig.txt file.
var/sqladdress = "localhost"
var/sqlport = "3306"
var/sqldb = "tgstation"
var/sqllogin = "root"
var/sqlpass = ""
// Feedback gathering sql connection
var/sqlfdbkdb = "test"
var/sqlfdbklogin = "root"
var/sqlfdbkpass = ""
var/sqllogging = 0 // Should we log deaths, population stats, etc?
// Forum MySQL configuration (for use with forum account/key authentication)
// These are all default values that will load should the forumdbconfig.txt
// file fail to read for whatever reason.
/* forumsqladdress = "localhost"
forumsqlport = "3306"
forumsqldb = "tgstation"
forumsqllogin = "root"
forumsqlpass = ""
forum_activated_group = "2"
forum_authenticated_group = "10"*/
// For FTP requests. (i.e. downloading runtime logs.)
// However it'd be ok to use for accessing attack logs and such too, which are even laggier.
var/fileaccess_timer = 1800 //Cannot access files by ftp until the game is finished setting up and stuff.
// It turns out that /var/const can't handle lists, because lists use
// an initializer. Sigh. That's no reason that we shouldn't make
// actual "constant" lists explicit via naming convention and a
// separate location, though, so: below are all lists that should not
// ever be changed in code.
/var/global/AI_VERB_LIST = list(
/mob/living/silicon/ai/proc/ai_call_shuttle,
/mob/living/silicon/ai/proc/show_laws_verb,
/mob/living/silicon/ai/proc/ai_camera_track,
/mob/living/silicon/ai/proc/ai_alerts,
/mob/living/silicon/ai/proc/ai_camera_list,
/mob/living/silicon/ai/proc/ai_network_change,
/mob/living/silicon/ai/proc/ai_statuschange,
/mob/living/silicon/ai/proc/ai_hologram_change,
/mob/living/silicon/ai/proc/ai_roster,
)
-139
View File
@@ -1,139 +0,0 @@
//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/storage/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
-139
View File
@@ -1,139 +0,0 @@
//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/storage/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
-228
View File
@@ -1,228 +0,0 @@
/obj/machinery/door
name = "Door"
desc = "It opens and closes."
icon = 'doorint.dmi'
icon_state = "door1"
opacity = 1
density = 1
layer = 2.7
anchored = 1
var/secondsElectrified = 0
var/visible = 1
var/p_open = 0
var/operating = 0
var/autoclose = 0
var/glass = 0
var/forcecrush = 0
var/holdopen = 0
/obj/machinery/door/firedoor
name = "Firelock"
desc = "Apply crowbar to open."
icon = 'Doorfire.dmi'
icon_state = "door0"
var/blocked = null
opacity = 0
density = 0
var/nextstate = null
/obj/machinery/door/firedoor/border_only
name = "Firelock"
desc = "Apply crowbar to open."
icon = 'door_fire2.dmi'
icon_state = "door0"
/obj/machinery/door/poddoor
name = "Podlock"
desc = "A type of powerful blast door."
icon = 'rapid_pdoor.dmi'
icon_state = "pdoor1"
var/id = 1.0
var/networkTag = ""
/obj/machinery/door/poddoor/two_tile_hor
var/obj/machinery/door/poddoor/filler_object/f1
var/obj/machinery/door/poddoor/filler_object/f2
icon = '1x2blast_hor.dmi'
New()
..()
f1 = new/obj/machinery/door/poddoor/filler_object (src.loc)
f2 = new/obj/machinery/door/poddoor/filler_object (get_step(src,EAST))
f1.density = density
f2.density = density
f1.sd_SetOpacity(opacity)
f2.sd_SetOpacity(opacity)
Del()
del f1
del f2
..()
/obj/machinery/door/poddoor/two_tile_ver
var/obj/machinery/door/poddoor/filler_object/f1
var/obj/machinery/door/poddoor/filler_object/f2
icon = '1x2blast_vert.dmi'
New()
..()
f1 = new/obj/machinery/door/poddoor/filler_object (src.loc)
f2 = new/obj/machinery/door/poddoor/filler_object (get_step(src,NORTH))
f1.density = density
f2.density = density
f1.sd_SetOpacity(opacity)
f2.sd_SetOpacity(opacity)
Del()
del f1
del f2
..()
/obj/machinery/door/poddoor/four_tile_hor
var/obj/machinery/door/poddoor/filler_object/f1
var/obj/machinery/door/poddoor/filler_object/f2
var/obj/machinery/door/poddoor/filler_object/f3
var/obj/machinery/door/poddoor/filler_object/f4
icon = '1x4blast_hor.dmi'
New()
..()
f1 = new/obj/machinery/door/poddoor/filler_object (src.loc)
f2 = new/obj/machinery/door/poddoor/filler_object (get_step(f1,EAST))
f3 = new/obj/machinery/door/poddoor/filler_object (get_step(f2,EAST))
f4 = new/obj/machinery/door/poddoor/filler_object (get_step(f3,EAST))
f1.density = density
f2.density = density
f3.density = density
f4.density = density
f1.sd_SetOpacity(opacity)
f2.sd_SetOpacity(opacity)
f4.sd_SetOpacity(opacity)
f3.sd_SetOpacity(opacity)
Del()
del f1
del f2
del f3
del f4
..()
/obj/machinery/door/poddoor/four_tile_ver
var/obj/machinery/door/poddoor/filler_object/f1
var/obj/machinery/door/poddoor/filler_object/f2
var/obj/machinery/door/poddoor/filler_object/f3
var/obj/machinery/door/poddoor/filler_object/f4
icon = '1x4blast_vert.dmi'
New()
..()
f1 = new/obj/machinery/door/poddoor/filler_object (src.loc)
f2 = new/obj/machinery/door/poddoor/filler_object (get_step(f1,NORTH))
f3 = new/obj/machinery/door/poddoor/filler_object (get_step(f2,NORTH))
f4 = new/obj/machinery/door/poddoor/filler_object (get_step(f3,NORTH))
f1.density = density
f2.density = density
f3.density = density
f4.density = density
f1.sd_SetOpacity(opacity)
f2.sd_SetOpacity(opacity)
f4.sd_SetOpacity(opacity)
f3.sd_SetOpacity(opacity)
Del()
del f1
del f2
del f3
del f4
..()
/obj/machinery/door/poddoor/filler_object
name = ""
icon_state = ""
/obj/machinery/door/window
name = "interior door"
desc = "A door made from a window, yet it can not break nor be depowered."
icon = 'windoor.dmi'
icon_state = "left"
var/base_state = "left"
visible = 0.0
flags = ON_BORDER
opacity = 0
/obj/machinery/door/window/brigdoor
name = "Brig Door"
desc = "A stronger door made from window, even though it can not break."
icon = 'windoor.dmi'
icon_state = "leftsecure"
base_state = "leftsecure"
req_access = list(ACCESS_SECURITY)
var/id = null
/obj/machinery/door/window/northleft
dir = NORTH
/obj/machinery/door/window/eastleft
dir = EAST
/obj/machinery/door/window/westleft
dir = WEST
/obj/machinery/door/window/southleft
dir = SOUTH
/obj/machinery/door/window/northright
dir = NORTH
icon_state = "right"
base_state = "right"
/obj/machinery/door/window/eastright
dir = EAST
icon_state = "right"
base_state = "right"
/obj/machinery/door/window/westright
dir = WEST
icon_state = "right"
base_state = "right"
/obj/machinery/door/window/southright
dir = SOUTH
icon_state = "right"
base_state = "right"
/obj/machinery/door/window/brigdoor/northleft
dir = NORTH
/obj/machinery/door/window/brigdoor/eastleft
dir = EAST
/obj/machinery/door/window/brigdoor/westleft
dir = WEST
/obj/machinery/door/window/brigdoor/southleft
dir = SOUTH
/obj/machinery/door/window/brigdoor/northright
dir = NORTH
icon_state = "rightsecure"
base_state = "rightsecure"
/obj/machinery/door/window/brigdoor/eastright
dir = EAST
icon_state = "rightsecure"
base_state = "rightsecure"
/obj/machinery/door/window/brigdoor/westright
dir = WEST
icon_state = "rightsecure"
base_state = "rightsecure"
/obj/machinery/door/window/brigdoor/southright
dir = SOUTH
icon_state = "rightsecure"
base_state = "rightsecure"
-586
View File
@@ -1,586 +0,0 @@
/obj/item/weapon/storage/backpack
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
max_w_class = 3
max_combined_w_class = 21
/obj/item/weapon/storage/backpack/cultpack
name = "trophy rack"
desc = "It's useful for both carrying extra gear and proudly declaring your insanity."
icon_state = "cultpack"
/*
/obj/item/weapon/storage/lbe
name = "Load Bearing Equipment"
desc = "You wear these on your thighs, they help carry heavy loads."
icon_state = "backpack" //PLACEHOLDER
w_class = 2.0
max_combined_w_class = 17
*/
/obj/item/weapon/storage/pill_bottle
name = "pill bottle"
desc = "It's an airtight container for storing medication."
icon_state = "pill_canister"
icon = 'icons/obj/chemical.dmi'
item_state = "contsolid"
w_class = 2.0
can_hold = list("/obj/item/weapon/reagent_containers/pill")
var/mode = 1 // pickup mode
/obj/item/weapon/storage/dice
name = "pack of dice"
desc = "It's a small container with dice inside."
icon_state = "pill_canister"
icon = 'icons/obj/chemical.dmi'
item_state = "contsolid"
w_class = 2.0
can_hold = list("/obj/item/weapon/dice")
/obj/item/weapon/storage/box
name = "box"
desc = "It's just an ordinary box."
icon_state = "box"
item_state = "syringe_kit"
/obj/item/weapon/storage/box/engineer
/obj/item/weapon/storage/box/syndicate
/obj/item/weapon/storage/cupbox
name = "box of paper cups"
desc = "It has pictures of paper cups on the front."
icon_state = "box"
item_state = "syringe_kit"
foldable = /obj/item/stack/sheet/cardboard //BubbleWrap
New()
..()
new /obj/item/weapon/reagent_containers/food/drinks/sillycup( src )
new /obj/item/weapon/reagent_containers/food/drinks/sillycup( src )
new /obj/item/weapon/reagent_containers/food/drinks/sillycup( src )
new /obj/item/weapon/reagent_containers/food/drinks/sillycup( src )
new /obj/item/weapon/reagent_containers/food/drinks/sillycup( src )
new /obj/item/weapon/reagent_containers/food/drinks/sillycup( src )
new /obj/item/weapon/reagent_containers/food/drinks/sillycup( src )
/obj/item/weapon/storage/pillbottlebox
name = "box of pill bottles"
desc = "It has pictures of pill bottles on its front."
icon_state = "pillbox"
item_state = "syringe_kit"
foldable = /obj/item/stack/sheet/cardboard //BubbleWrap
/obj/item/weapon/storage/blankbox
name = "box of blank shells"
desc = "It has a picture of a gun and several warning symbols on the front."
icon_state = "box"
item_state = "syringe_kit"
foldable = /obj/item/stack/sheet/cardboard //BubbleWrap
/obj/item/weapon/storage/backpack/clown
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"
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 = "leather satchel"
desc = "It's a very fancy satchel made with fine leather."
icon_state = "satchel"
/obj/item/weapon/storage/backpack/satchel/withwallet
New()
..()
new /obj/item/weapon/storage/wallet/random( src )
// Belt Bags/Satchels
/obj/item/weapon/storage/backpack/satchel_norm
name = "satchel"
desc = "A trendy looking satchel."
icon_state = "satchel-norm"
/obj/item/weapon/storage/backpack/satchel_eng
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"
desc = "A sterile satchel with virologist colours."
icon_state = "satchel-vir"
/obj/item/weapon/storage/backpack/satchel_chem
name = "chemist satchel"
desc = "A sterile satchel with chemist colours."
icon_state = "satchel-chem"
/obj/item/weapon/storage/backpack/satchel_gen
name = "geneticist satchel"
desc = "A sterile satchel with geneticist colours."
icon_state = "satchel-gen"
/obj/item/weapon/storage/backpack/satchel_tox
name = "scientist satchel"
desc = "Useful for holding research materials."
icon_state = "satchel-tox"
/obj/item/weapon/storage/backpack/satchel_sec
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/industrial
name = "industrial backpack"
desc = "It's a tough backpack for the daily grind of station life."
icon_state = "engiepack"
item_state = "engiepack"
/obj/item/weapon/storage/briefcase
name = "briefcase"
desc = "It's made of AUTHENTIC faux-leather and has a price-tag still attached. Its owner must be a real professional."
icon_state = "briefcase"
flags = FPRINT | TABLEPASS| CONDUCT
force = 8.0
throw_speed = 1
throw_range = 4
w_class = 4.0
max_w_class = 3
max_combined_w_class = 16
/obj/item/weapon/storage/wallet
name = "wallet"
desc = "It can hold a few small and personal things."
storage_slots = 4
icon_state = "wallet"
w_class = 2
can_hold = list(
"/obj/item/weapon/spacecash",
"/obj/item/weapon/card",
"/obj/item/clothing/mask/cigarette",
"/obj/item/device/flashlight/pen",
"/obj/item/seeds",
"/obj/item/stack/medical",
"/obj/item/toy/crayon",
"/obj/item/weapon/coin",
"/obj/item/weapon/dice",
"/obj/item/weapon/disk",
"/obj/item/weapon/implanter",
"/obj/item/weapon/lighter",
"/obj/item/weapon/match",
"/obj/item/weapon/paper",
"/obj/item/weapon/pen",
"/obj/item/weapon/photo",
"/obj/item/weapon/reagent_containers/dropper",
"/obj/item/weapon/screwdriver",
"/obj/item/weapon/stamp")
attackby(obj/item/A as obj, mob/user as mob)
..()
update_icon()
return
update_icon()
for(var/obj/item/weapon/card/id/ID in contents)
switch(ID.icon_state)
if("id")
icon_state = "walletid"
return
if("silver")
icon_state = "walletid_silver"
return
if("gold")
icon_state = "walletid_gold"
return
if("centcom")
icon_state = "walletid_centcom"
return
icon_state = "wallet"
proc/get_id()
for(var/obj/item/weapon/card/id/ID in contents)
if(istype(ID))
return ID
/obj/item/weapon/storage/wallet/random/New()
..()
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/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)
if(item1_type)
new item1_type(src)
if(item2_type)
new item2_type(src)
if(item3_type)
new item3_type(src)
/obj/item/weapon/storage/disk_kit
name = "box of data disks"
desc = "It has a picture of a data disk on it."
icon_state = "id"
item_state = "syringe_kit"
foldable = /obj/item/stack/sheet/cardboard //BubbleWrap
/obj/item/weapon/storage/disk_kit/disks
/obj/item/weapon/storage/disk_kit/disks2
/obj/item/weapon/storage/fcard_kit
name = "box of fingerprint cards"
desc = "It has a picture of a fingerprint on each of its faces."
icon_state = "id"
item_state = "syringe_kit"
/obj/item/weapon/storage/firstaid
name = "first-aid kit"
desc = "It's an emergency medical kit for those serious boo-boos."
icon_state = "firstaid"
throw_speed = 2
throw_range = 8
var/empty = 0
/obj/item/weapon/storage/firstaid/fire
name = "fire first-aid kit"
desc = "It's an emergency medical kit for when the toxins lab <i>-spontaneously-</i> burns down."
icon_state = "ointment"
item_state = "firstaid-ointment"
/obj/item/weapon/storage/firstaid/regular
icon_state = "firstaid"
/obj/item/weapon/storage/syringes
name = "syringes"
desc = "A box full of syringes."
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 = "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 = "A box full of oxygen goodies."
icon_state = "o2"
item_state = "firstaid-o2"
/obj/item/weapon/storage/flashbang_kit
name = "flashbangs (WARNING)"
desc = "<B>WARNING: These devices are extremely dangerous and can cause blindness or deafness in repeated use.</B>"
icon_state = "flashbang"
item_state = "syringe_kit"
foldable = /obj/item/stack/sheet/cardboard //BubbleWrap
/obj/item/weapon/storage/emp_kit
name = "emp grenades"
desc = "A box with 5 emp grenades."
icon_state = "flashbang"
item_state = "syringe_kit"
foldable = /obj/item/stack/sheet/cardboard //BubbleWrap
/obj/item/weapon/storage/gl_kit
name = "Prescription Glasses"
desc = "This box contains nerd glasses."
icon_state = "glasses"
item_state = "syringe_kit"
foldable = /obj/item/stack/sheet/cardboard //BubbleWrap
/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 = 'icons/obj/pda.dmi'
icon_state = "pdabox"
item_state = "syringe_kit"
foldable = /obj/item/stack/sheet/cardboard //BubbleWrap
/obj/item/weapon/storage/handcuff_kit
name = "Spare Handcuffs"
desc = "A box full of handcuffs."
icon_state = "handcuff"
item_state = "syringe_kit"
foldable = /obj/item/stack/sheet/cardboard //BubbleWrap
/obj/item/weapon/storage/id_kit
name = "Spare IDs"
desc = "Has so many empty IDs."
icon_state = "id"
item_state = "syringe_kit"
foldable = /obj/item/stack/sheet/cardboard //BubbleWrap
/obj/item/weapon/storage/lglo_kit
name = "Latex Gloves"
desc = "Contains white gloves."
icon_state = "latex"
item_state = "syringe_kit"
foldable = /obj/item/stack/sheet/cardboard //BubbleWrap
/obj/item/weapon/storage/injectbox
name = "DNA-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 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 scum-bag tracking utensils."
icon_state = "implant"
item_state = "syringe_kit"
foldable = /obj/item/stack/sheet/cardboard //BubbleWrap
/obj/item/weapon/storage/chemimp_kit
name = "Chemical Implant Kit"
desc = "Box of stuff used to implant chemicals."
icon_state = "implant"
item_state = "syringe_kit"
foldable = /obj/item/stack/sheet/cardboard //BubbleWrap
/obj/item/weapon/storage/toolbox
name = "toolbox"
desc = "Danger. Very robust."
icon = 'icons/obj/storage.dmi'
icon_state = "red"
item_state = "toolbox_red"
flags = FPRINT | TABLEPASS| CONDUCT
force = 5.0
throwforce = 10.0
throw_speed = 1
throw_range = 7
w_class = 4.0
origin_tech = "combat=1"
attack_verb = list("robusted")
/obj/item/weapon/storage/toolbox/emergency
name = "emergency toolbox"
icon_state = "red"
item_state = "toolbox_red"
/obj/item/weapon/storage/toolbox/mechanical
name = "mechanical toolbox"
icon_state = "blue"
item_state = "toolbox_blue"
/obj/item/weapon/storage/toolbox/electrical
name = "electrical toolbox"
icon_state = "yellow"
item_state = "toolbox_yellow"
/obj/item/weapon/storage/toolbox/syndicate
name = "suspicious looking toolbox"
icon_state = "syndicate"
item_state = "toolbox_syndi"
origin_tech = "combat=1;syndicate=1"
force = 7.0
/obj/item/weapon/storage/bible
name = "bible"
desc = "A holy book." //BS12 EDIT
icon_state ="bible"
throw_speed = 1
throw_range = 5
w_class = 3.0
flags = FPRINT | TABLEPASS
var/mob/affecting = null
var/deity_name = "Christ"
/obj/item/weapon/storage/bible/booze
name = "bible"
desc = "A holy book. Smells faintly of alcohol" //BS12 EDIT
/obj/item/weapon/storage/mousetraps
name = "box of Pest-B-Gon Mousetraps"
desc = "<B><FONT=red>WARNING:</FONT></B> <I>Keep out of reach of children</I>."
icon_state = "mousetraps"
item_state = "syringe_kit"
foldable = /obj/item/stack/sheet/cardboard //BubbleWrap
/obj/item/weapon/storage/donkpocket_kit
name = "box of donk-pockets"
desc = "<B>Instructions:</B> <I>Heat in microwave. Product will cool if not eaten within seven minutes.</I>"
icon_state = "donk_kit"
item_state = "syringe_kit"
foldable = /obj/item/stack/sheet/cardboard //BubbleWrap
/obj/item/weapon/storage/condimentbottles
name = "box of condiment bottles"
desc = "It has a large ketchup smear on it."
icon_state = "box"
item_state = "syringe_kit"
foldable = /obj/item/stack/sheet/cardboard //BubbleWrap
/obj/item/weapon/storage/drinkingglasses
name = "box of drinking glasses"
desc = "It has a picture of drinking glasses on it."
icon_state = "box"
item_state = "syringe_kit"
/obj/structure/closet/syndicate/resources/
desc = "An old, dusty locker."
/obj/structure/closet/syndicate/resources/New()
..()
var/common_min = 30 //Minimum amount of minerals in the stack for common minerals
var/common_max = 50 //Maximum amount of HONK in the stack for HONK common minerals
var/rare_min = 5 //Minimum HONK of HONK in the stack HONK HONK rare minerals
var/rare_max = 20 //Maximum HONK HONK HONK in the HONK for HONK rare HONK
sleep(2)
var/pickednum = rand(1, 50)
//Sad trombone
if(pickednum == 1)
var/obj/item/weapon/paper/P = new /obj/item/weapon/paper(src)
P.name = "IOU"
P.info = "Sorry man, we needed the money so we sold your stash. It's ok, we'll double our money for sure this time!"
//Metal (common ore)
if(pickednum >= 2)
new /obj/item/stack/sheet/metal(src, rand(common_min, common_max))
//Glass (common ore)
if(pickednum >= 5)
new /obj/item/stack/sheet/glass(src, rand(common_min, common_max))
//Plasteel (common ore) Because it has a million more uses then plasma
if(pickednum >= 10)
new /obj/item/stack/sheet/plasteel(src, rand(common_min, common_max))
//Plasma (rare ore)
if(pickednum >= 15)
new /obj/item/stack/sheet/mineral/plasma(src, rand(rare_min, rare_max))
//Silver (rare ore)
if(pickednum >= 20)
new /obj/item/stack/sheet/mineral/silver(src, rand(rare_min, rare_max))
//Gold (rare ore)
if(pickednum >= 30)
new /obj/item/stack/sheet/mineral/gold(src, rand(rare_min, rare_max))
//Uranium (rare ore)
if(pickednum >= 40)
new /obj/item/stack/sheet/mineral/uranium(src, rand(rare_min, rare_max))
//Diamond (rare HONK)
if(pickednum >= 45)
new /obj/item/stack/sheet/mineral/diamond(src, rand(rare_min, rare_max))
//Jetpack (You hit the jackpot!)
if(pickednum == 50)
new /obj/item/weapon/tank/jetpack/carbondioxide(src)
return
/obj/structure/closet/syndicate/resources/everything
desc = "It's an emergency storage closet for repairs."
/obj/structure/closet/syndicate/resources/everything/New()
var/list/resources = list(
/obj/item/stack/sheet/metal,
/obj/item/stack/sheet/glass,
/obj/item/stack/sheet/mineral/gold,
/obj/item/stack/sheet/mineral/silver,
/obj/item/stack/sheet/mineral/plasma,
/obj/item/stack/sheet/mineral/uranium,
/obj/item/stack/sheet/mineral/diamond,
/obj/item/stack/sheet/mineral/clown,
/obj/item/stack/sheet/plasteel,
/obj/item/stack/rods
)
sleep(2)
for(var/i = 0, i<2, i++)
for(var/res in resources)
var/obj/item/stack/R = new res(src)
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"
)
-334
View File
@@ -1,334 +0,0 @@
/obj/machinery/vending
name = "Vendomat"
desc = "A generic vending machine."
icon = 'icons/obj/vending.dmi'
icon_state = "generic"
layer = 2.9
anchored = 1
density = 1
var/active = 1 //No sales pitches if off!
var/vend_ready = 1 //Are we ready to vend?? Is it time??
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/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/product_coin = ""
var/product_coin_amt = ""
var/list/product_records = list()
var/list/hidden_records = list()
var/list/coin_records = list()
var/list/slogan_list = list()
var/list/small_ads = list() // small ad messages in the vending screen - random chance of popping up whenever you open it
var/vend_reply //Thank you for shopping!
var/last_reply = 0
var/last_slogan = 0 //When did we last pitch?
var/slogan_delay = 6000 //How long until we can pitch again?
var/icon_vend //Icon_state when vending!
var/icon_deny //Icon_state when vending!
//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/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
/*
/obj/machinery/vending/[vendors name here] // --vending machine template :)
name = ""
desc = ""
icon = ''
icon_state = ""
product_paths = ""
product_amounts = ""
vend_delay = 15
product_hidden = ""
product_hideamt = ""
product_slogans = ""
product_ads = ""
*/
/*
/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 = '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"
vend_delay = 0
*/
/obj/machinery/vending/boozeomat
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"
vend_delay = 15
product_hidden = "/obj/item/weapon/reagent_containers/food/drinks/tea"
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!"
req_access_txt = "25"
/obj/machinery/vending/assist
product_amounts = "5;3;4;1;4"
product_hidden = "/obj/item/device/flashlight;obj/item/device/assembly/timer"
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!"
/obj/machinery/vending/coffee
name = "Hot Drinks machine"
desc = "A vending machine which dispenses hot drinks."
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_amounts = "25;25;25"
vend_delay = 34
product_hidden = "/obj/item/weapon/reagent_containers/food/drinks/ice"
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"
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_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 = "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!"
/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"
product_amounts = "10;10;10;10;10"
product_slogans = "Robust Softdrinks: More robust than a toolbox to the head!"
product_hidden = "/obj/item/weapon/reagent_containers/food/drinks/thirteenloko"
product_hideamt = "5"
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."
//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_slogans = "Carts to go!"
product_hidden = ""
product_hideamt = ""
product_coin = ""
product_coin_amt = ""
/obj/machinery/vending/cigarette
name = "Cigarette machine" //OCD had to be uppercase to look nice with the new formating
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/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"
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."
/obj/machinery/vending/medical
name = "NanoMed Plus"
desc = "Medical drug dispenser."
icon_state = "med"
icon_deny = "med-deny"
req_access_txt = "5"
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"
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"
desc = "Wall-mounted Medical Equipment dispenser."
icon_state = "wallmed"
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_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"
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?"
/obj/machinery/vending/wallmed2
name = "NanoMed"
desc = "Wall-mounted Medical Equipment dispenser."
icon_state = "wallmed"
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_hidden = "/obj/item/weapon/reagent_containers/pill/tox"
product_hideamt = "3"
density = 0 //It is wall-mounted, and thus, not dense. --Superxpdude
/obj/machinery/vending/security
name = "SecTech"
desc = "A security equipment vendor"
icon_state = "sec"
icon_deny = "sec-deny"
req_access_txt = "1"
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?"
/obj/machinery/vending/hydronutrients
name = "NutriMax"
desc = "A plant nutrients vendor"
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;/obj/item/weapon/seedbag"
product_amounts = "35;25;15;20;5;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"
product_ads = "We like plants!;Don't you want some?;The greenest thumbs ever.;We like big plants.;Soft soil..."
/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/cocoapodseed;/obj/item/seeds/cabbageseed;/obj/item/seeds/grapeseed;/obj/item/seeds/pumpkinseed;/obj/item/seeds/cherryseed"
product_amounts = "3;3;3;3;3;3;3;3;3;3;3;3;3;3;3;3;3;3;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"
product_ads = "We like plants!;Grow some crops!;Grow, baby, growww!;Aw h'yeah son!"
/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_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
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
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/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"
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..."
/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_amounts = "8;5;4" Old totals
product_hidden = "/obj/item/weapon/reagent_containers/food/drinks/drinkingglass/cola"
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."
/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_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"
/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/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"
//This one's from bay12
/obj/machinery/vending/engineering
name = "Robco Tool Maker"
desc = "Everything you need for do-it-yourself station repair."
icon_state = "engi"
icon_deny = "engi-deny"
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_hidden = ""
product_hideamt = ""
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."
icon_state = "robotics"
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_hidden = ""
product_hideamt = ""
product_coin = ""
product_coin_amt = ""
-32
View File
@@ -1,32 +0,0 @@
/* Atom procs
These procs expand on the basic built in procs.
Bumped(O)
Automatically called whenever a movable atom O Bump()s into src.
Proc protype designed to be overridden for specific objects.
Trigger(O)
Automatically called whenever a movable atom O steps into the same
turf with src.
Proc protype designed to be overridden for specific objects.
*/
atom
proc
Bumped(O)
// O just Bump()ed into src.
// prototype Bumped() proc for all atoms
Trigger(O)
atom/movable
Bump(atom/A)
if(istype(A)) A.Bumped(src) // tell A that src bumped into it
..()
turf
Entered(atom/O)
for(var/atom/A in contents - O)
if(O)
O.Trigger(A)
..()
-131
View File
@@ -1,131 +0,0 @@
//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:04
/* base 64 procs
These procs convert plain text to a hexidecimal string to 64 encoded text and vice versa.
sd_base64toHex(encode64, pad_code = 67)
Accepts a base 64 encoded text and returns the hexidecimal equivalent.
ARGS:
encode64 = the base64 text to convert
pad_code = the character or ASCII code used to pad the base64 text.
DEFAULT: 67 (= sign)
RETURNS: the hexidecimal text
sd_hex2base64(hextext, pad_char = "=")
Accepts a hexidecimal string and returns the base 64 encoded text equivalent.
ARGS:
hextext = hex text to convert
pad_char = the character or ASCII code used to pad the base64 text.
DEFAULT: "=" (ASCII 67)
RETURNS: the base64 text
sd_hex2text(hex)
Accepts a hexidecimal string and returns the plain text equivalent.
sd_text2hex(txt)
Accepts a plain text string and returns the hexidecimal equivalent.
*/
/*********************************************
* Implimentation: No need to read further. *
*********************************************/
proc
sd_base64toHex(encode64, pad_code = 67)
/* convert the base 64 text encode64 to hexidecimal text
pad_code = the character or ASCII code used to pad the base64 text.
DEFAULT: 67 (= sign)
RETURNS: the hexidecimal text */
var/pos = 1
var/offset = 2
var/current = 0
var/padding = 0
var/hextext = ""
if(istext(pad_code)) pad_code = text2ascii(pad_code)
while(pos <= length(encode64))
var/val = text2ascii(encode64, pos++)
if((val >= 65) && (val <= 90)) // A to Z
val -= 65
else if((val >= 97) && (val <= 122)) // a to z
val -= 71
else if((val >= 48) && (val <= 57)) // 0 to 9
val += 4
else if(val == 43) // + sign
val = 62
else if(val == 47) // / symbol
val = 63
else if(pad_code) // padding
// the = sign indicates that some 0 bits were appended to pad the original string to
val = -1
padding ++
else // anything else (presumably whitespace)
val = -1
if(val < 0) continue // whitespace and padding ignored
if(offset>2)
var/lft = val >> (8 - offset)
current |= lft
hextext += sd_dec2base(current,,2)
current = (val << offset) & 0xFF
offset += 2
if(offset > 8)
offset = 2
if(padding)
hextext = copytext(hextext, 1, length(hextext) + 1 - padding * 2)
return hextext
sd_hex2base64(hextext, pad_char = "=")
/* convert the hexidecimal string hextext to base 64 encoded text
pad_char = the character or ASCII code used to pad the base64 text.
DEFAULT: "=" (ASCII 67)
RETURNS: the base 64 encoded text */
var/key64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"
var/encode64 = ""
var/pos = 1
var/offset = 2
var/current = 0
var/len = length(hextext)
var/end = len
var/padding = end%6
if(padding)
padding = 6 - padding
end += padding
padding >>= 1
if(isnum(pad_char)) pad_char = ascii2text(pad_char)
while(pos <= end)
var/val = 0 // pad with 0s
if(pos < len) val = sd_base2dec(copytext(hextext, pos, pos+2))
pos+=2
var/lft = val >> offset
current |= lft
encode64 += copytext(key64,current+1,current+2)
current = (val << (6-offset)) & 0x3F
offset += 2
if(offset>6)
encode64 += copytext(key64,current+1,current+2)
offset = 2
current = 0
for(var/x = 1 to padding)
encode64 += pad_char
return encode64
sd_hex2text(hex)
/* convert hexidecimal text to a plain text string
RETURNS: the plain text */
var/txt = ""
for(var/loop = 1 to length(hex) step 2)
txt += ascii2text(sd_base2dec(copytext(hex,loop, loop+2)))
return txt
sd_text2hex(txt)
/* convert plain text to a hexidecimal string
RETURNS: the hexidecimal text */
var/hex = ""
for(var/loop = 1 to length(txt))
hex += sd_dec2base(text2ascii(txt,loop),,2)
return hex
-75
View File
@@ -1,75 +0,0 @@
//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:04
/* sd_color and procs
sd_color is a special datum that contains color data in various
formats. Sample colors are available in samplecolors.dm.
sd_color
var/name // the name of the color
var/red // red componant of the color
var/green // green componant of the color
var/blue // red componant of the color
var/html // html string for the color
var/icon/Icon // contains the icon produced by the rgb2icon() proc
PROCS
brightness()
Returns the grayscale brightness of the RGB color set.
html2rgb()
Calculates the rgb colors from the html colors.
rgb2html()
Calculates the html color from the rbg colors.
rgb2icon()
Converts the rgb value to a solid icon stored as src.Icon
*/
/*********************************************
* Implimentation: No need to read further. *
*********************************************/
sd_color
var/name // the name of the color
var/red = 0 // red componant of the color
var/green = 0 // green componant of the color
var/blue = 0 // red componant of the color
var/html // html string for the color
var/icon/Icon // contains the icon produced by the rgb2icon() proc
proc
brightness()
/* returns the grayscale brightness of the RGB colors. */
return round((red*30 + green*59 + blue*11)/100,1)
html2rgb()
/* Calculates the rgb colors from the html colors */
red = sd_base2dec(copytext(html,1,3))
green = sd_base2dec(copytext(html,3,5))
blue = sd_base2dec(copytext(html,5,7))
rgb2html()
/* Calculates the html color from the rbg colors */
html = sd_dec2base(red,,2) + sd_dec2base(green,,2) + sd_dec2base(blue,,2)
return html
rgb2icon()
/* Converts the rgb value to a solid icon stored as src.Icon */
Icon = 'Black.dmi' + rgb(red,green,blue)
return Icon
New()
..()
// if this is an unnamed subtype, name it according to it's type
if(!name)
name = "[type]"
var/slash = sd_findlast(name,"/")
if(slash)
name = copytext(name,slash+1)
name = sd_replacetext(name,"_"," ")
if(html) // if there is an html string
html2rgb() // convert the html to red, green, & blue values
else
rgb2html() // convert the red, green, & blue values to html
-1
View File
@@ -1 +0,0 @@
#define PI 3.141592654
-154
View File
@@ -1,154 +0,0 @@
/* Direction procs
These procs deal with BYOND directions.
sd_get_approx_dir(atom/ref,atom/target)
returns the approximate direction from ref to target.
sd_degrees2dir(degrees as num)
Accepts an angle in degrees and returns the closest BYOND
direction value.
sd_dir2degrees(dir as num)
Accepts a BYOND direction value and returns the angle North of
East in degrees.
sd_dir2radial(dir as num)
Accepts a BYOND direction value and returns the radial direction
(0-7) North of East.
sd_dir2radians(dir as num)
Accepts a BYOND direction value and returns the angle North of
East in radians.
sd_dir2text(dir as num)
Accepts a BYOND direction value and returns the lowercase text
name of the direction.
sd_dir2Text(dir as num)
Accepts a BYOND direction value and returns the Capitalized text
name of the direction
sd_radial2dir(radial as num)
Accepts a radial direction (0-7) and returns the BYOND direction
value.
*/
/*********************************************
* Implimentation: No need to read further. *
*********************************************/
proc
sd_get_approx_dir(atom/ref,atom/target)
/* returns the approximate direction from ref to target.
Code by Lummox JR
http://www.byond.com/forum/forum.cgi?action=message_list&query=Post+ID%3A153964#153964
*/
var/d=get_dir(ref,target)
if(d&d-1) // diagonal
var/ax=abs(ref.x-target.x)
var/ay=abs(ref.y-target.y)
if(ax>=ay<<1) return d&12 // keep east/west (4 and 8)
else if(ay>=ax<<1) return d&3 // keep north/south (1 and 2)
return d
sd_degrees2dir(degrees as num)
/* accepts an angle in degrees and returns the closest BYOND
direction value */
var/error_report = degrees // for error tracking
// force angle into a range between 0 and 360
degrees %= 360
if(degrees < 0)
degrees += 360
// BYOND dirs are at 45 degree angles
degrees = round(degrees,45)
switch(degrees)
if(0,360) return EAST
if(45) return NORTHEAST
if(90) return NORTH
if(135) return NORTHWEST
if(180) return WEST
if(225) return SOUTHWEST
if(270) return SOUTH
if(315) return SOUTHEAST
else
world.log << "Error in sd_degrees2dir(): [error_report] -> [degrees]"
sd_dir2degrees(dir as num)
/* accepts a BYOND direction value and returns the angle North of
East in degrees */
switch(dir)
if(EAST) return 0
if(NORTHEAST) return 45
if(NORTH) return 90
if(NORTHWEST) return 135
if(WEST) return 180
if(SOUTHWEST) return 225
if(SOUTH) return 270
if(SOUTHEAST) return 315
sd_dir2radial(dir as num)
/* accepts a BYOND direction value and returns the radial direction
(0-7) North of East */
switch(dir)
if(EAST) return 0
if(NORTHEAST) return 1
if(NORTH) return 2
if(NORTHWEST) return 3
if(WEST) return 4
if(SOUTHWEST) return 5
if(SOUTH) return 6
if(SOUTHEAST) return 7
sd_dir2radians(dir as num)
/* accepts a BYOND direction value and returns the angle North of
East in radians */
switch(dir)
if(EAST) return 0
if(NORTHEAST) return PI/4
if(NORTH) return PI/2
if(NORTHWEST) return PI*3/4
if(WEST) return PI
if(SOUTHWEST) return PI*5/4
if(SOUTH) return PI*3/2
if(SOUTHEAST) return PI*7/4
sd_dir2text(dir as num)
/* accepts a direction and returns the lowercase text name of
the direction */
switch(dir)
if(NORTH) return "north"
if(SOUTH) return "south"
if(EAST) return "east"
if(WEST) return "west"
if(NORTHEAST) return "northeast"
if(SOUTHEAST) return "southeast"
if(NORTHWEST) return "northwest"
if(SOUTHWEST) return "southwest"
sd_dir2Text(dir as num)
/* accepts a direction and returns the Capitalized text name of
the direction */
switch(dir)
if(NORTH) return "North"
if(SOUTH) return "South"
if(EAST) return "East"
if(WEST) return "West"
if(NORTHEAST) return "Northeast"
if(SOUTHEAST) return "Southeast"
if(NORTHWEST) return "Northwest"
if(SOUTHWEST) return "Southwest"
sd_radial2dir(radial as num)
/* accepts a radial direction (0-7) and returns the BYOND direction
value */
switch(radial)
if(0) return EAST
if(1) return NORTHEAST
if(2) return NORTH
if(3) return NORTHWEST
if(4) return WEST
if(5) return SOUTHWEST
if(6) return SOUTH
if(7) return SOUTHEAST
-185
View File
@@ -1,185 +0,0 @@
//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:04
/* HSL procs
These procs convert between RGB (red, green, blu) and HSL (hue, saturation, light)
color spaces. The algorithms used for these procs were found at
http://www.paris-pc-gis.com/MI_Enviro/Colors/color_models.htm
hsl2rgb(hue, sat, lgh, scale = 240)
Returns the RRGGBB format of an HSL color.
ALTERNATE FORMAT:
hsl2rgb(HSL, scale)
ARGS:
hue - hue
sat - saturation
lgh - light/dark
HSL - a hex string in format HHSSLL where:
HH = Hue from
SS = Saturation
LL = light
scale - high end of the HSL values. Some programs (like BYOND Dream Maker)
use 240, others use 255. The H {0-360}, S {0-100}, L {0-100}
scale is not supported.
DEFAULT: 240
RETURNS:
RGB color string in RRGGBB format.
rgb2hsl(red, grn, blu, scale = 240)
Returns the HSL color string of an RGB color
ALTERNATE FORMAT:
rgb2hsl(RGB, scale)
ARGS:
red - red componant {0-255}
grn - green componant {0-255}
blu - blue componant {0-255}
RGB - a hex string in format RRGGBB
scale - high end of the HSL values. Some programs (like BYOND Dream Maker)
use 240, others use 255. The H {0-360}, S {0-100}, L {0-100}
scale is not supported.
DEFAULT: 240
RETURNS:
HHSSLL color string
*/
/*********************************************
* Implimentation: No need to read further. *
*********************************************/
proc
hsl2rgb(hue, sat, lgh, scale = 240)
/* Returns the RRGGBB format of an HSL color string
algorithm from http://www.paris-pc-gis.com/MI_Enviro/Colors/color_models.htm
ALTERNATE FORMAT:
hsl2rgb(HSL, scale)
ARGS:
hue - hue
sat - saturation
lgh - light/dark
HSL - a hex string in format HHSSLL where:
HH = Hue from
SS = Saturation
LL = light
scale - high end of the HSL values. Some programs (like BYOND Dream Maker)
use 240, others use 255. The H {0-360}, S {0-100}, L {0-100}
scale is not supported.
DEFAULT: 240
RETURNS:
RGB color string in RRGGBB format. */
if(istext(hue)) // used alternate hsl2rgb("HHSSLL", scale)
if(length(hue)!=6)
CRASH("hsl2rbg('[hue]'): text argument must be a 6 character hex code.")
return
if(isnum(sat)) scale = sat
lgh = sd_base2dec(copytext(hue,5))
sat = sd_base2dec(copytext(hue,3,5))
hue = sd_base2dec(copytext(hue,1,3))
// scale decimal {0-1}
hue /= scale
sat /= scale
lgh /= scale
var/red
var/grn
var/blu
if(!sat) // greyscale
red = lgh
grn = lgh
blu = lgh
else
var/temp1
var/temp2
var/temp3
if(lgh < 0.5) temp2 = lgh * (1 + sat)
else temp2 = lgh + sat - lgh * sat
temp1 = 2 * lgh - temp2
// red
temp3 = hue + 1/3
if(temp3 > 1) temp3--
if(6*temp3<1) red = temp1 + (temp2 - temp1) * 6 * temp3
else if(2*temp3<1) red = temp2
else if(3*temp3<2) red = temp1 + (temp2 - temp1) * ((2/3) - temp3) * 6
else red = temp1
// green
temp3 = hue
if(6*temp3<1) grn = temp1 + (temp2 - temp1) * 6 * temp3
else if(2*temp3<1) grn = temp2
else if(3*temp3<2) grn = temp1 + (temp2 - temp1) * ((2/3) - temp3) * 6
else grn = temp1
// blue
temp3 = hue - 1/3
if(temp3 < 0) temp3++
if(6*temp3<1) blu = temp1 + (temp2 - temp1) * 6 * temp3
else if(2*temp3<1) blu = temp2
else if(3*temp3<2) blu = temp1 + (temp2 - temp1) * ((2/3) - temp3) * 6
else blu = temp1
// shift from {0-1} scale to integers {0-255}
red = round(red*255, 1)
grn = round(grn*255, 1)
blu = round(blu*255, 1)
// return 6 digit hex string
return sd_dec2base(red,16, 2) + sd_dec2base(grn,16, 2) + sd_dec2base(blu,16, 2)
rgb2hsl(red, grn, blu, scale = 240)
/* Returns the HSL color string of a RGB color
algorithm from http://www.paris-pc-gis.com/MI_Enviro/Colors/color_models.htm
ALTERNATE FORMAT:
rgb2hsl(RGB, scale)
ARGS:
red - red componant {0-255}
grn - green componant {0-255}
blu - blue componant {0-255}
RGB - a hex string in format RRGGBB
scale - high end of the HSL values. Some programs (like BYOND Dream Maker)
use 240, others use 255. The H {0-360}, S {0-100}, L {0-100}
scale is not supported.
DEFAULT: 240
RETURNS:
HHSSLL color string */
if(istext(red)) // used alternate rgb2hsl("RRGGBB", scale) format
if(length(red)!=6)
CRASH("rbg2hsl('[red]'): text argument must be a 6 character hex code.")
return
if(isnum(grn)) scale = grn
blu = sd_base2dec(copytext(red,5))
grn = sd_base2dec(copytext(red,3,5))
red = sd_base2dec(copytext(red,1,3))
// scale decimal {0-1}
red /= 255
grn /= 255
blu /= 255
var/lo = min(red, grn, blu)
var/hi = max(red, grn, blu)
var/hue = 0
var/sat = 0
var/lgh = (lo + hi)/2
if(lo != hi) // if equal, hue and sat may both stay 0
if(lgh < 0.5) sat = (hi - lo) / (hi + lo)
else sat = (hi - lo) / (2 - hi - lo)
// produce hue as value from 0-6
if(red == hi) hue = (grn - blu) / (hi - lo)
else if(grn == hi) hue = 2 + (blu - red) / (hi - lo)
else hue = 4 + (red - grn) / (hi - lo)
if(hue<0) hue += 6
// convert decimal {0-1} to integer {0-scale}
lgh = round(lgh * scale, 1)
sat = round(sat * scale, 1)
// convert hue as decimal 0-6 to integer {0-scale}
hue = round((hue / 6) * scale, 1)
// return 6 digit hex string
return sd_dec2base(hue,16, 2) + sd_dec2base(sat,16, 2) + sd_dec2base(lgh,16, 2)
-117
View File
@@ -1,117 +0,0 @@
/* Math procs
These procs contain basic math routines.
sd_base2dec(number as text, base = 16 as num)
Accepts a number in any base (2 to 36) and returns the equivelent
value in decimal.
ARGS:
number - number to convert as a text string
base - number base
RETURNS:
decimal value of the number
sd_dec2base(decimal,base = 16 as num,digits = 0 as num)
Accepts a decimal number and returns the equivelent value in the
new base as a string.
ARGS:
decimal - number to convert
base - new number base
digits - if output is less than digits, it will add
preceeding 0s to pad it out
RETURNS:
equivelent value in the new base as a string
sd_get_dist(atom/A, atom/B)
Returns the mathematical 3D distance between two atoms.
sd_get_dist_squared(atom/A, atom/B)
Returns the square of the mathematical 3D distance between two atoms. (More processor
friendly than sd_get_dist() and useful for modelling realworld physics.)
*/
/*********************************************
* Implimentation: No need to read further. *
*********************************************/
proc
sd_base2dec(number as text, base = 16 as num)
/* Accepts a number in any base (2 to 36) and returns the equivelent
value in decimal.
ARGS:
number - number to convert as a text string
base - number base
RETURNS:
decimal value of the number
*/
if(!istext(number))
world.log << "sd_base2dec: invalid number string- [number]"
return null
if(!isnum(base) || (base < 2) || (base > 36))
world.log << "sd_base2dec: invalid base - [base]"
return null
var/decimal = 0
number = uppertext(number)
for(var/loop = 1, loop <= lentext(number))
var/digit = copytext(number,loop,++loop)
if((digit >= "0") && (digit <= "9"))
decimal = decimal * base + text2num(digit)
else if((digit >= "A") && (digit <= "Z"))
decimal = decimal * base + (text2ascii(digit) - 55)
else
break // terminate when it encounters an invalid character
return decimal
sd_dec2base(decimal,base = 16 as num,digits = 0 as num)
/* Accepts a decimal number and returns the equivelent value in the
new base as a string.
ARGS:
decimal - number to convert
base - new number base
digits - if output is less than digits, it will add
preceeding 0s to pad it out
RETURNS:
equivelent value in the new base as a string
*/
if(istext(decimal)) decimal = text2num(decimal)
decimal = round(decimal)
if(!isnum(decimal) || (decimal < 0))
world.log << "sd_dec2base: invalid decimal number - [decimal]"
return null
if(!isnum(base) || (base < 2) || (base > 36))
world.log << "sd_dec2base: invalid base - [base]"
return null
var/text = ""
if(!decimal) text = "0"
while(decimal)
var/n = decimal%base
if(n<10)
text = num2text(n) + text
else
text = ascii2text(55+n) + text
decimal = (decimal - n)/base
while(lentext(text) < digits)
text = "0" + text
return text
sd_get_dist(atom/A, atom/B)
/* Returns the mathematical 3D distance between two atoms. */
var/X = (A.x - B.x)
var/Y = (A.y - B.y)
var/Z = (A.z - B.z)
return sqrt(X * X + Y * Y + Z * Z)
sd_get_dist_squared(atom/A, atom/B)
/* Returns the square of the mathematical 3D distance between two atoms. (More processor
friendly than sd_get_dist() and useful for modelling realworld physics.) */
var/X = (A.x - B.x)
var/Y = (A.y - B.y)
var/Z = (A.z - B.z)
return X * X + Y * Y + Z * Z
-140
View File
@@ -1,140 +0,0 @@
/* Nybble Colors
Nybble colors is used to compact RGB colors to "nybble" (4 bits, 1 hex
digit, or decimal numbers 0 to 15.) Since BYOND allows up to 16 bits in
bitwise mathematics, you could store up to 4 color values in a single
number. (The project inspiring these procs stores a foreground nybble
color, background nybble color, and 8 bit text character in each 16 bit
number.)
The value of each bit is:
Bit: 4 3 2 1
Component: Intensity Red Green Blue
Nybble color values are:
Dec Hex Bin Color
0 0 0000 null color. See the note below.
1 1 0001 dark blue (navy)
2 2 0010 dark green
3 3 0011 dark cyan
4 4 0100 dark red
5 5 0101 dark magenta
6 6 0110 brown
7 7 0111 grey
8 8 1000 black
9 9 1001 blue
10 A 1010 green
11 B 1011 cyan
12 C 1100 red
13 D 1101 magenta
14 E 1110 yellow
15 F 1111 white
Null color note: rgb2nybble() will return a value of 8 for black, so
that you may use 0 value nybbles for special cases in your own code.
For example, in the project that inspired these procs, color 0
indicates the default background, which is a textured image.
nybble2rgb() will convert values of 0 or 8 to "000000" (or "000" if
you specify short rgb.)
PROCS
sd_nybble2rgb(original, bit = 8, short = 0)
Converts a nybble color to an RGB hex color string.
ARGS:
value - the number containing the nibble
bit - the MSB (most significant bit) of the nybble. The
default value of 8 uses the lowest 4 bits of original.
DEFAULT: 8
short - short RGB flag. If this is set, the proc returns a
3 character RGB string. Otherwise it returns a 6
character RGB string.
DEFAULT: 0 (return 6 characters)
RETURNS:
A 3 or 6 character hexidecimal RGB color string.
sd_rgb2nybble(rgb, bit = 8)
Converts an rgb color string to a nybble color.
ARGS:
rgb - The color string to be converted. This may be a 3 or 6
character color code with or without a leading "#".
Examples: "000", "000000", "#000", "#000000" all
indicate black.
bit - the MSB (most significant bit) of the nybble. You can
use this to shift the position of your nybble within
the return value. The default value of 8 uses the
lowest 4 bits.
DEFAULT: 8
RETURNS:
A nybble color value or null if the proc failed.
*/
/*********************************************
* Implimentation: No need to read further. *
*********************************************/
proc
sd_nybble2rgb(original, bit = 8, short = 0)
/* Converts a nybble color to an RGB hex color string.
ARGS:
value - the number containing the nibble
bit - the MSB (most significant bit) of the nybble. The
default value of 8 uses the lowest 4 bits of original.
DEFAULT: 8
short - short RGB flag. If this is set, the proc returns a
3 character RGB string. Otherwise it returns a 6
character RGB string.
DEFAULT: 0 (return 6 characters)
RETURNS:
A 3 or 6 character hexidecimal RGB color string. */
var {intensity = "9"; off = "0"}
if(original & bit) intensity = "F"
if(!short)
intensity += intensity
off = "00"
. = ""
for(var/loop = 1 to 3)
bit >>= 1
if(original & bit) . += intensity
else . += off
if(. == "990") . = "940"
else if(. == "999900") . = "994400"
if(intensity == "F" && . == "000000") . = "00FF99"
sd_rgb2nybble(rgb, bit = 8)
/* Converts an rgb color string to a nybble color.
ARGS:
rgb - The color string to be converted. This may be a 3 or 6
character color code with or without a leading "#".
Examples: "000", "000000", "#000", "#000000" all
indicate black.
bit - the MSB (most significant bit) of the nybble. You can
use this to shift the position of your nybble within
the return value. The default value of 8 uses the
lowest 4 bits.
DEFAULT: 8
RETURNS:
A nybble color value or null if the proc failed. */
if(!istext(rgb)) return
if(text2ascii(rgb) == 35) // leading "#"
rgb = copytext(rgb,2)
var{char; cmp[3]; cmp_size; hi = 0; loop; pos = 1}
switch(length(rgb))
if(3) cmp_size = 1
if(6) cmp_size = 2
else return
for(loop = 1 to 3)
char = copytext(rgb, pos, pos+1)
// char 0 to 3 => 0, 4 to 9 => 1, A to F => 2
// cmp[loop] = round(sd_base2dec(char, 16) * 0.15, 1)
// previous line takes over twice as long as switch() method below
switch(char)
if("0", "1", "2", "3") cmp[loop] = 0
if("4", "5", "6", "7", "8", "9") cmp[loop] = 1
else cmp[loop] = 2
if(cmp[loop] > hi) hi = cmp[loop]
pos += cmp_size
switch(hi)
if(0) return bit // color 8: black
if(2) . = bit // high intensity
else . = 0 // low intensity
for(loop = 1 to 3)
bit >>= 1
if(cmp[loop] == hi) . |= bit
-310
View File
@@ -1,310 +0,0 @@
/* Sample sd_colors. This file will not automatically be included in your
projects, since you may want to define them differently.
Colors can be defined by rgb values:
sd_color/blue
red = 0
green = 0
blue = 255
Colors can be defined by HTML values:
sd_color/green
html = "00FF00"
Colors can be defined by just overriding selective rgb values:
sd_color/red
red = 255
magenta
// still has red = 255, since it is a child of red
blue = 255
*/
/******************************************************
* Here 142 colors you might like to use from *
* http://www.w3schools.com/html/html_colornames.asp *
******************************************************/
sd_color
AliceBlue
html = "F0F8FF"
AntiqueWhite
html = "FAEBD7"
Aqua
html = "00FFFF"
Aquamarine
html = "7FFFD4"
Azure
html = "F0FFFF"
Beige
html = "F5F5DC"
Bisque
html = "FFE4C4"
Black
html = "000000"
BlanchedAlmond
html = "FFEBCD"
Blue
html = "0000FF"
BlueViolet
html = "8A2BE2"
Brown
html = "A52A2A"
BurlyWood
html = "DEB887"
CadetBlue
html = "5F9EA0"
Chartreuse
html = "7FFF00"
Chocolate
html = "D2691E"
Coral
html = "FF7F50"
CornflowerBlue
html = "6495ED"
Cornsilk
html = "FFF8DC"
Crimson
html = "DC143C"
Cyan
html = "00FFFF"
DarkBlue
html = "00008B"
DarkCyan
html = "008B8B"
DarkGoldenRod
html = "B8860B"
DarkGray
html = "A9A9A9"
DarkGreen
html = "006400"
DarkKhaki
html = "BDB76B"
DarkMagenta
html = "8B008B"
DarkOliveGreen
html = "556B2F"
Darkorange
html = "FF8C00"
DarkOrchid
html = "9932CC"
DarkRed
html = "8B0000"
DarkSalmon
html = "E9967A"
DarkSeaGreen
html = "8FBC8F"
DarkSlateBlue
html = "483D8B"
DarkSlateGray
html = "2F4F4F"
DarkTurquoise
html = "00CED1"
DarkViolet
html = "9400D3"
DeepPink
html = "FF1493"
DeepSkyBlue
html = "00BFFF"
DimGray
html = "696969"
DodgerBlue
html = "1E90FF"
FireBrick
html = "B22222"
FloralWhite
html = "FFFAF0"
ForestGreen
html = "228B22"
Fuchsia
html = "FF00FF"
Gainsboro
html = "DCDCDC"
GhostWhite
html = "F8F8FF"
Gold
html = "FFD700"
GoldenRod
html = "DAA520"
Gray
html = "808080"
Green
html = "008000"
GreenYellow
html = "ADFF2F"
HoneyDew
html = "F0FFF0"
HotPink
html = "FF69B4"
IndianRed
html = "CD5C5C"
Indigo
html = "4B0082"
Ivory
html = "FFFFF0"
Khaki
html = "F0E68C"
Lavender
html = "E6E6FA"
LavenderBlush
html = "FFF0F5"
LawnGreen
html = "7CFC00"
LemonChiffon
html = "FFFACD"
LightBlue
html = "ADD8E6"
LightCoral
html = "F08080"
LightCyan
html = "E0FFFF"
LightGoldenRodYellow
html = "FAFAD2"
LightGrey
html = "D3D3D3"
LightGreen
html = "90EE90"
LightPink
html = "FFB6C1"
LightSalmon
html = "FFA07A"
LightSeaGreen
html = "20B2AA"
LightSkyBlue
html = "87CEFA"
LightSlateBlue
html = "8470FF"
LightSlateGray
html = "778899"
LightSteelBlue
html = "B0C4DE"
LightYellow
html = "FFFFE0"
Lime
html = "00FF00"
LimeGreen
html = "32CD32"
Linen
html = "FAF0E6"
Magenta
html = "FF00FF"
Maroon
html = "800000"
MediumAquaMarine
html = "66CDAA"
MediumBlue
html = "0000CD"
MediumOrchid
html = "BA55D3"
MediumPurple
html = "9370D8"
MediumSeaGreen
html = "3CB371"
MediumSlateBlue
html = "7B68EE"
MediumSpringGreen
html = "00FA9A"
MediumTurquoise
html = "48D1CC"
MediumVioletRed
html = "C71585"
MidnightBlue
html = "191970"
MintCream
html = "F5FFFA"
MistyRose
html = "FFE4E1"
Moccasin
html = "FFE4B5"
NavajoWhite
html = "FFDEAD"
Navy
html = "000080"
OldLace
html = "FDF5E6"
Olive
html = "808000"
OliveDrab
html = "6B8E23"
Orange
html = "FFA500"
OrangeRed
html = "FF4500"
Orchid
html = "DA70D6"
PaleGoldenRod
html = "EEE8AA"
PaleGreen
html = "98FB98"
PaleTurquoise
html = "AFEEEE"
PaleVioletRed
html = "D87093"
PapayaWhip
html = "FFEFD5"
PeachPuff
html = "FFDAB9"
Peru
html = "CD853F"
Pink
html = "FFC0CB"
Plum
html = "DDA0DD"
PowderBlue
html = "B0E0E6"
Purple
html = "800080"
Red
html = "FF0000"
RosyBrown
html = "BC8F8F"
RoyalBlue
html = "4169E1"
SaddleBrown
html = "8B4513"
Salmon
html = "FA8072"
SandyBrown
html = "F4A460"
SeaGreen
html = "2E8B57"
SeaShell
html = "FFF5EE"
Sienna
html = "A0522D"
Silver
html = "C0C0C0"
SkyBlue
html = "87CEEB"
SlateBlue
html = "6A5ACD"
SlateGray
html = "708090"
Snow
html = "FFFAFA"
SpringGreen
html = "00FF7F"
SteelBlue
html = "4682B4"
Tan
html = "D2B48C"
Teal
html = "008080"
Thistle
html = "D8BFD8"
Tomato
html = "FF6347"
Turquoise
html = "40E0D0"
Violet
html = "EE82EE"
VioletRed
html = "D02090"
Wheat
html = "F5DEB3"
White
html = "FFFFFF"
WhiteSmoke
html = "F5F5F5"
Yellow
html = "FFFF00"
YellowGreen
html = "9ACD32"
-161
View File
@@ -1,161 +0,0 @@
/* sd_procs
by: Shadowdarke (shadowdarke@hotmail.com)
A collection of general purpose procs I use often in
other projects.
The following is a summary of all the procs and other additions included in
the sd_procs library. Please refer to the specific file for detailed information.
Atom (atom.dm)
These procs expand on the basic built in procs.
Bumped(O)
Automatically called whenever a movable atom O Bump()s into src.
Proc protype designed to be overridden for specific objects.
Trigger(O)
Automatically called whenever a movable atom O steps into the same
turf with src.
Proc protype designed to be overridden for specific objects.
Base 64 (base64.dm)
These procs convert plain text to a hexidecimal string to 64 encoded text and vice versa.
sd_base64toHex(encode64, pad_code = 67)
Accepts a base 64 encoded text and returns the hexidecimal equivalent.
sd_hex2base64(hextext, pad_char = "=")
Accepts a hexidecimal string and returns the base 64 encoded text equivalent.
sd_hex2text(hex)
Accepts a hexidecimal string and returns the plain text equivalent.
sd_text2hex(txt)
Accepts a plain text string and returns the hexidecimal equivalent.
Colors(color.dm)
sd_color
sd_color is a special datum that contains color data in various
formats. Sample colors are available in samplecolors.dm.
VARS
name // the name of the color
red // red componant of the color
green // green componant of the color
blue // red componant of the color
html // html string for the color
icon/Icon // contains the icon produced by rgb2icon() proc
PROCS
brightness()
Returns the grayscale brightness of the RGB color set.
html2rgb()
Calculates the rgb colors from the html colors.
rgb2html()
Calculates the html color from the rbg colors.
rgb2icon()
Converts the rgb value to a solid icon stored as src.Icon
Direction procs (direction.dm)
sd_get_approx_dir(atom/ref,atom/target)
returns the approximate direction from ref to target.
sd_degrees2dir(degrees as num)
Accepts an angle in degrees and returns the closest BYOND
direction value.
sd_dir2degrees(dir as num)
Accepts a BYOND direction value and returns the angle North of
East in degrees.
sd_dir2radial(dir as num)
Accepts a BYOND direction value and returns the radial direction
(0-7) North of East.
sd_dir2radians(dir as num)
Accepts a BYOND direction value and returns the angle North of
East in radians.
sd_dir2text(dir as num)
Accepts a BYOND direction value and returns the lowercase text
name of the direction.
sd_dir2Text(dir as num)
Accepts a BYOND direction value and returns the Capitalized text
name of the direction
sd_radial2dir(radial as num)
Accepts a radial direction (0-7) and returns the BYOND direction
value.
HSL procs (hsl.dm)
hsl2rgb(hue, sat, lgh, scale = 240)
Returns the RRGGBB format of an HSL color.
ALTERNATE FORMAT: hsl2rgb(HSL, scale)
rgb2hsl(red, grn, blu, scale = 240)
Returns the HHSSLL string of an RGB color
ALTERNATE FORMAT: rgb2hsl(RGB, scale)
Math procs (math.dm)
sd_base2dec(number as text, base = 16 as num)
Accepts a number in any base (2 to 36) and returns the equivelent
value in decimal.
sd_dec2base(decimal,base = 16 as num,digits = 0 as num)
Accepts a decimal number and returns the equivelent value in the
new base as a string.
sd_get_dist(atom/A, atom/B)
Returns the mathematical 3D distance between two atoms.
sd_get_dist_squared(atom/A, atom/B)
Returns the square of the mathematical 3D distance between two atoms. (More processor
friendly than sd_get_dist() and useful for modelling realworld physics.)
Nybble Color procs (nybble.dm)
sd_nybble2rgb(original, bit = 8, short = 0)
Converts a nybble color to a hexidecimal RGB color string.
sd_rgb2nybble(rgb, bit = 8)
Converts an RGB color string to a nybble color.
Sample sd_colors. (samplecolors.dm)
This file includes 142 predefined sd_colors. It will not automatically
be included in your projects, since you may want to define them differently.
Test program (test.dm)
This file provides a brief demo of some library functions.
It is not included in your projects.
Text procs (text.dm)
sd_findlast(maintext as text, searchtext as text)
Returns the location of the last instance of searchtext in
maintext. sd_findlast is not case sensitive.
sd_findLast(maintext as text, searchtext as text)
Returns the location of the last instance of searchtext in
maintext. sd_findLast is case sensitive.
sd_htmlremove(T as text)
Returns the text string with all potential html tags (anything
between < and >) removed.
sd_replacetext(maintext as text, oldtext as text, newtext as text)
Replaces all instances of oldtext within maintext with newtext.
sd_replacetext is not case sensitive.
sd_replaceText(maintext as text, oldtext as text, newtext as text)
Replaces all instances of oldtext within maintext with newtext.
sd_replaceText is case sensitive.
*/
-89
View File
@@ -1,89 +0,0 @@
/* Text procs
These procs manipulate text strings.
sd_findlast(maintext as text, searchtext as text)
Returns the location of the last instance of searchtext in
maintext. sd_findlast is not case sensitive.
sd_findLast(maintext as text, searchtext as text)
Returns the location of the last instance of searchtext in
maintext. sd_findLast is case sensitive.
sd_htmlremove(T as text)
Returns the text string with all potential html tags (anything
between < and >) removed.
sd_replacetext(maintext as text, oldtext as text, newtext as text)
Replaces all instances of oldtext within maintext with newtext.
sd_replacetext is not case sensitive.
sd_replaceText(maintext as text, oldtext as text, newtext as text)
Replaces all instances of oldtext within maintext with newtext.
sd_replaceText is case sensitive.
*/
/*********************************************
* Implimentation: No need to read further. *
*********************************************/
proc
sd_findlast(maintext as text, searchtext as text)
/* Returns the location of the last instance of searchtext in
maintext. sd_findlast is not case sensitive. */
var/loc = 0
var/looking = findtext(maintext, searchtext)
while(looking)
loc = looking
looking = findtext(maintext, searchtext, looking + 1)
return loc
sd_findLast(maintext as text, searchtext as text)
/* Returns the location of the last instance of searchtext in
maintext. sd_findLast is case sensitive. */
var/loc = 0
var/looking = findText(maintext, searchtext)
while(looking)
loc = looking
looking = findText(maintext, searchtext, looking + 1)
return loc
sd_htmlremove(T as text)
/* Returns the text string with all potential html tags (anything
between < and >) removed. */
T = sd_replacetext(T, "&nbsp;","")
var/open = findtext(T,"<")
while(open)
var/close = findtext(T,">",open)
if(close)
if(close<lentext(T))
T = copytext(T,1,open)+copytext(T,close+1)
else
T = copytext(T,1,open)
open = findtext(T,"<")
else
open = 0
return T
sd_replacetext(maintext as text, oldtext as text, newtext as text)
/* Replaces all instances of oldtext within maintext with newtext.
sd_replacetext is not case sensitive. See sd_replaceText for a
case sensitive version. */
var/F = findtext(maintext, oldtext)
var/length = length(newtext)
while(F)
var/newmessage = copytext(maintext,1,F) + newtext + copytext(maintext,F+lentext(oldtext))
maintext = newmessage
F = findtext(maintext, oldtext, F + length)
return maintext
sd_replaceText(maintext as text, oldtext as text, newtext as text)
/* Replaces all instances of oldtext within maintext with newtext.
sd_replaceText is case sensitive. See sd_replacetext for a
non-case sensitive version. */
var/F = findText(maintext, oldtext)
var/length = length(newtext)
while(F)
var/newmessage = copytext(maintext,1,F) + newtext + copytext(maintext,F+lentext(oldtext))
maintext = newmessage
F = findText(maintext, oldtext, F + length)
return maintext
-444
View File
@@ -1,444 +0,0 @@
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31
/turf
icon = 'icons/turf/floors.dmi'
var/intact = 1 //for floors, use is_plating(), is_plasteel_floor() and is_light_floor()
level = 1.0
//Properties for open tiles (/floor)
var/oxygen = 0
var/carbon_dioxide = 0
var/nitrogen = 0
var/toxins = 0
//Properties for airtight tiles (/wall)
var/thermal_conductivity = 0.05
var/heat_capacity = 1
//Properties for both
var/temperature = T20C
var/blocks_air = 0
var/icon_old = null
var/pathweight = 1
proc/is_plating()
return 0
proc/is_asteroid_floor()
return 0
proc/is_plasteel_floor()
return 0
proc/is_light_floor()
return 0
proc/is_grass_floor()
return 0
proc/is_wood_floor()
return 0
proc/return_siding_icon_state() //used for grass floors, which have siding.
return 0
/turf/Entered(atom/A as mob|obj)
..()
if ((A && A.density && !( istype(A, /obj/effect/beam) )))
for(var/obj/effect/beam/i_beam/I in src)
spawn( 0 )
if (I)
I.hit()
return
return
/turf/space
icon = 'icons/turf/space.dmi'
name = "\proper space"
icon_state = "placeholder"
temperature = TCMB
thermal_conductivity = OPEN_HEAT_TRANSFER_COEFFICIENT
heat_capacity = 700000
/turf/space/transit
var/pushdirection // push things that get caught in the transit tile this direction
//Overwrite because we dont want people building rods in space.
/turf/space/transit/attackby(obj/O as obj, mob/user as mob)
return
/turf/space/transit/north // moving to the north
pushdirection = SOUTH // south because the space tile is scrolling south
//IF ANYONE KNOWS A MORE EFFICIENT WAY OF MANAGING THESE SPRITES, BE MY GUEST.
shuttlespace_ns1
icon_state = "speedspace_ns_1"
shuttlespace_ns2
icon_state = "speedspace_ns_2"
shuttlespace_ns3
icon_state = "speedspace_ns_3"
shuttlespace_ns4
icon_state = "speedspace_ns_4"
shuttlespace_ns5
icon_state = "speedspace_ns_5"
shuttlespace_ns6
icon_state = "speedspace_ns_6"
shuttlespace_ns7
icon_state = "speedspace_ns_7"
shuttlespace_ns8
icon_state = "speedspace_ns_8"
shuttlespace_ns9
icon_state = "speedspace_ns_9"
shuttlespace_ns10
icon_state = "speedspace_ns_10"
shuttlespace_ns11
icon_state = "speedspace_ns_11"
shuttlespace_ns12
icon_state = "speedspace_ns_12"
shuttlespace_ns13
icon_state = "speedspace_ns_13"
shuttlespace_ns14
icon_state = "speedspace_ns_14"
shuttlespace_ns15
icon_state = "speedspace_ns_15"
/turf/space/transit/east // moving to the east
pushdirection = WEST
shuttlespace_ew1
icon_state = "speedspace_ew_1"
shuttlespace_ew2
icon_state = "speedspace_ew_2"
shuttlespace_ew3
icon_state = "speedspace_ew_3"
shuttlespace_ew4
icon_state = "speedspace_ew_4"
shuttlespace_ew5
icon_state = "speedspace_ew_5"
shuttlespace_ew6
icon_state = "speedspace_ew_6"
shuttlespace_ew7
icon_state = "speedspace_ew_7"
shuttlespace_ew8
icon_state = "speedspace_ew_8"
shuttlespace_ew9
icon_state = "speedspace_ew_9"
shuttlespace_ew10
icon_state = "speedspace_ew_10"
shuttlespace_ew11
icon_state = "speedspace_ew_11"
shuttlespace_ew12
icon_state = "speedspace_ew_12"
shuttlespace_ew13
icon_state = "speedspace_ew_13"
shuttlespace_ew14
icon_state = "speedspace_ew_14"
shuttlespace_ew15
icon_state = "speedspace_ew_15"
/turf/space/New()
// icon = 'icons/turf/space.dmi'
if(!istype(src, /turf/space/transit))
icon_state = "[pick(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25)]"
/turf/simulated
name = "station"
var/wet = 0
var/image/wet_overlay = null
var/thermite = 0
oxygen = MOLES_O2STANDARD
nitrogen = MOLES_N2STANDARD
var/to_be_destroyed = 0 //Used for fire, if a melting temperature was reached, it will be destroyed
var/max_fire_temperature_sustained = 0 //The max temperature of the fire which it was subjected to
/turf/simulated/New()
..()
levelupdate()
/turf/simulated/wall
name = "wall"
desc = "A huge chunk of metal used to seperate rooms."
icon = 'icons/turf/walls.dmi'
var/mineral = "metal"
opacity = 1
density = 1
blocks_air = 1
thermal_conductivity = WALL_HEAT_TRANSFER_COEFFICIENT
heat_capacity = 312500 //a little over 5 cm thick , 312500 for 1 m by 2.5 m by 0.25 m plasteel wall
var/walltype = "metal"
/turf/simulated/wall/r_wall
name = "r wall"
desc = "A huge chunk of reinforced metal used to seperate rooms."
icon_state = "r_wall"
opacity = 1
density = 1
walltype = "rwall"
var/d_state = 0
/turf/simulated/wall/mineral
name = "mineral wall"
desc = "This shouldn't exist"
icon_state = ""
var/last_event = 0
var/active = null
/turf/simulated/wall/mineral/New()
switch(mineral)
if("gold")
name = "gold wall"
desc = "A wall with gold plating. Swag!"
icon_state = "gold0"
walltype = "gold"
// var/electro = 1
// var/shocked = null
if("silver")
name = "silver wall"
desc = "A wall with silver plating. Shiny!"
icon_state = "silver0"
walltype = "silver"
// var/electro = 0.75
// var/shocked = null
if("diamond")
name = "diamond wall"
desc = "A wall with diamond plating. You monster."
icon_state = "diamond0"
walltype = "diamond"
if("uranium")
name = "uranium wall"
desc = "A wall with uranium plating. This is probably a bad idea."
icon_state = "uranium0"
walltype = "uranium"
if("plasma")
name = "plasma wall"
desc = "A wall with plasma plating. This is definately a bad idea."
icon_state = "plasma0"
walltype = "plasma"
if("clown")
name = "bananium wall"
desc = "A wall with bananium plating. Honk!"
icon_state = "clown0"
walltype = "clown"
if("sandstone")
name = "sandstone wall"
desc = "A wall with sandstone plating."
icon_state = "sandstone0"
walltype = "sandstone"
..()
/turf/simulated/wall/mineral/proc/radiate()
if(!active)
if(world.time > last_event+15)
active = 1
for(var/mob/living/L in range(3,src))
L.apply_effect(12,IRRADIATE,0)
for(var/turf/simulated/wall/mineral/T in range(3,src))
if(T.mineral == "uranium")
T.radiate()
last_event = world.time
active = null
return
return
/*/turf/simulated/wall/mineral/proc/shock()
if (electrocute_mob(user, C, src))
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(5, 1, src)
s.start()
return 1
else
return 0
*/
/turf/simulated/wall/cult
name = "wall"
desc = "The patterns engraved on the wall seem to shift as you try to focus on them. You feel sick"
icon_state = "cult"
walltype = "cult"
/turf/simulated/shuttle
name = "shuttle"
icon = 'icons/turf/shuttle.dmi'
thermal_conductivity = 0.05
heat_capacity = 0
layer = 2
/turf/simulated/shuttle/wall
name = "wall"
icon_state = "wall1"
opacity = 1
density = 1
blocks_air = 1
/turf/simulated/shuttle/floor
name = "floor"
icon_state = "floor"
/turf/simulated/shuttle/plating
name = "plating"
icon = 'icons/turf/floors.dmi'
icon_state = "plating"
/turf/simulated/shuttle/floor4 // Added this floor tile so that I have a seperate turf to check in the shuttle -- Polymorph
name = "Brig floor" // Also added it into the 2x3 brig area of the shuttle.
icon_state = "floor4"
/turf/unsimulated
intact = 1
name = "command"
oxygen = MOLES_O2STANDARD
nitrogen = MOLES_N2STANDARD
/turf/unsimulated/floor
name = "floor"
icon = 'icons/turf/floors.dmi'
icon_state = "Floor3"
/turf/unsimulated/wall
name = "wall"
icon = 'icons/turf/walls.dmi'
icon_state = "riveted"
opacity = 1
density = 1
turf/unsimulated/wall/splashscreen
name = "Space Station 13"
icon = 'icons/misc/fullscreen.dmi'
icon_state = "title"
layer = FLY_LAYER
/turf/unsimulated/wall/other
icon_state = "r_wall"
/turf/proc/AdjacentTurfs()
var/L[] = new()
for(var/turf/simulated/t in oview(src,1))
if(!t.density)
if(!LinkBlocked(src, t) && !TurfBlockedNonWindow(t))
L.Add(t)
return L
/turf/proc/Distance(turf/t)
if(get_dist(src,t) == 1)
var/cost = (src.x - t.x) * (src.x - t.x) + (src.y - t.y) * (src.y - t.y)
cost *= (pathweight+t.pathweight)/2
return cost
else
return get_dist(src,t)
/turf/proc/AdjacentTurfsSpace()
var/L[] = new()
for(var/turf/t in oview(src,1))
if(!t.density)
if(!LinkBlocked(src, t) && !TurfBlockedNonWindow(t))
L.Add(t)
return L
/*
/turf/simulated/wall/mineral
icon = 'icons/turf/mineral_walls.dmi'
walltype = "iron"
var/oreAmount = 1
var/hardness = 1
New()
..()
name = "[walltype] wall"
dismantle_wall(devastated = 0)
if(!devastated)
var/ore = text2path("/obj/item/weapon/ore/[walltype]")
for(var/i = 1, i <= oreAmount, i++)
new ore(src)
ReplaceWithFloor()
else
ReplaceWithSpace()
attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W,/obj/item/weapon/pickaxe))
var/obj/item/weapon/pickaxe/digTool = W
user << "You start digging the [name]."
if(do_after(user,digTool.digspeed*hardness) && src)
user << "You finished digging."
dismantle_wall()
else if(istype(W,/obj/item/weapon)) //not sure, can't not just weapons get passed to this proc?
hardness -= W.force/100
user << "You hit the [name] with your [W.name]!"
CheckHardness()
else
attack_hand(user)
return
proc/CheckHardness()
if(hardness <= 0)
dismantle_wall()
/turf/simulated/wall/mineral/iron
walltype = "iron"
hardness = 3
/turf/simulated/wall/mineral/silver
walltype = "silver"
hardness = 3
/turf/simulated/wall/mineral/uranium
walltype = "uranium"
hardness = 3
New()
..()
sd_SetLuminosity(3)
/turf/simulated/wall/mineral/gold
walltype = "gold"
/turf/simulated/wall/mineral/sand
walltype = "sand"
hardness = 0.5
/turf/simulated/wall/mineral/transparent
opacity = 0
/turf/simulated/wall/mineral/transparent/diamond
walltype = "diamond"
hardness = 10
/turf/simulated/wall/mineral/transparent/plasma
walltype = "plasma"
attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W,/obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = W
if(WT.remove_fuel(0, user))
return TemperatureAct(100)
..()
temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
if(exposed_temperature > 300)
TemperatureAct(exposed_temperature)
proc/TemperatureAct(temperature)
for(var/turf/simulated/floor/target_tile in range(2,loc))
if(target_tile.parent && target_tile.parent.group_processing)
target_tile.parent.suspend_group_processing()
var/datum/gas_mixture/napalm = new
var/toxinsToDeduce = temperature/10
napalm.toxins = toxinsToDeduce
napalm.temperature = 400+T0C
target_tile.assume_air(napalm)
spawn (0) target_tile.hotspot_expose(temperature, 400)
hardness -= toxinsToDeduce/100
CheckHardness()
*/
+2 -1
View File
@@ -9,6 +9,7 @@
selection_color = "#dddddd"
access = list() //See /datum/job/assistant/get_access()
minimal_access = list() //See /datum/job/assistant/get_access()
alt_titles = list("Technical Assistant","Medical Intern","Research Assistant","Security Cadet")
/datum/job/assistant/equip(var/mob/living/carbon/human/H)
if(!H) return 0
@@ -20,4 +21,4 @@
if(config.assistant_maint)
return list(access_maint_tunnels)
else
return list()
return list()
+3 -4
View File
@@ -11,8 +11,7 @@
req_admin_notify = 1
access = list() //See get_access()
minimal_access = list() //See get_access()
minimal_player_age = 14
alt_titles = list("Administrator") minimal_player_age = 14
equip(var/mob/living/carbon/human/H)
if(!H) return 0
@@ -56,7 +55,7 @@
selection_color = "#ddddff"
idtype = /obj/item/weapon/card/id/silver
req_admin_notify = 1
minimal_player_age = 10
alt_titles = list("Human resources director","Executive Officer") minimal_player_age = 10
access = list(access_security, access_sec_doors, access_brig, access_court, access_forensics_lockers,
access_medical, access_engine, access_change_ids, access_ai_upload, access_eva, access_heads,
access_all_personal_lockers, access_maint_tunnels, access_bar, access_janitor, access_construction, access_morgue,
@@ -86,4 +85,4 @@
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/ids(H), slot_r_hand)
else
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/ids(H.back), slot_in_backpack)
return 1
return 1
+9 -2
View File
@@ -10,7 +10,7 @@
selection_color = "#dddddd"
access = list(access_hydroponics, access_bar, access_kitchen, access_morgue)
minimal_access = list(access_bar)
alt_titles = list("Waiter","Waitress")
equip(var/mob/living/carbon/human/H)
if(!H) return 0
@@ -52,6 +52,7 @@
selection_color = "#dddddd"
access = list(access_hydroponics, access_bar, access_kitchen, access_morgue)
minimal_access = list(access_kitchen, access_morgue)
alt_titles = list("Gourmet chef","Cook")
equip(var/mob/living/carbon/human/H)
@@ -80,7 +81,7 @@
selection_color = "#dddddd"
access = list(access_hydroponics, access_bar, access_kitchen, access_morgue) // Removed tox and chem access because STOP PISSING OFF THE CHEMIST GUYS // //Removed medical access because WHAT THE FUCK YOU AREN'T A DOCTOR YOU GROW WHEAT //Given Morgue access because they have a viable means of cloning.
minimal_access = list(access_hydroponics, access_morgue) // Removed tox and chem access because STOP PISSING OFF THE CHEMIST GUYS // //Removed medical access because WHAT THE FUCK YOU AREN'T A DOCTOR YOU GROW WHEAT //Given Morgue access because they have a viable means of cloning.
alt_titles = list("Hydroponicist")
equip(var/mob/living/carbon/human/H)
if(!H) return 0
@@ -110,6 +111,7 @@
selection_color = "#dddddd"
access = list(access_maint_tunnels, access_mailsorting, access_cargo, access_cargo_bot, access_qm, access_mint, access_mining, access_mining_station)
minimal_access = list(access_maint_tunnels, access_mailsorting, access_cargo, access_cargo_bot, access_qm, access_mint, access_mining, access_mining_station)
alt_titles = list("Supplies Officer","Logistics Officer")
equip(var/mob/living/carbon/human/H)
@@ -140,6 +142,7 @@
selection_color = "#dddddd"
access = list(access_maint_tunnels, access_mailsorting, access_cargo, access_cargo_bot, access_qm, access_mint, access_mining, access_mining_station)
minimal_access = list(access_maint_tunnels, access_cargo, access_cargo_bot, access_mailsorting)
alt_titles = list("Supplies worker","Courier","Logistics worker")
equip(var/mob/living/carbon/human/H)
@@ -168,6 +171,7 @@
selection_color = "#dddddd"
access = list(access_maint_tunnels, access_mailsorting, access_cargo, access_cargo_bot, access_qm, access_mint, access_mining, access_mining_station)
minimal_access = list(access_mining, access_mint, access_mining_station, access_mailsorting)
alt_titles = list("Deep space miner","NTCA Affiliate","Prospector")
equip(var/mob/living/carbon/human/H)
@@ -279,6 +283,7 @@
selection_color = "#dddddd"
access = list(access_janitor, access_maint_tunnels)
minimal_access = list(access_janitor, access_maint_tunnels)
alt_titles = list("Custodial officer","Hygiene supervisor","OHS assistant","Health and Safety worker")
equip(var/mob/living/carbon/human/H)
@@ -307,6 +312,7 @@
selection_color = "#dddddd"
access = list(access_library, access_maint_tunnels)
minimal_access = list(access_library)
alt_titles = list("Journalist","Clerk","Record keeper")
equip(var/mob/living/carbon/human/H)
@@ -335,6 +341,7 @@ var/global/lawyer = 0//Checks for another lawyer
selection_color = "#dddddd"
access = list(access_lawyer, access_court, access_sec_doors, access_maint_tunnels)
minimal_access = list(access_lawyer, access_court, access_sec_doors)
alt_titles = list("Attourney","Barrister","Solicitor","Queen's Counsel","Paralegal")
equip(var/mob/living/carbon/human/H)
+2 -1
View File
@@ -10,6 +10,7 @@
selection_color = "#dddddd"
access = list(access_morgue, access_chapel_office, access_crematorium, access_maint_tunnels)
minimal_access = list(access_morgue, access_chapel_office, access_crematorium)
alt_titles = list("Counselor","Psychiatrist","Crew services adviser","Morale Officer")
equip(var/mob/living/carbon/human/H)
@@ -26,7 +27,7 @@
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
spawn(0)
var/religion_name = "Christianity"
var/new_religion = copytext(sanitize(input(H, "You are the Chaplain. Would you like to change your religion? Default is Christianity, in SPACE.", "Name change", religion_name)),1,MAX_NAME_LEN)
var/new_religion = copytext(sanitize(input(H, "You are the crew services officer. Would you like to change your religion? Default is Christianity, in SPACE.", "Name change", religion_name)),1,MAX_NAME_LEN)
if (!new_religion)
new_religion = religion_name
+3
View File
@@ -9,6 +9,7 @@
selection_color = "#ffeeaa"
idtype = /obj/item/weapon/card/id/silver
req_admin_notify = 1
alt_titles = list("Engineering supervisor")
access = list(access_engine, access_engine_equip, access_tech_storage, access_maint_tunnels,
access_teleporter, access_external_airlocks, access_atmospherics, access_emergency_storage, access_eva,
access_heads, access_construction, access_sec_doors,
@@ -52,6 +53,7 @@
selection_color = "#fff5cc"
access = list(access_eva, access_engine, access_engine_equip, access_tech_storage, access_maint_tunnels, access_external_airlocks, access_construction, access_atmospherics)
minimal_access = list(access_engine, access_engine_equip, access_tech_storage, access_maint_tunnels, access_external_airlocks, access_construction)
alt_titles = list("Technician","Maintenance technician","Engine technician","EVA technician","Electrician","Construction specialist")
@@ -87,6 +89,7 @@
selection_color = "#fff5cc"
access = list(access_eva, access_engine, access_engine_equip, access_tech_storage, access_maint_tunnels, access_external_airlocks, access_construction, access_atmospherics)
minimal_access = list(access_atmospherics, access_maint_tunnels, access_emergency_storage, access_construction)
alt_titles = list("Pipeworker","Gas supervisor","Firefighter")
equip(var/mob/living/carbon/human/H)
+4 -5
View File
@@ -49,7 +49,7 @@
selection_color = "#ffeef0"
access = list(access_medical, access_morgue, access_surgery, access_chemistry, access_virology, access_genetics)
minimal_access = list(access_medical, access_morgue, access_surgery)
alt_titles = list("Surgeon", "Emergency Physician", "Virologist")
alt_titles = list("Surgeon","Emergency Physician","Nurse","Orderly")
equip(var/mob/living/carbon/human/H)
if(!H) return 0
@@ -101,6 +101,7 @@
selection_color = "#ffeef0"
access = list(access_medical, access_morgue, access_surgery, access_chemistry, access_virology, access_genetics)
minimal_access = list(access_medical, access_chemistry)
alt_titles = list("Pharmacist")
equip(var/mob/living/carbon/human/H)
@@ -129,6 +130,7 @@
selection_color = "#ffeef0"
access = list(access_medical, access_morgue, access_surgery, access_chemistry, access_virology, access_genetics, access_research)
minimal_access = list(access_medical, access_morgue, access_genetics, access_research)
alt_titles = list("Sequencer")
equip(var/mob/living/carbon/human/H)
@@ -145,8 +147,6 @@
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
return 1
/*
/datum/job/virologist
title = "Virologist"
flag = VIROLOGIST
@@ -158,6 +158,7 @@
selection_color = "#ffeef0"
access = list(access_medical, access_morgue, access_surgery, access_chemistry, access_virology, access_genetics)
minimal_access = list(access_medical, access_virology)
alt_titles = list("Pathologist","Microbiologist")
equip(var/mob/living/carbon/human/H)
@@ -178,5 +179,3 @@
else
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
return 1
*/
+2 -1
View File
@@ -46,7 +46,7 @@
selection_color = "#ffeeff"
access = list(access_robotics, access_tox, access_tox_storage, access_research, access_xenobiology)
minimal_access = list(access_tox, access_tox_storage, access_research, access_xenobiology)
alt_titles = list("Xenoarcheologist", "Anomalist", "Plasma Researcher", "Xenobiologist")
alt_titles = list("Xenoarcheologist", "Anomalist", "Plasma Researcher", "Xenobiologist","High Energy Materials Researcher")
equip(var/mob/living/carbon/human/H)
if(!H) return 0
@@ -74,6 +74,7 @@
selection_color = "#ffeeff"
access = list(access_robotics, access_tox, access_tox_storage, access_tech_storage, access_morgue, access_research) //As a job that handles so many corpses, it makes sense for them to have morgue access.
minimal_access = list(access_robotics, access_tech_storage, access_morgue, access_research) //As a job that handles so many corpses, it makes sense for them to have morgue access.
alt_titles = list("Biomedical engineer","Mechatronic engineer")
equip(var/mob/living/carbon/human/H)
if(!H) return 0
+6 -5
View File
@@ -9,6 +9,7 @@
selection_color = "#ffdddd"
idtype = /obj/item/weapon/card/id/silver
req_admin_notify = 1
alt_titles = list("Commander","Commissioner")
access = list(access_security, access_sec_doors, access_brig, access_armory, access_court,
access_forensics_lockers, access_morgue, access_maint_tunnels, access_all_personal_lockers,
access_research, access_engine, access_mining, access_medical, access_construction, access_mailsorting,
@@ -55,8 +56,9 @@
spawn_positions = 1
supervisors = "the head of security"
selection_color = "#ffeeee"
access = list(access_security, access_sec_doors, access_brig, access_armory, access_court, access_maint_tunnels, access_morgue)
minimal_access = list(access_security, access_sec_doors, access_brig, access_armory, access_court)
access access = list(access_security, access_sec_doors, access_brig, access_armory, access_court, access_maint_tunnels, access_morgue)
= list(access_security, access_sec_doors, access_brig, access_armory, access_court)
alt_titles = list("Arsenal clerk","Brig supervisor","Superintendant") minimal_access = list(access_security, access_sec_doors, access_brig, access_armory, access_court)
minimal_player_age = 7
equip(var/mob/living/carbon/human/H)
@@ -96,7 +98,7 @@
access = list(access_sec_doors, access_forensics_lockers, access_morgue, access_maint_tunnels, access_court)
minimal_access = list(access_sec_doors, access_forensics_lockers, access_morgue, access_maint_tunnels, access_court)
alt_titles = list("Forensic Technician","Investigator")
minimal_player_age = 7
equip(var/mob/living/carbon/human/H)
if(!H) return 0
@@ -143,8 +145,7 @@
selection_color = "#ffeeee"
access = list(access_security, access_sec_doors, access_brig, access_court, access_maint_tunnels, access_morgue)
minimal_access = list(access_security, access_sec_doors, access_brig, access_court)
minimal_player_age = 7
alt_titles = list("OHS marshal","Enforcer") minimal_player_age = 7
equip(var/mob/living/carbon/human/H)
if(!H) return 0
+5 -1
View File
@@ -253,7 +253,11 @@
var/t2 = modify
//var/t1 = input(usr, "What name?", "ID computer", null) as text
if ((authenticated && modify == t2 && (in_range(src, usr) || (istype(usr, /mob/living/silicon))) && istype(loc, /turf)))
modify.registered_name = href_list["reg"]
var/temp_name = reject_bad_name(href_list["reg"])
if(temp_name)
modify.registered_name = temp_name
else
src.visible_message("<span class='notice'>[src] buzzes rudely.</span>")
if ("mode")
mode = text2num(href_list["mode_target"])
if ("print")
+1 -1
View File
@@ -123,7 +123,7 @@
else
spawn(0)
close()
return
var/access_granted = 0
var/users_name
if(!istype(C, /obj)) //If someone hit it with their hand. We need to see if they are allowed.
+2 -13
View File
@@ -210,19 +210,8 @@
return
if (can_operate(M)) //Checks if mob is lying down on table for surgery
if(istype(M,/mob/living/carbon))
if (user.a_intent != "harm") //check for Hippocratic Oath
if(surgery_steps.len == 0) build_surgery_steps_list()
for(var/datum/surgery_step/S in surgery_steps)
if( S.isright(src) || S.isacceptable(src) ) //check if tool is right or close enough
if(S.can_use(user, M, user.zone_sel.selecting, src)) //and if this step is possible
S.begin_step(user, M, user.zone_sel.selecting, src) //start on it
if(do_mob(user, M, rand(S.min_duration, S.max_duration))) //if user did nto move or changed hands
S.end_step(user, M, user.zone_sel.selecting, src) //finish successfully
else //or
S.fail_step(user, M, user.zone_sel.selecting, src) //malpractice~
return //don't want to do weapony things after surgery
if (do_surgery(M,user,src))
return
var/messagesource = M
-422
View File
@@ -1,422 +0,0 @@
/obj/item/proc/attack_self()
return
/obj/item/proc/talk_into(mob/M as mob, text)
return
/obj/item/proc/moved(mob/user as mob, old_loc as turf)
return
/obj/item/proc/dropped(mob/user as mob)
..()
// 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 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
/obj/item/proc/afterattack()
return
/obj/item/weapon/dummy/ex_act()
return
/obj/item/weapon/dummy/blob_act()
return
/obj/item/ex_act(severity)
switch(severity)
if(1.0)
del(src)
return
if(2.0)
if (prob(50))
del(src)
return
if(3.0)
if (prob(5))
del(src)
return
else
return
/obj/item/blob_act()
return
/obj/item/verb/move_to_top()
set name = "Move To Top"
set category = "Object"
set src in oview(1)
if(!istype(src.loc, /turf) || usr.stat || usr.restrained() )
return
var/turf/T = src.loc
src.loc = null
src.loc = T
/obj/item/examine()
set src in view()
var/t
switch(src.w_class)
if(1.0)
t = "tiny"
if(2.0)
t = "small"
if(3.0)
t = "normal-sized"
if(4.0)
t = "bulky"
if(5.0)
t = "huge"
else
if ((CLUMSY in usr.mutations) && prob(50)) t = "funny-looking"
usr << text("This is a []\icon[][]. It is a [] item.", !src.blood_DNA ? "" : "bloody ",src, src.name, t)
if(src.desc)
usr << src.desc
return
/obj/item/attack_hand(mob/user as mob)
if (!user) return
if (istype(src.loc, /obj/item/weapon/storage))
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(!src.canremove)
return
else
user.u_equip(src)
else
if(isliving(src.loc))
return
src.pickup(user)
user.lastDblClick = world.time + 2
user.next_move = world.time + 2
add_fingerprint(user)
user.put_in_active_hand(src)
return
/obj/item/attack_paw(mob/user as mob)
if(isalien(user)) // -- TLE
var/mob/living/carbon/alien/A = user
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 (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
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)
return
else
user.u_equip(src)
else
if(istype(src.loc, /mob/living))
return
src.pickup(user)
user.lastDblClick = world.time + 2
user.next_move = world.time + 2
user.put_in_active_hand(src)
return
/obj/item/attackby(obj/item/weapon/W as obj, mob/user as mob)
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)
return
mob/proc/flash_weak_pain()
flick("weak_pain",pain)
/obj/item/proc/attack(mob/living/M as mob, mob/living/user as mob, def_zone)
if (!istype(M)) // not sure if this is the right thing...
return
var/messagesource = M
if (istype(M,/mob/living/carbon/brain))
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()]\]<font color='red'> Attacked [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)]) (DAMTYE: [uppertext(src.damtype)])</font>"
M.attack_log += "\[[time_stamp()]\]<font color='orange'> Attacked by [user.name] ([user.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)]) (DAMTYE: [uppertext(src.damtype)])</font>"
log_admin("ATTACK: [user] ([user.ckey]) attacked [M] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)]) (DAMTYE: [uppertext(src.damtype)]")
msg_admin_attack("ATTACK: [user] ([user.ckey]) attacked [M] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)]) (DAMTYE: [uppertext(src.damtype)]")
log_attack("<font color='red'>[user.name] ([user.ckey]) attacked [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)]) (DAMTYE: [uppertext(src.damtype)])</font>" )
//spawn(1800) // this wont work right
// M.lastattacker = null
/////////////////////////
if((HULK in user.mutations) || (SUPRSTR in user.augmentations))
power *= 2
if(!istype(M, /mob/living/carbon/human))
if(istype(M, /mob/living/carbon/metroid))
var/mob/living/carbon/metroid/Metroid = M
if(prob(25))
user << "\red [src] passes right through [M]!"
return
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)))
if(Metroid.Victim)
if(prob(80) && !Metroid.client)
Metroid.Discipline++
Metroid.Victim = null
Metroid.anchored = 0
spawn()
if(Metroid)
Metroid.SStun = 1
sleep(rand(5,20))
if(Metroid)
Metroid.SStun = 0
spawn(0)
if(Metroid)
Metroid.canmove = 0
step_away(Metroid, user)
if(prob(25 + power))
sleep(2)
if(Metroid && user)
step_away(Metroid, user)
Metroid.canmove = 1
else
if(prob(10 + power*2))
if(Metroid)
if(Metroid.Victim)
if(prob(80) && !Metroid.client)
Metroid.Discipline++
if(Metroid.Discipline == 1)
Metroid.attacked = 0
spawn()
if(Metroid)
Metroid.SStun = 1
sleep(rand(5,20))
if(Metroid)
Metroid.SStun = 0
Metroid.Victim = null
Metroid.anchored = 0
spawn(0)
if(Metroid && user)
step_away(Metroid, user)
Metroid.canmove = 0
if(prob(25 + power*4))
sleep(2)
if(Metroid && user)
step_away(Metroid, user)
Metroid.canmove = 1
var/showname = "."
if(user)
showname = " by [user]."
if(!(user in viewers(M, null)))
showname = "."
for(var/mob/O in viewers(messagesource, null))
if(src.attack_verb.len)
O.show_message("\red <B>[M] has been [pick(src.attack_verb)] with [src][showname] </B>", 1)
else
O.show_message("\red <B>[M] has been attacked with [src][showname] </B>", 1)
if(!showname && user)
if(user.client)
user << "\red <B>You attack [M] with [src]. </B>"
if(istype(M, /mob/living/carbon/human))
M:attacked_by(src, user, def_zone)
else
switch(src.damtype)
if("brute")
if(istype(src, /mob/living/carbon/metroid))
M.adjustBrainLoss(power)
else
M.take_organ_damage(power)
if (prob(33)) // Added blood for whacking non-humans too
var/turf/location = M.loc
if (istype(location, /turf/simulated))
location.add_blood_floor(M)
if("fire")
if (!(COLD_RESISTANCE in M.mutations))
M.take_organ_damage(0, power)
M << "Aargh it burns!"
M.updatehealth()
src.add_fingerprint(user)
return 1
/obj/item/proc/IsShield()
return 0
/obj/item/proc/eyestab(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
var/mob/living/carbon/human/H = M
if(istype(H) && ( \
(H.head && H.head.flags & HEADCOVERSEYES) || \
(H.wear_mask && H.wear_mask.flags & MASKCOVERSEYES) || \
(H.glasses && H.glasses.flags & GLASSESCOVERSEYES) \
))
// you can't stab someone in the eyes wearing a mask!
user << "\red You're going to need to remove that mask/helmet/glasses first."
return
var/mob/living/carbon/monkey/Mo = M
if(istype(Mo) && ( \
(Mo.wear_mask && Mo.wear_mask.flags & MASKCOVERSEYES) \
))
// you can't stab someone in the eyes wearing a mask!
user << "\red You're going to need to remove that mask/helmet/glasses first."
return
if(istype(M, /mob/living/carbon/alien) || istype(M, /mob/living/carbon/metroid))//Aliens don't have eyes./N Metroids also don't have eyes!
user << "\red You cannot locate any eyes on this creature!"
return
user.attack_log += "\[[time_stamp()]\]<font color='red'> Attacked [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])</font>"
M.attack_log += "\[[time_stamp()]\]<font color='orange'> Attacked by [user.name] ([user.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])</font>"
log_attack("<font color='red'> [user.name] ([user.ckey]) attacked [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])</font>")
log_admin("ATTACK: [user.name] ([user.ckey]) attacked [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])")
msg_admin_attack("ATTACK: [user.name] ([user.ckey]) attacked [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])") //BS12 EDIT ALG
src.add_fingerprint(user)
//if((CLUMSY in user.mutations) && prob(50))
// M = user
/*
M << "\red You stab yourself in the eye."
M.sdisabilities |= BLIND
M.weakened += 4
M.adjustBruteLoss(10)
*/
if(M != user)
for(var/mob/O in (viewers(M) - user - M))
O.show_message("\red [M] has been stabbed in the eye with [src] by [user].", 1)
M << "\red [user] stabs you in the eye with [src]!"
user << "\red You stab [M] in the eye with [src]!"
else
user.visible_message( \
"\red [user] has stabbed themself with [src]!", \
"\red You stab yourself in the eyes with [src]!" \
)
if(istype(M, /mob/living/carbon/human))
var/datum/organ/external/affecting = M:get_organ("head")
if(affecting.take_damage(7))
M:UpdateDamageIcon()
else
M.take_organ_damage(7)
M.eye_blurry += rand(3,4)
M.eye_stat += rand(2,4)
if (M.eye_stat >= 10)
M.eye_blurry += 15+(0.1*M.eye_blurry)
M.disabilities |= NEARSIGHTED
if(M.stat != 2)
M << "\red Your eyes start to bleed profusely!"
if(prob(50))
if(M.stat != 2)
M << "\red You drop what you're holding and clutch at your eyes!"
M.drop_item()
M.eye_blurry += 10
M.Paralyse(1)
M.Weaken(4)
if (prob(M.eye_stat - 10 + 1))
if(M.stat != 2)
M << "\red You go blind!"
M.sdisabilities |= BLIND
return
+2 -2
View File
@@ -132,8 +132,8 @@
/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
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" || t == "") //Same as mob/new_player/prefrences.dm
var t = reject_bad_name(input(user, "What name would you like to put on this card?", "Agent card name", ishuman(user) ? user.real_name : user.name))
if(!t) //Same as mob/new_player/prefrences.dm
alert("Invalid name.")
return
src.registered_name = t
@@ -347,6 +347,16 @@
return
return
/obj/item/weapon/tray/var/cooldown = 0 //shield bash cooldown. based on world.time
/obj/item/weapon/tray/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W, /obj/item/weapon/kitchen/rollingpin))
if(cooldown < world.time - 25)
user.visible_message("<span class='warning'>[user] bashes [src] with [W]!</span>")
playsound(user.loc, 'sound/effects/shieldbash.ogg', 50, 1)
cooldown = world.time
else
..()
/*
===============~~~~~================================~~~~~====================
+39 -10
View File
@@ -355,7 +355,7 @@ var/list/mechtoys = list(
dat += {"<BR><B>Supply shuttle</B><HR>
Location: [supply_shuttle.moving ? "Moving to station ([supply_shuttle.eta] Mins.)":supply_shuttle.at_station ? "Station":"Dock"]<BR>
<HR>Supply points: [supply_shuttle.points]<BR>
<BR>\n<A href='?src=\ref[src];order=1'>Request items</A><BR><BR>
<BR>\n<A href='?src=\ref[src];order=categories'>Request items</A><BR><BR>
<A href='?src=\ref[src];vieworders=1'>View approved orders</A><BR><BR>
<A href='?src=\ref[src];viewrequests=1'>View requests</A><BR><BR>
<A href='?src=\ref[user];mach_close=computer'>Close</A>"}
@@ -372,12 +372,23 @@ var/list/mechtoys = list(
usr.set_machine(src)
if(href_list["order"])
temp = "Supply points: [supply_shuttle.points]<BR><HR><BR>Request what?<BR><BR>"
for(var/supply_name in supply_shuttle.supply_packs )
var/datum/supply_packs/N = supply_shuttle.supply_packs[supply_name]
if(N.hidden || N.contraband) continue //Have to send the type instead of a reference to
temp += "<A href='?src=\ref[src];doorder=[supply_name]'>[supply_name]</A> Cost: [N.cost]<BR>" //the obj because it would get caught by the garbage
temp += "<BR><A href='?src=\ref[src];mainmenu=1'>OK</A>"
if(href_list["order"] == "categories")
//all_supply_groups
//Request what?
temp = "<b>Supply points: [supply_shuttle.points]</b><BR>"
temp += "<A href='?src=\ref[src];mainmenu=1'>Main Menu</A><HR><BR><BR>"
temp += "<b>Select a category</b><BR><BR>"
for(var/supply_group_name in all_supply_groups )
temp += "<A href='?src=\ref[src];order=[supply_group_name]'>[supply_group_name]</A><BR>"
else
var/cur_supply_group = href_list["order"]
temp = "<b>Supply points: [supply_shuttle.points]</b><BR>"
temp += "<A href='?src=\ref[src];order=categories'>Back to all categories</A><HR><BR><BR>"
temp += "<b>Request from: [cur_supply_group]</b><BR><BR>"
for(var/supply_name in supply_shuttle.supply_packs )
var/datum/supply_packs/N = supply_shuttle.supply_packs[supply_name]
if(N.hidden || N.contraband || N.group != cur_supply_group) continue //Have to send the type instead of a reference to
temp += "<A href='?src=\ref[src];doorder=[supply_name]'>[supply_name]</A> Cost: [N.cost]<BR>" //the obj because it would get caught by the garbage
else if (href_list["doorder"])
if(world.time < reqtime)
@@ -468,7 +479,7 @@ var/list/mechtoys = list(
dat += {"<BR><B>Supply shuttle</B><HR>
\nLocation: [supply_shuttle.moving ? "Moving to station ([supply_shuttle.eta] Mins.)":supply_shuttle.at_station ? "Station":"Away"]<BR>
<HR>\nSupply points: [supply_shuttle.points]<BR>\n<BR>
[supply_shuttle.moving ? "\n*Must be away to order items*<BR>\n<BR>":supply_shuttle.at_station ? "\n*Must be away to order items*<BR>\n<BR>":"\n<A href='?src=\ref[src];order=1'>Order items</A><BR>\n<BR>"]
[supply_shuttle.moving ? "\n*Must be away to order items*<BR>\n<BR>":supply_shuttle.at_station ? "\n*Must be away to order items*<BR>\n<BR>":"\n<A href='?src=\ref[src];order=categories'>Order items</A><BR>\n<BR>"]
[supply_shuttle.moving ? "\n*Shuttle already called*<BR>\n<BR>":supply_shuttle.at_station ? "\n<A href='?src=\ref[src];send=1'>Send away</A><BR>\n<BR>":"\n<A href='?src=\ref[src];send=1'>Send to station</A><BR>\n<BR>"]
\n<A href='?src=\ref[src];viewrequests=1'>View requests</A><BR>\n<BR>
\n<A href='?src=\ref[src];vieworders=1'>View orders</A><BR>\n<BR>
@@ -544,14 +555,32 @@ var/list/mechtoys = list(
else if (href_list["order"])
if(supply_shuttle.moving) return
temp = "Supply points: [supply_shuttle.points]<BR><HR><BR>Request what?<BR><BR>"
if(href_list["order"] == "categories")
//all_supply_groups
//Request what?
temp = "<b>Supply points: [supply_shuttle.points]</b><BR>"
temp += "<A href='?src=\ref[src];mainmenu=1'>Main Menu</A><HR><BR><BR>"
temp += "<b>Select a category</b><BR><BR>"
for(var/supply_group_name in all_supply_groups )
temp += "<A href='?src=\ref[src];order=[supply_group_name]'>[supply_group_name]</A><BR>"
else
var/cur_supply_group = href_list["order"]
temp = "<b>Supply points: [supply_shuttle.points]</b><BR>"
temp += "<A href='?src=\ref[src];order=categories'>Back to all categories</A><HR><BR><BR>"
temp += "<b>Request from: [cur_supply_group]</b><BR><BR>"
for(var/supply_name in supply_shuttle.supply_packs )
var/datum/supply_packs/N = supply_shuttle.supply_packs[supply_name]
if(N.hidden || N.contraband || N.group != cur_supply_group) continue //Have to send the type instead of a reference to
temp += "<A href='?src=\ref[src];doorder=[supply_name]'>[supply_name]</A> Cost: [N.cost]<BR>" //the obj because it would get caught by the garbage
/*temp = "Supply points: [supply_shuttle.points]<BR><HR><BR>Request what?<BR><BR>"
for(var/supply_name in supply_shuttle.supply_packs )
var/datum/supply_packs/N = supply_shuttle.supply_packs[supply_name]
if(N.hidden && !hacked) continue
if(N.contraband && !can_order_contraband) continue
temp += "<A href='?src=\ref[src];doorder=[supply_name]'>[supply_name]</A> Cost: [N.cost]<BR>" //the obj because it would get caught by the garbage
temp += "<BR><A href='?src=\ref[src];mainmenu=1'>OK</A>"
temp += "<BR><A href='?src=\ref[src];mainmenu=1'>OK</A>"*/
else if (href_list["doorder"])
if(world.time < reqtime)
+20 -6
View File
@@ -86,7 +86,7 @@
slowdown = 1
w_class = 3
armor = list(melee = 60, bullet = 50, laser = 30, energy = 15, bomb = 35, bio = 100, rad = 60)
allowed = list(/obj/item/weapon/gun,/obj/item/ammo_magazine,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/melee/energy/sword,/obj/item/weapon/handcuffs,/obj/item/weapon/tank/emergency_oxygen)
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank/emergency_oxygen,/obj/item/weapon/gun,/obj/item/ammo_magazine,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/melee/energy/sword,/obj/item/weapon/handcuffs)
//Wizard Rig
/obj/item/clothing/head/helmet/space/rig/wizard
@@ -108,7 +108,6 @@
allowed = list(/obj/item/weapon/teleportation_scroll,/obj/item/weapon/tank/emergency_oxygen)
//Medical Rig
/obj/item/clothing/head/helmet/space/rig/medical
name = "medical hardsuit helmet"
@@ -120,17 +119,32 @@
icon_state = "rig-medical"
name = "medical hardsuit"
item_state = "medical_hardsuit"
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/weapon/storage/firstaid,/obj/item/device/healthanalyzer,/obj/item/stack/medical)
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank/emergency_oxygen,/obj/item/weapon/storage/firstaid,/obj/item/device/healthanalyzer,/obj/item/stack/medical)
//Security
/obj/item/clothing/head/helmet/space/rig/security
name = "security hardsuit helmet"
icon_state = "rig0-sec"
item_state = "sec_helm"
color = "sec"
/obj/item/clothing/suit/space/rig/security
icon_state = "rig-sec"
name = "security hardsuit"
item_state = "sec_hardsuit"
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank, /obj/item/weapon/gun/energy,/obj/item/weapon/reagent_containers/spray/pepper,/obj/item/weapon/gun/projectile,/obj/item/ammo_magazine,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/handcuffs)
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank, /obj/item/weapon/gun/energy,/obj/item/weapon/reagent_containers/spray/pepper,/obj/item/weapon/gun/projectile,/obj/item/ammo_magazine,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/handcuffs)
//Atmospherics Rig (BS12)
/obj/item/clothing/head/helmet/space/rig/atmos
desc = "A special helmet designed for work in a hazardou, low pressure environments. Has reduced radiation shielding and protective plating to allow for greater mobility."
name = "atmospherics hardsuit helmet"
icon_state = "rig0-atmos"
item_state = "atmos_helm"
color = "atmos"
armor = list(melee = 35, bullet = 5, laser = 15,energy = 5, bomb = 30, bio = 100, rad = 5)
/obj/item/clothing/suit/space/rig/atmos
desc = "A special suit that protects against hazardous, low pressure environments. Has reduced radiation shielding to allow for greater mobility."
icon_state = "rig-atmos"
name = "atmos hardsuit"
item_state = "atmos_hardsuit"
armor = list(melee = 35, bullet = 5, laser = 15,energy = 5, bomb = 30, bio = 100, rad = 5)
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank/emergency_oxygen)
+6
View File
@@ -382,6 +382,12 @@ hi
icon = 'custom_items.dmi'
icon_state = "chal_appara_1"
/obj/item/clothing/gloves/fluff/ashley_rifler_1 //Vinceluk: Ashley Rifler
name = "Purple Glove"
desc = "A single, purple glove. Initials A.R. are written on the inside of it."
icon = 'custom_items.dmi'
icon_state = "ashley_rifler_1"
//////////// Eye Wear ////////////
/obj/item/clothing/glasses/meson/fluff/book_berner_1 //asanadas: Book Berner
File diff suppressed because it is too large Load Diff
-23
View File
@@ -1,23 +0,0 @@
/obj/item/weapon/reagent_containers/food/snacks/meat
name = "meat"
desc = "A slab of meat"
icon_state = "meat"
health = 180
New()
..()
reagents.add_reagent("nutriment", 3)
src.bitesize = 3
/obj/item/weapon/reagent_containers/food/snacks/meat/syntiflesh
name = "synthetic meat"
desc = "A synthetic slab of flesh."
/obj/item/weapon/reagent_containers/food/snacks/meat/human
name = "-meat"
var/subjectname = ""
var/subjectjob = null
/obj/item/weapon/reagent_containers/food/snacks/meat/monkey
//same as plain meat
@@ -2,12 +2,6 @@
gender = MALE
var/list/stomach_contents = list()
var/brain_op_stage = 0.0
var/ribcage_op_stage = 0
var/alien_op_stage = 0.0
/*
var/eye_op_stage = 0.0
var/appendix_op_stage = 0.0
*/
var/datum/disease2/disease/virus2 = null
var/list/datum/disease2/disease/resistances2 = list()
var/antibodies = 0
@@ -22,3 +16,7 @@
var/number_wounds = 0
var/obj/item/handcuffed = null //Whether or not the mob is handcuffed
var/obj/item/legcuffed = null //Same as handcuffs but for legs. Bear traps use this.
//Surgery info
var/datum/surgery_status/op_stage = new/datum/surgery_status
//Active emote/pose
var/pose = null
@@ -589,3 +589,10 @@
for (var/mob/O in (hearers(src.loc, null) | get_mobs_in_view(world.view,src)))
O.show_message(message, m_type)
/mob/living/carbon/human/verb/pose()
set name = "Set pose"
set desc = "Sets description which will be shown when someone examines you"
set category = "IC"
pose = copytext(sanitize(input(usr, "This is [src]. \He is...", "Pose", null) as text), 1, MAX_MESSAGE_LEN)
@@ -418,5 +418,7 @@
if(print_flavor_text()) msg += "[print_flavor_text()]\n"
msg += "*---------*</span>"
if (pose)
msg += "\n[t_He] is [pose]."
usr << msg
+6 -6
View File
@@ -691,13 +691,13 @@ var/const/BLOOD_VOLUME_SURVIVE = 122
fire_alert = max(fire_alert, 1)
switch(bodytemperature)
if(360 to 400)
apply_damage(HEAT_DAMAGE_LEVEL_1, BURN)
apply_damage(HEAT_DAMAGE_LEVEL_1, BURN, used_weapon = "High Body Temperature")
fire_alert = max(fire_alert, 2)
if(400 to 1000)
apply_damage(HEAT_DAMAGE_LEVEL_2, BURN)
apply_damage(HEAT_DAMAGE_LEVEL_2, BURN, used_weapon = "High Body Temperature")
fire_alert = max(fire_alert, 2)
if(1000 to INFINITY)
apply_damage(HEAT_DAMAGE_LEVEL_3, BURN)
apply_damage(HEAT_DAMAGE_LEVEL_3, BURN, used_weapon = "High Body Temperature")
fire_alert = max(fire_alert, 2)
else if(bodytemperature < BODYTEMP_COLD_DAMAGE_LIMIT)
@@ -705,13 +705,13 @@ var/const/BLOOD_VOLUME_SURVIVE = 122
if(!istype(loc, /obj/machinery/atmospherics/unary/cryo_cell))
switch(bodytemperature)
if(200 to 260)
apply_damage(COLD_DAMAGE_LEVEL_1, BURN)
apply_damage(COLD_DAMAGE_LEVEL_1, BURN, used_weapon = "Low Body Temperature")
fire_alert = max(fire_alert, 1)
if(120 to 200)
apply_damage(COLD_DAMAGE_LEVEL_2, BURN)
apply_damage(COLD_DAMAGE_LEVEL_2, BURN, used_weapon = "Low Body Temperature")
fire_alert = max(fire_alert, 1)
if(-INFINITY to 120)
apply_damage(COLD_DAMAGE_LEVEL_3, BURN)
apply_damage(COLD_DAMAGE_LEVEL_3, BURN, used_weapon = "Low Body Temperature")
fire_alert = max(fire_alert, 1)
// Account for massive pressure differences. Done by Polymorph
+2 -2
View File
@@ -8,7 +8,7 @@
Returns
standard 0 if fail
*/
/mob/living/proc/apply_damage(var/damage = 0,var/damagetype = BRUTE, var/def_zone = null, var/blocked = 0)
/mob/living/proc/apply_damage(var/damage = 0,var/damagetype = BRUTE, var/def_zone = null, var/blocked = 0, var/used_weapon = null)
if(!damage || (blocked >= 2)) return 0
switch(damagetype)
if(BRUTE)
@@ -71,4 +71,4 @@
if(stutter) apply_effect(stutter, STUTTER, blocked)
if(eyeblur) apply_effect(eyeblur, EYE_BLUR, blocked)
if(drowsy) apply_effect(drowsy, DROWSY, blocked)
return 1
return 1
+1 -1
View File
@@ -57,7 +57,7 @@
P.on_hit(src,2)
return 2
if(!P.nodamage)
apply_damage((P.damage/(absorb+1)), P.damage_type, def_zone)
apply_damage((P.damage/(absorb+1)), P.damage_type, def_zone, used_weapon = "Projectile([P.name])")
P.on_hit(src, absorb)
return absorb
-160
View File
@@ -1,160 +0,0 @@
#define BEAR_STANCE_IDLE 1
#define BEAR_STANCE_ALERT 2
#define BEAR_STANCE_ATTACK 3
#define BEAR_STANCE_ATTACKING 4
#define BEAR_STANCE_TIRED 5
//Space bears!
/mob/living/simple_animal/bear
name = "space bear"
desc = "RawrRawr!!"
icon_state = "bear"
icon_living = "bear"
icon_dead = "bear_dead"
icon_gib = "bear_gib"
speak = list("RAWR!","Rawr!","GRR!","Growl!")
speak_emote = list("growls", "roars")
emote_hear = list("rawrs","grumbles","grawls")
emote_see = list("stares ferociously", "stomps")
speak_chance = 1
turns_per_move = 5
see_in_dark = 6
meat_type = /obj/item/weapon/reagent_containers/food/snacks/meat
response_help = "pets the"
response_disarm = "gently pushes aside the"
response_harm = "pokes the"
stop_automated_movement_when_pulled = 0
maxHealth = 60
health = 60
//Space bears aren't affected by atmos.
min_oxy = 0
max_oxy = 0
min_tox = 0
max_tox = 0
min_co2 = 0
max_co2 = 0
min_n2 = 0
max_n2 = 0
var/stance = BEAR_STANCE_IDLE //Used to determine behavior
var/stance_step = 0 //Used to delay checks depending on what stance the bear is in
var/mob/living/target_mob //Once the bear enters attack stance, it will try to chase this mob. This it to prevent it changing it's mind between multiple mobs.
/proc/isbear(var/mob/M)
return istype(M, /mob/living/simple_animal/bear)
/mob/living/simple_animal/bear/Life()
..()
if(!stat)
if(loc && istype(loc,/turf/space))
icon_state = "bear"
else
icon_state = "bearfloor"
switch(stance)
if(BEAR_STANCE_IDLE)
stop_automated_movement = 0
stance_step++
if(stance_step > 5)
stance_step = 0
for( var/mob/living/L in viewers(7,src) )
if(isbear(L)) continue
if(!L.stat)
emote("stares alertly at [L]")
stance = BEAR_STANCE_ALERT
break
if(BEAR_STANCE_ALERT)
stop_automated_movement = 1
var/found_mob = 0
for( var/mob/living/L in viewers(7,src) )
if(isbear(L)) continue
if(!L.stat)
stance_step = max(0, stance_step) //If we have not seen a mob in a while, the stance_step will be negative, we need to reset it to 0 as soon as we see a mob again.
stance_step++
found_mob = 1
target_mob = L
src.dir = get_dir(src,target_mob) //Keep staring at the mob
if(stance_step in list(1,4,7)) //every 3 ticks
var/action = pick( list( "growls at [L]", "stares angrily at [L]", "prepares to attack [L]", "closely watches [L]" ) )
if(action)
emote(action)
break
if(!found_mob)
stance_step--
if(stance_step <= -20) //If we have not found a mob for 20-ish ticks, revert to idle mode
stance = BEAR_STANCE_IDLE
if(stance_step >= 7) //If we have been staring at a mob for 7 ticks,
stance = BEAR_STANCE_ATTACK
if(BEAR_STANCE_ATTACK) //This one should only be active for one tick,
stop_automated_movement = 1
if(!target_mob || target_mob.stat)
stance = BEAR_STANCE_ALERT
stance_step = 5 //Make it very alert, so it quickly attacks again if a mob returns
if(target_mob in viewers(7,src))
walk_to(src, target_mob, 1, 3)
stance = BEAR_STANCE_ATTACKING
stance_step = 0
if(BEAR_STANCE_ATTACKING)
stop_automated_movement = 1
stance_step++
if(!target_mob || target_mob.stat)
stance = BEAR_STANCE_ALERT
stance_step = 5 //Make it very alert, so it quickly attacks again if a mob returns
return
if(!(target_mob in viewers(7,src)))
stance = BEAR_STANCE_ALERT
stance_step = 5 //Make it very alert, so it quickly attacks again if a mob returns
target_mob = null
return
if(get_dist(src, target_mob) <= 1) //Attacking
emote( pick( list("slashes at [target_mob]", "bites [target_mob]") ) )
var/damage = rand(20,30)
if(ishuman(target_mob))
var/mob/living/carbon/human/H = target_mob
var/dam_zone = pick("chest", "l_hand", "r_hand", "l_leg", "r_leg")
var/datum/organ/external/affecting = H.get_organ(ran_zone(dam_zone))
H.apply_damage(damage, BRUTE, affecting, H.run_armor_check(affecting, "melee"))
else if(isliving(target_mob))
var/mob/living/L = target_mob
L.adjustBruteLoss(damage)
if(stance_step >= 20) //attacks for 20 ticks, then it gets tired and needs to rest
emote( "is worn out and needs to rest" )
stance = BEAR_STANCE_TIRED
stance_step = 0
walk(src, 0) //This stops the bear's walking
return
if(BEAR_STANCE_TIRED)
stop_automated_movement = 1
stance_step++
if(stance_step >= 10) //rests for 10 ticks
if(target_mob && target_mob in viewers(7,src))
stance = BEAR_STANCE_ATTACK //If the mob he was chasing is still nearby, resume the attack, otherwise go idle.
else
stance = BEAR_STANCE_IDLE
/mob/living/simple_animal/bear/attackby(var/obj/item/O as obj, var/mob/user as mob)
if(stance != BEAR_STANCE_ATTACK && stance != BEAR_STANCE_ATTACKING)
stance = BEAR_STANCE_ALERT
stance_step = 6
target_mob = user
..()
/mob/living/simple_animal/bear/attack_hand(mob/living/carbon/human/M as mob)
if(stance != BEAR_STANCE_ATTACK && stance != BEAR_STANCE_ATTACKING)
stance = BEAR_STANCE_ALERT
stance_step = 6
target_mob = M
..()
/mob/living/simple_animal/bear/Process_Spacemove(var/check_drift = 0)
return //No drifting in space for space bears!
-126
View File
@@ -1,126 +0,0 @@
/mob/living/simple_animal/constructbehemoth
name = "Behemoth"
real_name = "Behemoth"
original_name = "Behemoth"
desc = "The pinnacle of occult technology, Behemoths are the ultimate weapon in the Cult of Nar-Sie's arsenal."
icon = 'mob.dmi'
icon_state = "behemoth"
icon_living = "behemoth"
icon_dead = "shade_dead"
maxHealth = 750
health = 750
speak_emote = list("rumbles")
emote_hear = list("wails","screeches")
response_help = "thinks better of touching"
response_disarm = "flails at"
response_harm = "harmlessly punches the"
harm_intent_damage = 0
melee_damage_lower = 50
melee_damage_upper = 50
attacktext = "brutally crushes"
minbodytemp = 0
maxbodytemp = 4000
min_oxy = 0
max_co2 = 0
max_tox = 0
speed = 5
wall_smash = 1
nopush = 1
a_intent = "harm"
stop_automated_movement = 1
canstun = 0
canweaken = 0
var/energy = 0
var/max_energy = 1000
Life()
..()
if(stat == 2)
new /obj/item/weapon/ectoplasm (src.loc)
for(var/mob/M in viewers(src, null))
if((M.client && !( M.blinded )))
M.show_message("\red [src] collapses in a shattered heap ")
ghostize(0)
del src
return
/mob/living/simple_animal/constructbehemoth/attackby(var/obj/item/O as obj, var/mob/user as mob)
if(O.force)
if(O.force >= 11)
health -= O.force
for(var/mob/M in viewers(src, null))
if ((M.client && !( M.blinded )))
M.show_message("\red \b [src] has been attacked with the [O] by [user]. ")
else
for(var/mob/M in viewers(src, null))
if ((M.client && !( M.blinded )))
M.show_message("\red \b The [O] bounces harmlessly off of [src]. ")
else
usr << "\red This weapon is ineffective, it does no damage."
for(var/mob/M in viewers(src, null))
if ((M.client && !( M.blinded )))
M.show_message("\red [user] gently taps [src] with the [O]. ")
/mob/living/simple_animal/constructbehemoth/Bump(atom/movable/AM as mob|obj, yes)
spawn( 0 )
if ((!( yes ) || now_pushing))
return
now_pushing = 1
if(ismob(AM))
var/mob/tmob = AM
if(tmob.nopush)
now_pushing = 0
return
tmob.LAssailant = src
now_pushing = 0
..()
if (!( istype(AM, /atom/movable) ))
return
if (!( now_pushing ))
now_pushing = 1
if (!( AM.anchored ))
var/t = get_dir(src, AM)
if (istype(AM, /obj/structure/window))
if(AM:ini_dir == NORTHWEST || AM:ini_dir == NORTHEAST || AM:ini_dir == SOUTHWEST || AM:ini_dir == SOUTHEAST)
for(var/obj/structure/window/win in get_step(AM,t))
now_pushing = 0
return
step(AM, t)
now_pushing = null
return
return
////////////////Powers//////////////////
/*
/client/proc/summon_cultist()
set category = "Behemoth"
set name = "Summon Cultist (300)"
set desc = "Teleport a cultist to your location"
if (istype(usr,/mob/living/simple_animal/constructbehemoth))
if(usr.energy<300)
usr << "\red You do not have enough power stored!"
return
if(usr.stat)
return
usr.energy -= 300
var/list/mob/living/cultists = new
for(var/datum/mind/H in ticker.mode.cult)
if (istype(H.current,/mob/living))
cultists+=H.current
var/mob/cultist = input("Choose the one who you want to summon", "Followers of Geometer") as null|anything in (cultists - usr)
if(!cultist)
return
if (cultist == usr) //just to be sure.
return
cultist.loc = usr.loc
usr.visible_message("/red [cultist] appears in a flash of red light as [usr] glows with power")*/
-189
View File
@@ -1,189 +0,0 @@
#define CARP_STANCE_IDLE 1
#define CARP_STANCE_ATTACK 2
#define CARP_STANCE_ATTACKING 3
/mob/living/simple_animal/carp
name = "space carp"
desc = "A ferocious, fang-bearing creature that resembles a fish."
icon_state = "carp"
icon_living = "carp"
icon_dead = "carp_dead"
icon_gib = "carp_gib"
speak_chance = 0
turns_per_move = 5
meat_type = /obj/item/weapon/reagent_containers/food/snacks/carpmeat
response_help = "pets the"
response_disarm = "gently pushes aside the"
response_harm = "hits the"
stop_automated_movement_when_pulled = 0
maxHealth = 25
health = 25
harm_intent_damage = 8
melee_damage_lower = 5
melee_damage_upper = 15
attacktext = "bites"
attack_sound = 'bite.ogg'
//Space carp aren't affected by atmos.
min_oxy = 0
max_oxy = 0
min_tox = 0
max_tox = 0
min_co2 = 0
max_co2 = 0
min_n2 = 0
max_n2 = 0
minbodytemp = 0 //so they don't freeze in space
maxbodytemp = 295 //if it's just 25 degrees, they start to burn up
var/stance = CARP_STANCE_IDLE //Used to determine behavior
var/stance_step = 0 //Used to delay checks depending on what stance the bear is in
var/mob/living/target_mob //Once the bear enters attack stance, it will try to chase this mob. This it to prevent it changing it's mind between multiple mobs.
heat_damage_per_tick = 1
/mob/living/simple_animal/carp/elite
desc = "A ferocious, fang-bearing creature that resembles a fish. It has an evil gleam in its eye."
maxHealth = 50
health = 50
melee_damage_lower = 10
melee_damage_upper = 20
/proc/iscarp(var/mob/M)
return istype(M, /mob/living/simple_animal/carp)
/mob/living/simple_animal/carp/Life()
..()
if(!stat)
switch(stance)
if(CARP_STANCE_IDLE)
stop_automated_movement = 0
stance_step++
if(stance_step > 5)
stance_step = 0
for( var/mob/living/L in viewers(7,src) )
if(iscarp(L)) continue
if(!L.stat)
if(prob(50))
src.visible_message("<b>[src]</b> gnashes at [L]!")
stance = CARP_STANCE_ATTACK
target_mob = L
break
if(CARP_STANCE_ATTACK) //This one should only be active for one tick
stop_automated_movement = 1
if(!target_mob || target_mob.stat)
stance = CARP_STANCE_IDLE
stance_step = 5 //Make it very alert, so it quickly attacks again if a mob returns
if(target_mob in viewers(7,src))
walk_to(src, target_mob, 1, 3)
stance = CARP_STANCE_ATTACKING
stance_step = 0
if(CARP_STANCE_ATTACKING)
stop_automated_movement = 1
stance_step++
if(!target_mob || target_mob.stat)
stance = CARP_STANCE_IDLE
stance_step = 4 //Make it very alert, so it quickly attacks again if a mob returns
target_mob = null
walk(src,0)
return
if(!(target_mob in viewers(7,src)))
stance = CARP_STANCE_IDLE
stance_step = 1
target_mob = null
walk(src,0)
return
if(get_dist(src, target_mob) <= 1) //Attacking
if(isliving(target_mob))
var/mob/living/L = target_mob
L.attack_animal(src)
if(prob(10))
L.Weaken(5)
L.visible_message("<span class='danger'>\the [src] knocks down \the [L]!</span>")
/mob/living/simple_animal/carp/Die()
..()
target_mob = null
stance = CARP_STANCE_IDLE
walk(src,0)
/mob/living/simple_animal/carp/Process_Spacemove(var/check_drift = 0)
return 0 //No drifting in space for space carp! //original comments do not steal
/mob/living/simple_animal/carp/Process_Spaceslipping(var/prob_slip = 5)
return 0
//----
/mob/living/simple_animal/carp/cyborg
name = "cyborg space carp"
desc = "A ferocious, fang-bearing cyborg that resembles a fish. It has glowing red eyes."
icon_state = "carpborg"
icon_living = "carpborg"
icon_dead = "carpborg_dead"
icon_gib = "carpborg_gib"
speak = list("Objective established.","Goal: Terminate.","Mission parameters defined.","All casualties are acceptable.")
speak_emote = list("beeps")
emote_hear = list("makes a sinister clanking noise.","hisses and steams.","makes a menacing beeping noise.")
emote_see = list("sparks slightly.","flashes a red light ominously.")
speak_chance = 10
var/firing = 0
/mob/living/simple_animal/carp/cyborg/Life()
..()
walk(src,0)
if(!stat)
if(prob(5))
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(5, 1, src)
s.start()
switch(stance)
if(CARP_STANCE_ATTACKING)
if(target_mob)
src.dir = get_dir(src, target_mob)
/*if(get_dist(src, target_mob) > 5)
step_towards(src,target_mob)*/
if(get_dist(src, target_mob) > 1 && !firing)
//fire laser eyes
firing = 1
if(prob(40))
emote("[pick("makes an ominous whining noise!","makes a low humming noise!","begins charging up something!")]")
spawn(40)
if(!target_mob)
return
firing = 0
//load_into_chamber()
var/obj/item/projectile/beam/B = new(src)
B.firer = src
//B.def_zone = targloc
//in_chamber.def_zone = user.zone_sel.selecting
var/turf/targloc = get_turf(target_mob)
var/turf/myloc = get_turf(src)
B.original = targloc
B.loc = myloc
B.starting = myloc
B.silenced = 0
B.current = myloc
B.yo = targloc.y - myloc.y
B.xo = targloc.x - myloc.x
//
B.fired()
//shake the camera? probably not, these lasers don't explode... yet
/*for(var/mob/M in view(src,7))
shake_camera(user, recoil + 1, recoil)*/
playsound(src, pick('pulse.ogg','pulse2.ogg','pulse3.ogg'), 50, 1)
/mob/living/simple_animal/carp/cyborg/Die()
if(prob(15))
src.say_auto("I'll be back!")
..()
-67
View File
@@ -1,67 +0,0 @@
//Cat
/mob/living/simple_animal/cat
name = "cat"
desc = "A domesticated, feline pet. Has a tendency to adopt crewmembers."
icon_state = "cat"
icon_living = "cat"
icon_dead = "cat_dead"
speak = list("Meow!","Esp!","Purr!","HSSSSS")
speak_emote = list("purrs", "meows")
emote_hear = list("meows","mews")
emote_see = list("shakes its head", "shivers")
speak_chance = 1
turns_per_move = 5
see_in_dark = 6
meat_type = /obj/item/weapon/reagent_containers/food/snacks/meat
response_help = "pets the"
response_disarm = "gently pushes aside the"
response_harm = "kicks the"
var/turns_since_scan = 0
var/mob/living/simple_animal/mouse/movement_target
min_oxy = 16 //Require atleast 16kPA oxygen
minbodytemp = 223 //Below -50 Degrees Celcius
maxbodytemp = 323 //Above 50 Degrees Celcius
/mob/living/simple_animal/cat/Life()
//MICE!
if((src.loc) && isturf(src.loc))
if(!stat && !resting && !buckled)
for(var/mob/living/simple_animal/mouse/M in view(1,src))
if(!M.stat)
M.splat()
emote(pick("\red splats the [M]!","\red toys with the [M]","worries the [M]"))
movement_target = null
stop_automated_movement = 0
break
..()
for(var/mob/living/simple_animal/mouse/snack in oview(src, 3))
if(prob(15))
emote(pick("hisses and spits!","mrowls fiercely!","eyes [snack] hungrily."))
break
if(!stat && !resting && !buckled)
turns_since_scan++
if(turns_since_scan > 5)
walk_to(src,0)
turns_since_scan = 0
if((movement_target) && !(isturf(movement_target.loc) || ishuman(movement_target.loc) ))
movement_target = null
stop_automated_movement = 0
if( !movement_target || !(movement_target.loc in oview(src, 3)) )
movement_target = null
stop_automated_movement = 0
for(var/mob/living/simple_animal/mouse/snack in oview(src,3))
if(isturf(snack.loc) && !snack.stat)
movement_target = snack
break
if(movement_target)
stop_automated_movement = 1
walk_to(src,movement_target,0,3)
//RUNTIME IS ALIVE! SQUEEEEEEEE~
/mob/living/simple_animal/cat/Runtime
name = "Runtime"
desc = "Its fur has the look and feel of velvet, and it's tail quivers occasionally."
@@ -1,351 +0,0 @@
/////////////////Juggernaut///////////////
/mob/living/simple_animal/constructarmoured
name = "Juggernaut"
real_name = "Juggernaut"
original_name = "Juggernaut"
desc = "A possessed suit of armour driven by the will of the restless dead"
icon = 'mob.dmi'
icon_state = "armour"
icon_living = "armour"
icon_dead = "shade_dead"
maxHealth = 250
health = 250
speak_emote = list("hisses")
emote_hear = list("wails","screeches")
response_help = "thinks better of touching"
response_disarm = "flails at"
response_harm = "harmlessly punches the"
harm_intent_damage = 0
melee_damage_lower = 30
melee_damage_upper = 30
attacktext = "smashes their armoured gauntlet into"
minbodytemp = 0
maxbodytemp = 4000
min_oxy = 0
max_co2 = 0
max_tox = 0
speed = 3
wall_smash = 1
nopush = 1
a_intent = "harm"
stop_automated_movement = 1
canstun = 0
canweaken = 0
Life()
..()
if(stat == 2)
new /obj/item/weapon/ectoplasm (src.loc)
for(var/mob/M in viewers(src, null))
if((M.client && !( M.blinded )))
M.show_message("\red [src] collapses in a shattered heap ")
ghostize(0)
del src
return
/mob/living/simple_animal/constructarmoured/attackby(var/obj/item/O as obj, var/mob/user as mob)
if(O.force)
if(O.force >= 11)
health -= O.force
for(var/mob/M in viewers(src, null))
if ((M.client && !( M.blinded )))
M.show_message("\red \b [src] has been attacked with the [O] by [user]. ")
else
for(var/mob/M in viewers(src, null))
if ((M.client && !( M.blinded )))
M.show_message("\red \b The [O] bounces harmlessly off of [src]. ")
else
usr << "\red This weapon is ineffective, it does no damage."
for(var/mob/M in viewers(src, null))
if ((M.client && !( M.blinded )))
M.show_message("\red [user] gently taps [src] with the [O]. ")
/mob/living/simple_animal/constructarmoured/Bump(atom/movable/AM as mob|obj, yes)
spawn( 0 )
if ((!( yes ) || now_pushing))
return
now_pushing = 1
if(ismob(AM))
var/mob/tmob = AM
if(istype(tmob, /mob/living/carbon/human) && (FAT in tmob.mutations))
if(prob(5))
src << "\red <B>You fail to push [tmob]'s fat ass out of the way.</B>"
now_pushing = 0
return
if(tmob.nopush)
now_pushing = 0
return
tmob.LAssailant = src
now_pushing = 0
..()
if (!( istype(AM, /atom/movable) ))
return
if (!( now_pushing ))
now_pushing = 1
if (!( AM.anchored ))
var/t = get_dir(src, AM)
if (istype(AM, /obj/structure/window))
if(AM:ini_dir == NORTHWEST || AM:ini_dir == NORTHEAST || AM:ini_dir == SOUTHWEST || AM:ini_dir == SOUTHEAST)
for(var/obj/structure/window/win in get_step(AM,t))
now_pushing = 0
return
step(AM, t)
now_pushing = null
return
return
/mob/living/simple_animal/constructarmoured/attack_animal(mob/living/simple_animal/M as mob)
if(istype(M, /mob/living/simple_animal/constructbuilder))
health += 10
M.emote("mends some of \the <EM>[src]'s</EM> wounds")
else
if(M.melee_damage_upper <= 0)
M.emote("[M.friendly] \the <EM>[src]</EM>")
else
for(var/mob/O in viewers(src, null))
O.show_message("<span class='attack'>\The <EM>[M]</EM> [M.attacktext] \the <EM>[src]</EM>!</span>", 1)
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
health -= damage
/mob/living/simple_animal/constructarmoured/examine()
set src in oview()
var/msg = "<span cass='info'>*---------*\nThis is \icon[src] \a <EM>[src]</EM>!\n"
if (src.health < src.maxHealth)
msg += "<span class='warning'>"
if (src.health >= src.maxHealth/2)
msg += "It looks slightly dented.\n"
else
msg += "<B>It looks severely dented!</B>\n"
msg += "</span>"
msg += "*---------*</span>"
usr << msg
return
/mob/living/simple_animal/constructarmoured/proc/mind_initialize(mob/G)
mind = new
mind.current = src
mind.assigned_role = "Juggernaut"
mind.key = G.key
////////////////////////Wraith/////////////////////////////////////////////
/mob/living/simple_animal/constructwraith
name = "Wraith"
real_name = "Wraith"
original_name = "Wraith"
desc = "A wicked bladed shell contraption piloted by a bound spirit"
icon = 'mob.dmi'
icon_state = "floating"
icon_living = "floating"
icon_dead = "shade_dead"
maxHealth = 75
health = 75
speak_emote = list("hisses")
emote_hear = list("wails","screeches")
response_help = "thinks better of touching"
response_disarm = "flails at"
response_harm = "punches the"
melee_damage_lower = 25
melee_damage_upper = 25
attacktext = "slashes"
minbodytemp = 0
maxbodytemp = 4000
min_oxy = 0
max_co2 = 0
max_tox = 0
speed = -1
a_intent = "harm"
stop_automated_movement = 1
canstun = 0
canweaken = 0
see_in_dark = 7
Life()
..()
if(stat == 2)
new /obj/item/weapon/ectoplasm (src.loc)
for(var/mob/M in viewers(src, null))
if((M.client && !( M.blinded )))
M.show_message("\red [src] collapses in a shattered heap ")
ghostize(0)
del src
return
/mob/living/simple_animal/constructwraith/attackby(var/obj/item/O as obj, var/mob/user as mob)
if(O.force)
health -= O.force
for(var/mob/M in viewers(src, null))
if ((M.client && !( M.blinded )))
M.show_message("\red \b [src] has been attacked with the [O] by [user]. ")
else
usr << "\red This weapon is ineffective, it does no damage."
for(var/mob/M in viewers(src, null))
if ((M.client && !( M.blinded )))
M.show_message("\red [user] gently taps [src] with the [O]. ")
/mob/living/simple_animal/constructwraith/Bump(atom/movable/AM as mob|obj, yes)
spawn( 0 )
if ((!( yes ) || now_pushing))
return
now_pushing = 1
if(ismob(AM))
var/mob/tmob = AM
if(istype(tmob, /mob/living/carbon/human) && (FAT in tmob.mutations))
if(prob(50))
src << "\red <B>You fail to push [tmob]'s fat ass out of the way.</B>"
now_pushing = 0
return
if(tmob.nopush)
now_pushing = 0
return
tmob.LAssailant = src
now_pushing = 0
..()
if (!( istype(AM, /atom/movable) ))
return
if (!( now_pushing ))
now_pushing = 1
if (!( AM.anchored ))
var/t = get_dir(src, AM)
if (istype(AM, /obj/structure/window))
if(AM:ini_dir == NORTHWEST || AM:ini_dir == NORTHEAST || AM:ini_dir == SOUTHWEST || AM:ini_dir == SOUTHEAST)
for(var/obj/structure/window/win in get_step(AM,t))
now_pushing = 0
return
step(AM, t)
now_pushing = null
return
return
/mob/living/simple_animal/constructwraith/attack_animal(mob/living/simple_animal/M as mob)
if(istype(M, /mob/living/simple_animal/constructbuilder))
health += 10
M.emote("mends some of \the <EM>[src]'s</EM> wounds")
else
if(M.melee_damage_upper <= 0)
M.emote("[M.friendly] \the <EM>[src]</EM>")
else
for(var/mob/O in viewers(src, null))
O.show_message("<span class='attack'>\The <EM>[M]</EM> [M.attacktext] \the <EM>[src]</EM>!</span>", 1)
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
health -= damage
/mob/living/simple_animal/constructwraith/examine()
set src in oview()
var/msg = "<span cass='info'>*---------*\nThis is \icon[src] \a <EM>[src]</EM>!\n"
if (src.health < src.maxHealth)
msg += "<span class='warning'>"
if (src.health >= src.maxHealth/2)
msg += "It looks slightly dented.\n"
else
msg += "<B>It looks severely dented!</B>\n"
msg += "</span>"
msg += "*---------*</span>"
usr << msg
return
/mob/living/simple_animal/constructwraith/proc/mind_initialize(mob/G)
mind = new
mind.current = src
mind.assigned_role = "Wraith"
mind.key = G.key
/////////////////////////////Artificer/////////////////////////
/mob/living/simple_animal/constructbuilder
name = "Artificer"
real_name = "Artificer"
original_name = "Artificer"
desc = "A bulbous construct dedicated to building and maintaining The Cult of Nar-Sie's armies"
icon = 'mob.dmi'
icon_state = "artificer"
icon_living = "artificer"
icon_dead = "shade_dead"
maxHealth = 50
health = 50
speak_emote = list("hisses")
emote_hear = list("wails","screeches")
response_help = "thinks better of touching"
response_disarm = "flails at"
response_harm = "viciously beats"
harm_intent_damage = 5
melee_damage_lower = 5
melee_damage_upper = 5
attacktext = "rams"
minbodytemp = 0
maxbodytemp = 4000
min_oxy = 0
max_co2 = 0
max_tox = 0
speed = 0
wall_smash = 1
nopush = 1
a_intent = "harm"
stop_automated_movement = 1
canstun = 0
canweaken = 0
Life()
..()
if(stat == 2)
new /obj/item/weapon/ectoplasm (src.loc)
for(var/mob/M in viewers(src, null))
if((M.client && !( M.blinded )))
M.show_message("\red [src] collapses in a shattered heap ")
ghostize(0)
del src
return
/mob/living/simple_animal/constructbuilder/attack_animal(mob/living/simple_animal/M as mob)
if(istype(M, /mob/living/simple_animal/constructbuilder))
health += 5
M.emote("mends some of \the <EM>[src]'s</EM> wounds")
else
if(M.melee_damage_upper <= 0)
M.emote("[M.friendly] \the <EM>[src]</EM>")
else
for(var/mob/O in viewers(src, null))
O.show_message("<span class='attack'>\The <EM>[M]</EM> [M.attacktext] \the <EM>[src]</EM>!</span>", 1)
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
health -= damage
/mob/living/simple_animal/constructbuilder/examine()
set src in oview()
var/msg = "<span cass='info'>*---------*\nThis is \icon[src] \a <EM>[src]</EM>!\n"
if (src.health < src.maxHealth)
msg += "<span class='warning'>"
if (src.health >= src.maxHealth/2)
msg += "It looks slightly dented.\n"
else
msg += "<B>It looks severely dented!</B>\n"
msg += "</span>"
msg += "*---------*</span>"
usr << msg
return
/mob/living/simple_animal/constructbuilder/proc/mind_initialize(mob/G)
mind = new
mind.current = src
mind.assigned_role = "Artificer"
mind.key = G.key
-365
View File
@@ -1,365 +0,0 @@
//Corgi
/mob/living/simple_animal/corgi
name = "\improper corgi"
real_name = "corgi"
desc = "It's a corgi."
icon_state = "corgi"
icon_living = "corgi"
icon_dead = "corgi_dead"
speak = list("YAP", "Woof!", "Bark!", "AUUUUUU")
speak_emote = list("barks", "woofs")
emote_hear = list("barks", "woofs", "yaps","pants")
emote_see = list("shakes its head", "shivers")
speak_chance = 1
turns_per_move = 10
meat_type = /obj/item/weapon/reagent_containers/food/snacks/meat/corgi
meat_amount = 3
response_help = "pets the"
response_disarm = "bops the"
response_harm = "kicks the"
see_in_dark = 5
var/obj/item/inventory_head
var/obj/item/inventory_back
var/turns_since_scan = 0
var/obj/movement_target
/mob/living/simple_animal/corgi/show_inv(mob/user as mob)
/*
user.machine = src
if(user.stat) return
var/dat = "<div align='center'><b>Inventory of [name]</b></div><p>"
if(inventory_head)
dat += "<br><b>Head:</b> [inventory_head] (<a href='?src=\ref[src];remove_inv=head'>Remove</a>)"
else
dat += "<br><b>Head:</b> <a href='?src=\ref[src];add_inv=head'>Nothing</a>"
if(inventory_back)
dat += "<br><b>Back:</b> [inventory_back] (<a href='?src=\ref[src];remove_inv=back'>Remove</a>)"
else
dat += "<br><b>Back:</b> <a href='?src=\ref[src];add_inv=back'>Nothing</a>"
user << browse(dat, text("window=mob[];size=325x500", name))
onclose(user, "mob[real_name]")
*/
return
/mob/living/simple_animal/corgi/attackby(var/obj/item/O as obj, var/mob/user as mob)
if(inventory_head && inventory_back)
//helmet and armor = 100% protection
if( istype(inventory_head,/obj/item/clothing/head/helmet) && istype(inventory_back,/obj/item/clothing/suit/armor) )
if( O.force )
usr << "\red This animal is wearing too much armor. You can't cause /him any damage."
for (var/mob/M in viewers(src, null))
M.show_message("\red \b [user] hits [src] with the [O], however [src] is too armored.")
else
usr << "\red This animal is wearing too much armor. You can't reach its skin."
for (var/mob/M in viewers(src, null))
M.show_message("\red [user] gently taps [src] with the [O]. ")
if(prob(15))
emote("looks at [user] with [pick("an amused","an annoyed","a confused","a resentful", "a happy", "an excited")] expression on \his face")
return
..()
/mob/living/simple_animal/corgi/Topic(href, href_list)
if(usr.stat) return
//Removing from inventory
if(href_list["remove_inv"])
if(get_dist(src,usr) > 1 || !(ishuman(usr) || ismonkey(usr) || isrobot(usr) || isalienadult(usr)))
return
var/remove_from = href_list["remove_inv"]
switch(remove_from)
if("head")
if(inventory_head)
name = real_name
desc = initial(desc)
speak = list("YAP", "Woof!", "Bark!", "AUUUUUU")
speak_emote = list("barks", "woofs")
emote_hear = list("barks", "woofs", "yaps","pants")
emote_see = list("shakes its head", "shivers")
desc = "It's a corgi."
inventory_head.loc = src.loc
inventory_head = null
else
usr << "\red There is nothing to remove from its [remove_from]."
return
if("back")
if(inventory_back)
inventory_back.loc = src.loc
inventory_back = null
else
usr << "\red There is nothing to remove from its [remove_from]."
return
//show_inv(usr) //Commented out because changing Ian's name and then calling up his inventory opens a new inventory...which is annoying.
//Adding things to inventory
else if(href_list["add_inv"])
if(get_dist(src,usr) > 1 || !(ishuman(usr) || ismonkey(usr) || isrobot(usr) || isalienadult(usr)))
return
var/add_to = href_list["add_inv"]
if(!usr.get_active_hand())
usr << "\red You have nothing in your hand to put on its [add_to]."
return
switch(add_to)
if("head")
if(inventory_head)
usr << "\red It's is already wearing something."
return
else
var/obj/item/item_to_add = usr.get_active_hand()
if(!item_to_add)
return
//Corgis are supposed to be simpler, so only a select few objects can actually be put
//to be compatible with them. The objects are below.
//Many hats added, Some will probably be removed, just want to see which ones are popular.
var/list/allowed_types = list(
/obj/item/clothing/head/helmet,
/obj/item/clothing/glasses/sunglasses,
/obj/item/clothing/head/caphat,
/obj/item/clothing/head/collectable/captain,
/obj/item/clothing/head/that,
/obj/item/clothing/head/that,
/obj/item/clothing/head/kitty,
/obj/item/clothing/head/collectable/kitty,
/obj/item/clothing/head/rabbitears,
/obj/item/clothing/head/collectable/rabbitears,
/obj/item/clothing/head/beret,
/obj/item/clothing/head/collectable/beret,
/obj/item/clothing/head/det_hat,
/obj/item/clothing/head/nursehat,
/obj/item/clothing/head/pirate,
/obj/item/clothing/head/collectable/pirate,
/obj/item/clothing/head/ushanka,
/obj/item/clothing/head/chefhat,
/obj/item/clothing/head/collectable/chef,
/obj/item/clothing/head/collectable/police,
/obj/item/clothing/head/wizard/fake,
/obj/item/clothing/head/wizard,
/obj/item/clothing/head/collectable/wizard,
/obj/item/clothing/head/collectable/hardhat,
/obj/item/weapon/bedsheet,
/obj/item/clothing/head/helmet/space/santahat,
/obj/item/clothing/head/collectable/paper,
)
if( ! ( item_to_add.type in allowed_types ) )
usr << "\red It doesn't seem too keen on wearing that item."
return
usr.drop_item()
item_to_add.loc = src
src.inventory_head = item_to_add
rebuild_appearance()
//Various hats and items (worn on his head) change Ian's behaviour. His attributes are reset when a HAT is removed.
switch(inventory_head && inventory_head.type)
if(/obj/item/clothing/head/caphat, /obj/item/clothing/head/collectable/captain)
name = "Captain [real_name]"
desc = "Probably better than the last captain."
if(/obj/item/clothing/head/kitty, /obj/item/clothing/head/collectable/kitty)
name = "Runtime"
emote_see = list("coughs up a furball", "stretches")
emote_hear = list("purrs")
speak = list("Purrr", "Meow!", "MAOOOOOW!", "HISSSSS", "MEEEEEEW")
desc = "It's a cute little kitty-cat! ... wait ... what the hell?"
if(/obj/item/clothing/head/rabbitears, /obj/item/clothing/head/collectable/rabbitears)
name = "Hoppy"
emote_see = list("twitches its nose", "hops around a bit")
desc = "This is hoppy. It's a corgi-...urmm... bunny rabbit"
if(/obj/item/clothing/head/beret, /obj/item/clothing/head/collectable/beret)
name = "Yann"
desc = "Mon dieu! C'est un chien!"
speak = list("le woof!", "le bark!", "JAPPE!!")
emote_see = list("cowers in fear", "surrenders", "plays dead","looks as though there is a wall in front of /him")
if(/obj/item/clothing/head/det_hat)
name = "Detective [real_name]"
desc = "[name] sees through your lies..."
emote_see = list("investigates the area","sniffs around for clues","searches for scooby snacks")
if(/obj/item/clothing/head/nursehat)
name = "Nurse [real_name]"
desc = "[name] needs 100cc of beef jerky...STAT!"
if(/obj/item/clothing/head/pirate, /obj/item/clothing/head/collectable/pirate)
name = "'[pick("Ol'","Scurvy","Black","Rum","Gammy","Bloody","Gangrene","Death","Long-John")] [pick("kibble","leg","beard","tooth","poop-deck","Threepwood","Le Chuck","corsair","Silver","Crusoe")]'"
desc = "Yaarghh!! Thar' be a scurvy dog!"
emote_see = list("hunts for treasure","stares coldly...","gnashes his tiny corgi teeth")
emote_hear = list("growls ferociously", "snarls")
speak = list("Arrrrgh!!","Grrrrrr!")
if(/obj/item/clothing/head/ushanka)
name = "[pick("Comrade","Commissar","Glorious Leader")] [real_name]"
desc = "A follower of Karl Barx."
emote_see = list("contemplates the failings of the capitalist economic model", "ponders the pros and cons of vangaurdism")
if(/obj/item/clothing/head/collectable/police)
name = "Officer [real_name]"
emote_see = list("drools","looks for donuts")
desc = "Stop right there criminal scum!"
if(/obj/item/clothing/head/wizard/fake, /obj/item/clothing/head/wizard, /obj/item/clothing/head/collectable/wizard)
name = "Grandwizard [real_name]"
speak = list("YAP", "Woof!", "Bark!", "AUUUUUU", "EI NATH!")
if(/obj/item/weapon/bedsheet)
name = "\improper Ghost"
speak = list("WoooOOOooo~","AUUUUUUUUUUUUUUUUUU")
emote_see = list("stumbles around", "shivers")
emote_hear = list("howls","groans")
desc = "Spooky!"
if(/obj/item/clothing/head/helmet/space/santahat)
name = "Rudolph the Red-Nosed Corgi"
emote_hear = list("barks christmas songs", "yaps")
desc = "He has a very shiny nose."
if("back")
if(inventory_back)
usr << "\red It's already wearing something."
return
else
var/obj/item/item_to_add = usr.get_active_hand()
if(!item_to_add)
return
//Corgis are supposed to be simpler, so only a select few objects can actually be put
//to be compatible with them. The objects are below.
var/list/allowed_types = list(
/obj/item/clothing/suit/armor/vest,
/obj/item/device/radio
)
if( ! ( item_to_add.type in allowed_types ) )
usr << "\red This object won't fit."
return
usr.drop_item()
item_to_add.loc = src
src.inventory_back = item_to_add
rebuild_appearance()
//show_inv(usr) //Commented out because changing Ian's name and then calling up his inventory opens a new inventory...which is annoying.
else
..()
/mob/living/simple_animal/corgi/Life()
..()
rebuild_appearance()
//Feeding, chasing food, FOOOOODDDD
if(!stat && !resting && !buckled)
turns_since_scan++
if(turns_since_scan > 5)
turns_since_scan = 0
if((movement_target) && !(isturf(movement_target.loc) || ishuman(movement_target.loc) ))
movement_target = null
stop_automated_movement = 0
if( !movement_target || !(movement_target.loc in oview(src, 3)) )
movement_target = null
stop_automated_movement = 0
for(var/obj/item/weapon/reagent_containers/food/snacks/S in oview(src,3))
if(isturf(S.loc) || ishuman(S.loc))
movement_target = S
break
if(movement_target)
stop_automated_movement = 1
step_to(src,movement_target,1)
sleep(3)
step_to(src,movement_target,1)
sleep(3)
step_to(src,movement_target,1)
if(movement_target) //Not redundant due to sleeps, Item can be gone in 6 decisecomds
if (movement_target.loc.x < src.x)
dir = WEST
else if (movement_target.loc.x > src.x)
dir = EAST
else if (movement_target.loc.y < src.y)
dir = SOUTH
else if (movement_target.loc.y > src.y)
dir = NORTH
else
dir = SOUTH
if(isturf(movement_target.loc) )
movement_target.attack_animal(src)
else if(ishuman(movement_target.loc) )
if(prob(20))
emote("stares at the [movement_target] that [movement_target.loc] has with a sad puppy-face")
if(prob(1))
emote(pick("dances around","chases its tail"))
spawn(0)
for(var/i in list(1,2,4,8,4,2,1,2,4,8,4,2,1,2,4,8,4,2))
dir = i
sleep(1)
/obj/item/weapon/reagent_containers/food/snacks/meat/corgi
name = "Corgi meat"
desc = "Tastes like... well you know..."
/mob/living/simple_animal/corgi/Bump(atom/movable/AM as mob|obj, yes)
spawn( 0 )
if ((!( yes ) || now_pushing))
return
now_pushing = 1
if(ismob(AM))
var/mob/tmob = AM
if(istype(tmob, /mob/living/carbon/human) && (FAT in tmob.mutations))
if(prob(70))
src << "\red <B>You fail to push [tmob]'s fat ass out of the way.</B>"
now_pushing = 0
return
if(tmob.nopush)
now_pushing = 0
return
tmob.LAssailant = src
now_pushing = 0
..()
if (!( istype(AM, /atom/movable) ))
return
if (!( now_pushing ))
now_pushing = 1
if (!( AM.anchored ))
var/t = get_dir(src, AM)
if (istype(AM, /obj/structure/window))
if(AM:ini_dir == NORTHWEST || AM:ini_dir == NORTHEAST || AM:ini_dir == SOUTHWEST || AM:ini_dir == SOUTHEAST)
for(var/obj/structure/window/win in get_step(AM,t))
now_pushing = 0
return
step(AM, t)
now_pushing = null
return
return
//PC stuff-Sieve
/mob/living/simple_animal/corgi/proc/mind_initialize(mob/G)
mind = new
mind.current = src
mind.assigned_role = "Corgi"
mind.key = G.key
/mob/living/simple_animal/corgi/attackby(var/obj/item/O as obj, var/mob/user as mob) //Marker -Agouri
if(istype(O, /obj/item/weapon/newspaper))
if(!stat)
for(var/mob/M in viewers(user, null))
if ((M.client && !( M.blinded )))
M.show_message("\blue [user] baps [name] on the nose with the rolled up [O]")
spawn(0)
for(var/i in list(1,2,4,8,4,2,1,2))
dir = i
sleep(1)
else
..()
//IAN! SQUEEEEEEEEE~
/mob/living/simple_animal/corgi/Ian
name = "Ian"
real_name = "Ian" //Intended to hold the name without altering it.
gender = "male"
desc = "It's a somewhat notorious corgi."
response_help = "pets"
response_disarm = "bops"
response_harm = "kicks"
-31
View File
@@ -1,31 +0,0 @@
//Look Sir, free crabs!
/mob/living/simple_animal/crab
name = "crab"
desc = "A hard-shelled crustacean. Seems quite content to lounge around all the time."
icon_state = "crab"
icon_living = "crab"
icon_dead = "crab_dead"
speak_emote = list("clicks")
emote_hear = list("clicks")
emote_see = list("clacks")
speak_chance = 1
turns_per_move = 5
meat_type = /obj/item/weapon/reagent_containers/food/snacks/meat
response_help = "pets the"
response_disarm = "gently pushes aside the"
response_harm = "stomps the"
stop_automated_movement = 1
friendly = "pinches"
var/obj/item/inventory_head
var/obj/item/inventory_mask
/mob/living/simple_animal/crab/Life()
..()
//CRAB movement
if(!ckey && !stat)
if(isturf(src.loc) && !resting && !buckled) //This is so it only moves if it's not inside a closet, gentics machine, etc.
turns_since_move++
if(turns_since_move >= turns_per_move)
Move(get_step(src,pick(4,8)))
turns_since_move = 0
rebuild_appearance()
-152
View File
@@ -1,152 +0,0 @@
/mob/living/simple_animal/mouse
name = "mouse"
real_name = "mouse"
desc = "It's a small, disease-ridden rodent."
icon_state = "mouse_gray"
icon_living = "mouse_gray"
icon_dead = "mouse_gray_dead"
speak = list("Squeek!","SQUEEK!","Squeek?")
speak_emote = list("squeeks","squeeks","squiks")
emote_hear = list("squeeks","squeaks","squiks")
emote_see = list("runs in a circle", "shakes", "scritches at something")
speak_chance = 1
turns_per_move = 5
see_in_dark = 6
health = 5
meat_type = /obj/item/weapon/reagent_containers/food/snacks/meat
response_help = "pets the"
response_disarm = "gently pushes aside the"
response_harm = "splats the"
density = 0
var/color //brown, gray and white
layer = 2.5 //so they can hide under objects
swap_on_mobbump = 0
min_oxy = 16 //Require atleast 16kPA oxygen
minbodytemp = 223 //Below -50 Degrees Celcius
maxbodytemp = 323 //Above 50 Degrees Celcius
/mob/living/simple_animal/mouse/Life()
..()
if(!stat && prob(speak_chance))
for(var/mob/M in view())
M << 'sound/effects/mousesqueek.ogg'
/mob/living/simple_animal/mouse/gray
color = "gray"
icon_state = "mouse_gray"
/mob/living/simple_animal/mouse/white
color = "white"
icon_state = "mouse_white"
/mob/living/simple_animal/mouse/brown
color = "brown"
icon_state = "mouse_brown"
/mob/living/simple_animal/mouse/New()
if(!color)
color = pick( list("brown","gray","white") )
icon_state = "mouse_[color]"
icon_living = "mouse_[color]"
icon_dead = "mouse_[color]_dead"
desc = "It's a small [color] rodent, often seen hiding in maintenance areas and making a nuisance of itself."
/mob/living/simple_animal/mouse/proc/splat()
src.health = 0
src.stat = DEAD
src.icon_dead = "mouse_[color]_splat"
src.icon_state = "mouse_[color]_splat"
/proc/ismouse(var/obj/O)
return istype(O,/mob/living/simple_animal/mouse)
//copy paste from alien/larva, if that func is updated please update this one also
/mob/living/simple_animal/mouse/verb/ventcrawl()
set name = "Crawl through Vent"
set desc = "Enter an air vent and crawl through the pipe system."
set category = "Mouse"
// if(!istype(V,/obj/machinery/atmoalter/siphs/fullairsiphon/air_vent))
// return
var/obj/machinery/atmospherics/unary/vent_pump/vent_found
var/welded = 0
for(var/obj/machinery/atmospherics/unary/vent_pump/v in range(1,src))
if(!v.welded)
vent_found = v
break
else
welded = 1
if(vent_found)
if(vent_found.network&&vent_found.network.normal_members.len)
var/list/vents = list()
for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in vent_found.network.normal_members)
if(temp_vent.loc == loc)
continue
vents.Add(temp_vent)
var/list/choices = list()
for(var/obj/machinery/atmospherics/unary/vent_pump/vent in vents)
if(vent.loc.z != loc.z)
continue
var/atom/a = get_turf(vent)
choices.Add(a.loc)
var/turf/startloc = loc
var/obj/selection = input("Select a destination.", "Duct System") in choices
var/selection_position = choices.Find(selection)
if(loc==startloc)
var/obj/target_vent = vents[selection_position]
if(target_vent)
for(var/mob/O in oviewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("<B>[src] scrambles into the ventillation ducts!</B>"), 1)
loc = target_vent.loc
else
src << "\blue You need to remain still while entering a vent."
else
src << "\blue This vent is not connected to anything."
else if(welded)
src << "\red That vent is welded."
else
src << "\blue You must be standing on or beside an air vent to enter it."
return
//copy paste from alien/larva, if that func is updated please update this one alsoghost
/mob/living/simple_animal/mouse/verb/hide()
set name = "Hide"
set desc = "Allows to hide beneath tables or certain items. Toggled on or off."
set category = "Mouse"
if (layer != TURF_LAYER+0.2)
layer = TURF_LAYER+0.2
src << text("\blue You are now hiding.")
for(var/mob/O in oviewers(src, null))
if ((O.client && !( O.blinded )))
O << text("<B>[] scurries to the ground!</B>", src)
else
layer = MOB_LAYER
src << text("\blue You have stopped hiding.")
for(var/mob/O in oviewers(src, null))
if ((O.client && !( O.blinded )))
O << text("[] slowly peaks up from the ground...", src)
//make mice fit under tables etc? this was hacky, and not working
/*
/mob/living/simple_animal/mouse/Move(var/dir)
var/turf/target_turf = get_step(src,dir)
//CanReachThrough(src.loc, target_turf, src)
var/can_fit_under = 0
if(target_turf.ZCanPass(get_turf(src),1))
can_fit_under = 1
..(dir)
if(can_fit_under)
src.loc = target_turf
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
*/
mob/living/simple_animal/mouse/restrained() //Hotfix to stop mice from doing things with MouseDrop
return 1
-94
View File
@@ -1,94 +0,0 @@
/mob/living/simple_animal/parrot
name = "\improper Parrot"
desc = "It's a parrot! No dirty words!"
icon = 'mob.dmi'
icon_state = "parrot"
icon_living = "parrot"
icon_dead = "parrot_dead"
speak = list("Hi","Hello!","Cracker?","BAWWWWK george mellons griffing me")
speak_emote = list("squawks","says","yells")
emote_hear = list("squawks.","bawks.")
emote_see = list("flutters its wings.", "glares at you.")
speak_chance = 5
turns_per_move = 5
meat_type = /obj/item/weapon/reagent_containers/food/snacks/cracker/
response_help = "pets the"
response_disarm = "gently moves aside the"
response_harm = "swats the"
min_oxy = 16 //Require atleast 16kPA oxygen
minbodytemp = 223 //Below -50 Degrees Celcius
maxbodytemp = 323 //Above 50 Degrees Celcius
l_ear = new /obj/item/device/radio/headset/headset_eng()
/mob/living/simple_animal/parrot/DrProfessor
name = "Doctor Professor Parrot, PhD"
desc = "That's the Doctor Professor. He has more degrees than all of the engineering team put together, and has several published papers on quantum cracker theory."
speak = list(":e Check the singlo, you chucklefucks!",":e Wire the solars, you lazy bums!",":e WHO TOOK THE DAMN RIG SUIT?",":e OH GOD ITS FREE CALL THE SHUTTLE",":e Open secure storage please.",":e I think something happened to the containment field...")
response_harm = "is attacked in the face by"
/obj/item/weapon/reagent_containers/food/snacks/cracker/
name = "Cracker"
desc = "It's a salted cracker."
/mob/living/simple_animal/parrot/show_inv(mob/user as mob)
user.machine = src
if(user.stat) return
var/dat = "<div align='center'><b>Inventory of [name]</b></div><p>"
if(l_ear)
dat += "<br><b>Headset:</b> [l_ear] (<a href='?src=\ref[src];remove_inv=ears'>Remove</a>)"
else
dat += "<br><b>Headset:</b> <a href='?src=\ref[src];add_inv=ears'>Nothing</a>"
user << browse(dat, text("window=mob[];size=325x500", name))
onclose(user, "mob[real_name]")
return
/mob/living/simple_animal/parrot/Topic(href, href_list)
if(usr.stat) return
//Removing from inventory
if(href_list["remove_inv"])
if(get_dist(src,usr) > 1 || !(ishuman(usr) || ismonkey(usr) || isrobot(usr) || isalienadult(usr)))
return
var/remove_from = href_list["remove_inv"]
switch(remove_from)
if("ears")
if(l_ear)
src.say(":e BAWWWWWK LEAVE THE HEADSET BAWKKKKK!")
l_ear.loc = src.loc
l_ear = null
else
usr << "\red There is nothing to remove from its [remove_from]."
return
//Adding things to inventory
else if(href_list["add_inv"])
if(get_dist(src,usr) > 1 || !(ishuman(usr) || ismonkey(usr) || isrobot(usr) || isalienadult(usr)))
return
var/add_to = href_list["add_inv"]
if(!usr.get_active_hand())
usr << "\red You have nothing in your hand to put on its [add_to]."
return
switch(add_to)
if("ears")
if(l_ear)
usr << "\red It's already wearing something."
return
else
var/obj/item/item_to_add = usr.get_active_hand()
if(!item_to_add)
return
if( !istype(item_to_add, /obj/item/device/radio/headset) )
usr << "\red This object won't fit."
return
usr.drop_item()
item_to_add.loc = src
src.l_ear = item_to_add
else
..()
-59
View File
@@ -1,59 +0,0 @@
/mob/living/simple_animal/shade
name = "Shade"
desc = "A bound spirit"
icon = 'mob.dmi'
icon_state = "shade"
icon_living = "shade"
icon_dead = "shade_dead"
maxHealth = 50
health = 50
speak_emote = list("hisses")
emote_hear = list("wails","screeches")
response_help = "puts their hand through"
response_disarm = "flails at"
response_harm = "punches the"
melee_damage_lower = 5
melee_damage_upper = 15
attacktext = "drains the life from"
minbodytemp = 0
maxbodytemp = 4000
min_oxy = 0
max_co2 = 0
max_tox = 0
speed = -1
stop_automated_movement = 1
Life()
..()
if(stat == 2)
new /obj/item/weapon/ectoplasm (src.loc)
for(var/mob/M in viewers(src, null))
if((M.client && !( M.blinded )))
M.show_message("\red [src] lets out a contented sigh as their form unwinds. ")
ghostize(0)
del src
return
attackby(var/obj/item/O as obj, var/mob/user as mob) //Marker -Agouri
if(istype(O, /obj/item/device/soulstone))
O.transfer_soul("SHADE", src, user)
else
if(O.force)
health -= O.force
for(var/mob/M in viewers(src, null))
if ((M.client && !( M.blinded )))
M.show_message("\red \b [src] has been attacked with the [O] by [user]. ")
else
usr << "\red This weapon is ineffective, it does no damage."
for(var/mob/M in viewers(src, null))
if ((M.client && !( M.blinded )))
M.show_message("\red [user] gently taps [src] with the [O]. ")
return
/mob/living/simple_animal/shade/proc/mind_initialize(mob/G)
mind = new
mind.current = src
mind.assigned_role = "Shade"
mind.key = G.key
@@ -1,58 +0,0 @@
/mob/living/simple_animal
name = "animal"
icon = 'animal.dmi'
var/icon_living = ""
var/icon_dead = ""
var/icon_gib = null //We only try to show a gibbing animation if this exists.
maxHealth = 20
var/list/speak = list()
var/list/speak_emote = list()// Emotes while speaking IE: Ian [emote], [text] -- Ian barks, "WOOF!". Spoken text is generated from the speak variable.
var/speak_chance = 0
var/list/emote_hear = list() //EHearable emotes
var/list/emote_see = list() //Unlike speak_emote, the list of things in this variable only show by themselves with no spoken text. IE: Ian barks, Ian yaps
health = 20
var/turns_per_move = 1
var/turns_since_move = 0
universal_speak = 1
var/meat_amount = 0
var/meat_type
var/stop_automated_movement = 0 //Use this to temporarely stop random movement or to if you write special movement code for animals.
var/stop_automated_movement_when_pulled = 1 //When set to 1 this stops the animal from moving when someone is pulling it.
//Interaction
var/response_help = "You try to help"
var/response_disarm = "You try to disarm"
var/response_harm = "You try to hurt"
var/harm_intent_damage = 3
//Temperature effect
var/minbodytemp = 270
var/maxbodytemp = 325
var/heat_damage_per_tick = 3 //amount of damage applied if animal's body temperature is higher than maxbodytemp
var/cold_damage_per_tick = 2 //same as heat_damage_per_tick, only if the bodytemperature it's lower than minbodytemp
//Atmos effect - Yes, you can make creatures that require plasma or co2 to survive. N2O is a trace gas and handled separately, hence why it isn't here. It'd be hard to add it. Hard and me don't mix (Yes, yes make all the dick jokes you want with that.) - Errorage
var/min_oxy = 5
var/max_oxy = 0 //Leaving something at 0 means it's off - has no maximum
var/min_tox = 0
var/max_tox = 1
var/min_co2 = 0
var/max_co2 = 5
var/min_n2 = 0
var/max_n2 = 0
var/unsuitable_atoms_damage = 2 //This damage is taken when atmos doesn't fit all the requirements above
//LETTING SIMPLE ANIMALS ATTACK? WHAT COULD GO WRONG. Defaults to zero so Ian can still be cuddly
var/melee_damage_lower = 0
var/melee_damage_upper = 0
var/attacktext = "attacks"
var/attack_sound = null
var/friendly = "nuzzles" //If the mob does no damage with it's attack
var/wall_smash = 0 //if they can smash walls
var/speed = 5
var/can_open_doors = 0 //door opening kind of guy
var/obj/item/device/radio/headset/l_ear = null
@@ -1,95 +0,0 @@
/mob/living/simple_animal/Life()
//Health
if(stat == DEAD)
if(health > 0)
icon_state = icon_living
stat = CONSCIOUS
density = 1
return
else if(health < 1)
Die()
else if(health > maxHealth)
health = maxHealth
//Movement
if(!ckey && !stop_automated_movement)
if(isturf(src.loc) && !resting && !buckled && canmove) //This is so it only moves if it's not inside a closet, gentics machine, etc.
turns_since_move++
if(turns_since_move >= turns_per_move)
Move(get_step(src,pick(cardinal)))
turns_since_move = 0
//Speaking
if(!ckey && prob(speak_chance))
var/length = (speak ? speak.len : 0) + (emote_see ? emote_see.len : 0) + (emote_hear ? emote_hear.len : 0)
if(speak && speak.len && prob((speak.len / length) * 100))
src.say_auto(pick(speak))
else if(emote_see && emote_see.len && prob((emote_see.len / length) * 100))
emote("auto",1,pick(emote_see))
else if(emote_hear && emote_hear.len)
emote("auto",2,pick(emote_hear))
//var/act,var/m_type=1,var/message = null
//Atmos
var/atmos_suitable = 1
var/atom/A = src.loc
if(isturf(A))
var/turf/T = A
var/areatemp = T.temperature
if( abs(areatemp - bodytemperature) > 50 )
var/diff = areatemp - bodytemperature
diff = diff / 5
//world << "changed from [bodytemperature] by [diff] to [bodytemperature + diff]"
bodytemperature += diff
if(istype(T,/turf/simulated))
var/turf/simulated/ST = T
if(ST.air)
var/tox = ST.air.toxins
var/oxy = ST.air.oxygen
var/n2 = ST.air.nitrogen
var/co2 = ST.air.carbon_dioxide
if(min_oxy)
if(oxy < min_oxy)
atmos_suitable = 0
if(max_oxy)
if(oxy > max_oxy)
atmos_suitable = 0
if(min_tox)
if(tox < min_tox)
atmos_suitable = 0
if(max_tox)
if(tox > max_tox)
atmos_suitable = 0
if(min_n2)
if(n2 < min_n2)
atmos_suitable = 0
if(max_n2)
if(n2 > max_n2)
atmos_suitable = 0
if(min_co2)
if(co2 < min_co2)
atmos_suitable = 0
if(max_co2)
if(co2 > max_co2)
atmos_suitable = 0
//Atmos effect
if(bodytemperature < minbodytemp)
health -= cold_damage_per_tick
if(prob(15))
emote("auto",1,"shivers![prob(50) ? "[pick(" It seems quite cold."," It seems to be freezing.")]" : ""]")
else if(bodytemperature > maxbodytemp)
health -= heat_damage_per_tick
if(prob(15))
emote("auto",1,"sweats![prob(50) ? "[pick(" It seems quite hot."," It seems to be burning up.")]" : ""]")
if(!atmos_suitable)
health -= unsuitable_atoms_damage
if(prob(15))
emote("auto",1,"gasps![prob(50) ? "[pick(" It seems unable to breath."," It seems to be asphyxiating.")]" : ""]")
@@ -1,217 +0,0 @@
/mob/living/simple_animal/Login()
if(src && src.client)
src.client.screen = null
..()
/mob/living/simple_animal/Bumped(AM as mob|obj)
if(!AM) return
if(isturf(src.loc) && !resting && !buckled)
if(ismob(AM))
var/newamloc = src.loc
src.loc = AM:loc
AM:loc = newamloc
else
..()
/mob/living/simple_animal/gib()
if(meat_amount && meat_type)
for(var/i = 0; i < meat_amount; i++)
new meat_type(src.loc)
..()
/mob/living/simple_animal/say_quote(var/text)
if(speak_emote && speak_emote.len)
var/emote = pick(speak_emote)
if(emote)
return "<b>[src]</b> [emote], \"[text]\""
return "says, \"[text]\"";
//when talking, simple_animals can only understand each other
/mob/living/simple_animal/say(var/message)
for(var/mob/M in view(src,7))
if(istype(M, src.type) || M.universal_speak)
M << say_quote(message)
else
M << "<b>[src]</b> [pick("makes some strange noises.","makes some strange noises.","makes some strange noises.","makes a small commotion.","kicks up a fuss about something.")]"
return
//when talking, simple_animals can only understand each other
/mob/living/simple_animal/proc/say_auto(var/message)
for(var/mob/M in view(src,7))
M << "<b>[src]</b> [pick(speak_emote)], \"[message]\""
/mob/living/simple_animal/emote(var/act = "auto", var/m_type=1, var/message = null)
switch(act)
if ("scream")
message = "<B>[src]</B> makes a loud and pained whimper"
m_type = 2
if ("custom")
var/input = copytext(sanitize(input("Choose an emote to display.") as text|null),1,MAX_MESSAGE_LEN)
if (!input)
return
var/input2 = input("Is this a visible or hearable emote?") in list("Visible","Hearable")
if (input2 == "Visible")
m_type = 1
else if (input2 == "Hearable")
m_type = 2
else
alert("Unable to use this emote, must be either hearable or visible.")
return
message = "<B>[src]</B> [input]"
if ("me")
if(silent)
return
if (src.client && (client.muted || client.muted_complete))
src << "You are muted."
return
if (stat)
return
if(!(message))
return
else
if(cmptext(copytext(message, 1, 3), "v "))
message = "<B>[src]</B> [copytext(message, 3)]"
m_type = 1
else if(cmptext(copytext(message, 1, 3), "h "))
message = "<B>[src]</B> [copytext(message, 3)]"
m_type = 2
else
message = "<B>[src]</B> [message]"
if("auto")
message = "<B>[src]</B> [message]"
/*else
if(!message)
src << "Invalid Emote: [act]"*/
if ((message && src.stat == 0))
if (m_type & 1)
for(var/mob/O in viewers(src, null))
O.show_message(message, m_type)
else
for(var/mob/O in hearers(src, null))
O.show_message(message, m_type)
return
/mob/living/simple_animal/attack_animal(mob/living/simple_animal/M as mob)
if(M.melee_damage_upper == 0)
M.emote("[M.friendly] [src]")
else
for(var/mob/O in viewers(src, null))
O.show_message("\red <B>[M]</B> [M.attacktext] [src]!", 1)
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
health -= damage
/mob/living/simple_animal/bullet_act(var/obj/item/projectile/Proj)
if(!Proj) return
src.health -= Proj.damage
return 0
/mob/living/simple_animal/attack_hand(mob/living/carbon/human/M as mob)
..()
switch(M.a_intent)
if ("help")
if (health > 0)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message("\blue [M] [response_help] [src]")
if ("grab")
if (M == src)
return
if (nopush)
return
var/obj/item/weapon/grab/G = new /obj/item/weapon/grab( M )
G.assailant = M
if (M.hand)
M.l_hand = G
else
M.r_hand = G
G.layer = 20
G.affecting = src
grabbed_by += G
G.synch()
LAssailant = M
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red [] has grabbed [] passively!", M, src), 1)
if ("hurt")
health -= harm_intent_damage
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message("\red [M] [response_harm] [src]")
if ("disarm")
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message("\blue [M] [response_disarm] [src]")
return
/mob/living/simple_animal/attackby(var/obj/item/O as obj, var/mob/user as mob) //Marker -Agouri
if(istype(O, /obj/item/stack/medical))
if(stat != DEAD)
var/obj/item/stack/medical/MED = O
if(health < maxHealth)
if(MED.amount >= 1)
health = min(maxHealth, health + MED.heal_brute)
MED.amount -= 1
if(MED.amount <= 0)
del(MED)
for(var/mob/M in viewers(src, null))
if ((M.client && !( M.blinded )))
M.show_message("\blue [user] applies the [MED] on [src]")
else
user << "\blue this [src] is dead, medical items won't bring it back to life."
else
if(O.force)
health -= O.force
for(var/mob/M in viewers(src, null))
if ((M.client && !( M.blinded )))
M.show_message("\red \b [src] has been attacked with the [O] by [user]. ")
else
usr << "\red This weapon is ineffective, it does no damage."
for(var/mob/M in viewers(src, null))
if ((M.client && !( M.blinded )))
M.show_message("\red [user] gently taps [src] with the [O]. ")
/mob/living/simple_animal/movement_delay()
return speed
/mob/living/simple_animal/Stat()
..()
statpanel("Status")
stat(null, "Health: [round((health / maxHealth) * 100)]%")
/mob/living/simple_animal/proc/Die()
icon_state = icon_dead
stat = DEAD
density = 0
src << "\red You have died!"
verbs -= /mob/living/simple_animal/say
return
/mob/living/simple_animal/ex_act(severity)
flick("flash", flash)
switch (severity)
if (1.0)
health -= 500
gib()
return
if (2.0)
health -= 60
if(3.0)
health -= 30
/proc/issimpleanimal(var/mob/AM)
return istype(AM,/mob/living/simple_animal)
-199
View File
@@ -1,199 +0,0 @@
/mob/living/simple_animal/space_worm
name = "space worm segment"
desc = "A part of a space worm."
icon = 'critter.dmi'
icon_state = "spaceworm"
icon_living = "spaceworm"
icon_dead = "spacewormdead"
speak_emote = list("transmits") //not supposed to be used under AI control
emote_hear = list("transmits") //I'm just adding it so it doesn't runtime if controlled by player who speaks
response_help = "touches"
response_disarm = "flails at"
response_harm = "punches the"
harm_intent_damage = 2
maxHealth = 30
health = 30
stop_automated_movement = 1
animate_movement = SYNC_STEPS
minbodytemp = 0
maxbodytemp = 350
min_oxy = 0
max_co2 = 0
max_tox = 0
a_intent = "harm" //so they don't get pushed around
nopush = 1
wall_smash = 1
speed = -1
var/mob/living/simple_animal/space_worm/previous //next/previous segments, correspondingly
var/mob/living/simple_animal/space_worm/next //head is the nextest segment
var/stomachProcessProbability = 50
var/digestionProbability = 20
var/flatPlasmaValue = 5 //flat plasma amount given for non-items
var/atom/currentlyEating //what the worm is currently eating
var/eatingDuration = 0 //how long he's been eating it for
head
name = "space worm head"
icon_state = "spacewormhead"
icon_living = "spacewormhead"
icon_dead = "spacewormdead"
maxHealth = 20
health = 20
melee_damage_lower = 10
melee_damage_upper = 15
attacktext = "bites"
animate_movement = SLIDE_STEPS
New(var/location, var/segments = 6)
..()
var/mob/living/simple_animal/space_worm/current = src
for(var/i = 1 to segments)
var/mob/living/simple_animal/space_worm/newSegment = new /mob/living/simple_animal/space_worm(loc)
current.Attach(newSegment)
current = newSegment
update_icon()
if(stat == CONSCIOUS || stat == UNCONSCIOUS)
icon_state = "spacewormhead[previous?1:0]"
if(previous)
dir = get_dir(previous,src)
else
icon_state = "spacewormheaddead"
Life()
..()
if(next && !(next in view(src,1)))
Detach()
if(stat == DEAD) //dead chunks fall off and die immediately
if(previous)
previous.Detach()
if(next)
Detach(1)
if(prob(stomachProcessProbability))
ProcessStomach()
update_icon()
return
Del() //if a chunk a destroyed, make a new worm out of the split halves
if(previous)
previous.Detach()
..()
Move()
var/attachementNextPosition = loc
if(..())
if(previous)
previous.Move(attachementNextPosition)
update_icon()
Bump(atom/obstacle)
if(currentlyEating != obstacle)
currentlyEating = obstacle
eatingDuration = 0
if(!AttemptToEat(obstacle))
eatingDuration++
else
currentlyEating = null
eatingDuration = 0
return
proc/update_icon() //only for the sake of consistency with the other update icon procs
if(stat == CONSCIOUS || stat == UNCONSCIOUS)
if(previous) //midsection
icon_state = "spaceworm[get_dir(src,previous) | get_dir(src,next)]" //see 3 lines below
else //tail
icon_state = "spacewormtail"
dir = get_dir(src,next) //next will always be present since it's not a head and if it's dead, it goes in the other if branch
else
icon_state = "spacewormdead"
return
proc/AttemptToEat(var/atom/target)
if(istype(target,/turf/simulated/wall))
if((!istype(target,/turf/simulated/wall/r_wall) && eatingDuration >= 100) || eatingDuration >= 200) //need 20 ticks to eat an rwall, 10 for a regular one
var/turf/simulated/wall/wall = target
wall.ReplaceWithFloor()
new /obj/item/stack/sheet/metal(src, flatPlasmaValue)
return 1
else if(istype(target,/atom/movable))
if(istype(target,/mob) || eatingDuration >= 50) //5 ticks to eat stuff like airlocks
var/atom/movable/objectOrMob = target
contents += objectOrMob
return 1
return 0
proc/Attach(var/mob/living/simple_animal/space_worm/attachement)
if(!attachement)
return
previous = attachement
attachement.next = src
return
proc/Detach(die = 0)
var/mob/living/simple_animal/space_worm/newHead = new /mob/living/simple_animal/space_worm/head(loc,0)
var/mob/living/simple_animal/space_worm/newHeadPrevious = previous
previous = null //so that no extra heads are spawned
newHead.Attach(newHeadPrevious)
if(die)
newHead.Die()
del(src)
proc/ProcessStomach()
for(var/atom/movable/stomachContent in contents)
if(prob(digestionProbability))
if(istype(stomachContent,/obj/item/stack)) //converts to plasma, keeping the stack value
if(!istype(stomachContent,/obj/item/stack/sheet/plasma))
var/obj/item/stack/oldStack = stomachContent
new /obj/item/stack/sheet/plasma(src, oldStack.amount)
del(oldStack)
continue
else if(istype(stomachContent,/obj/item)) //converts to plasma, keeping the w_class
var/obj/item/oldItem = stomachContent
new /obj/item/stack/sheet/plasma(src, oldItem.w_class)
del(oldItem)
continue
else
new /obj/item/stack/sheet/plasma(src, flatPlasmaValue) //just flat amount
del(stomachContent)
continue
if(previous)
for(var/atom/movable/stomachContent in contents) //transfer it along the digestive tract
previous.contents += stomachContent
else
for(var/atom/movable/stomachContent in contents) //or poop it out
loc.contents += stomachContent
return
@@ -2117,6 +2117,15 @@
trash = /obj/item/trash/plate
bitesize = 2
/obj/item/weapon/reagent_containers/food/snacks/cracker
name = "Cracker"
desc = "It's a salted cracker."
icon_state = "cracker"
New()
..()
reagents.add_reagent("nutriment", 1)
/////////////////////////////////////////////////PIZZA////////////////////////////////////////
@@ -2356,11 +2365,18 @@
return
..()
/obj/item/weapon/reagent_containers/food/snacks/cracker
name = "Cracker"
desc = "It's a salted cracker."
icon_state = "cracker"
/obj/item/pizzabox/margherita/New()
pizza = new /obj/item/weapon/reagent_containers/food/snacks/sliceable/pizza/margherita(src)
boxtag = "Margherita Deluxe"
New()
..()
reagents.add_reagent("nutriment", 1)
/obj/item/pizzabox/vegetable/New()
pizza = new /obj/item/weapon/reagent_containers/food/snacks/sliceable/pizza/vegetablepizza(src)
boxtag = "Gourmet Vegatable"
/obj/item/pizzabox/mushroom/New()
pizza = new /obj/item/weapon/reagent_containers/food/snacks/sliceable/pizza/mushroompizza(src)
boxtag = "Mushroom Special"
/obj/item/pizzabox/meat/New()
pizza = new /obj/item/weapon/reagent_containers/food/snacks/sliceable/pizza/meatpizza(src)
boxtag = "Meatlover's Supreme"
+80
View File
@@ -0,0 +1,80 @@
//Procedures in this file: Appendectomy
//////////////////////////////////////////////////////////////////
// APPENDECTOMY //
//////////////////////////////////////////////////////////////////
/datum/surgery_step/appendectomy/
can_infect = 1
blood_level = 1
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
if (target_zone != "groin")
return 0
var/datum/organ/external/groin = target.get_organ("groin")
if (!groin)
return 0
if (groin.open < 2)
return 0
return 1
/datum/surgery_step/appendectomy/cut_appendix
required_tool = /obj/item/weapon/scalpel
allowed_tools = list(/obj/item/weapon/shard, /obj/item/weapon/kitchenknife)
min_duration = 70
max_duration = 90
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
return ..() && target.op_stage.appendix == 0
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message("[user] starts to separating [target]'s appendix from the abdominal wall with \the [tool].", \
"You start to separating [target]'s appendix from the abdominal wall with \the [tool]." )
target.custom_pain("The pain in your abdomen is living hell!",1)
..()
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message("\blue [user] has separated [target]'s appendix with \the [tool]." , \
"\blue You have separated [target]'s appendix with \the [tool].")
target.op_stage.appendix = 1
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/groin = target.get_organ("groin")
user.visible_message("\red [user]'s hand slips, slicing an artery inside [target]'s abdomen with \the [tool]!", \
"\red Your hand slips, slicing an artery inside [target]'s abdomen with \the [tool]!")
groin.createwound(CUT, 50, 1)
/datum/surgery_step/appendectomy/remove_appendix
required_tool = /obj/item/weapon/hemostat
allowed_tools = list(/obj/item/weapon/wirecutters)
min_duration = 60
max_duration = 80
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
return ..() && target.op_stage.appendix == 1
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message("[user] starts removing [target]'s appendix with \the [tool].", \
"You start removing [target]'s appendix with \the [tool].")
target.custom_pain("Someone's ripping out your bowels!",1)
..()
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message("\blue [user] has removed [target]'s appendix with \the [tool].", \
"\blue You have removed [target]'s appendix with \the [tool].")
var/app = 0
for(var/datum/disease/appendicitis/appendicitis in target.viruses)
app = 1
appendicitis.cure()
target.resistances += appendicitis
if (app)
new /obj/item/weapon/reagent_containers/food/snacks/appendix/inflamed(get_turf(target))
else
new /obj/item/weapon/reagent_containers/food/snacks/appendix(get_turf(target))
target.op_stage.appendix = 2
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
user.visible_message("\red [user]'s hand slips, nicking internal organs in [target]'s abdomen with \the [tool]!", \
"\red Your hand slips, nicking internal organs in [target]'s abdomen with \the [tool]!")
affected.createwound(BRUISE, 20)
+134
View File
@@ -0,0 +1,134 @@
//Procedures in this file: Fracture repair surgery
//////////////////////////////////////////////////////////////////
// BONE SURGERY //
//////////////////////////////////////////////////////////////////
/datum/surgery_step/glue_bone
required_tool = /obj/item/weapon/bonegel
allowed_tools = list(/obj/item/weapon/screwdriver)
can_infect = 1
blood_level = 1
min_duration = 50
max_duration = 60
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
return affected.open == 2 && affected.stage == 0
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
if (affected.stage == 0)
user.visible_message("[user] starts applying medication to the damaged bones in [target]'s [affected.display_name] with \the [tool]." , \
"You start applying medication to the damaged bones in [target]'s [affected.display_name] with \the [tool].")
target.custom_pain("Something in your [affected.display_name] is causing you a lot of pain!",1)
..()
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
user.visible_message("\blue [user] applies some [tool] to [target]'s bone in [affected.display_name]", \
"\blue You apply some [tool] to [target]'s bone in [affected.display_name] with \the [tool].")
affected.stage = 1
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
user.visible_message("\red [user]'s hand slips, smearing [tool] in the incision in [target]'s [affected.display_name]!" , \
"\red Your hand slips, smearing [tool] in the incision in [target]'s [affected.display_name]!")
/datum/surgery_step/set_bone
required_tool = /obj/item/weapon/bonesetter
allowed_tools = list(/obj/item/weapon/wrench)
min_duration = 60
max_duration = 70
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
return affected.name != "head" && affected.open == 2 && affected.stage == 1
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
user.visible_message("[user] is beginning to set the bone in [target]'s [affected.display_name] in place with \the [tool]." , \
"You are beginning to set the bone in [target]'s [affected.display_name] in place with \the [tool].")
target.custom_pain("The pain in your [affected.display_name] is going to make you pass out!",1)
..()
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
if (affected.status & ORGAN_BROKEN)
user.visible_message("\blue [user] sets the bone in [target]'s [affected.display_name] in place with \the [tool].", \
"\blue You set the bone in [target]'s [affected.display_name] in place with \the [tool].")
affected.stage = 2
else
user.visible_message("\blue [user] sets the bone in [target]'s [affected.display_name]\red in the WRONG place with \the [tool].", \
"\blue You set the bone in [target]'s [affected.display_name]\red in the WRONG place with \the [tool].")
affected.fracture()
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
user.visible_message("\red [user]'s hand slips, damaging the bone in [target]'s [affected.display_name] with \the [tool]!" , \
"\red Your hand slips, damaging the bone in [target]'s [affected.display_name] with \the [tool]!")
affected.createwound(BRUISE, 5)
/datum/surgery_step/mend_skull
required_tool = /obj/item/weapon/bonesetter
allowed_tools = list(/obj/item/weapon/wrench)
min_duration = 60
max_duration = 70
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
return affected.name == "head" && affected.open == 2 && affected.stage == 1
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message("[user] is beginning piece together [target]'s skull with \the [tool]." , \
"You are beginning piece together [target]'s skull with \the [tool].")
..()
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
user.visible_message("\blue [user] sets [target]'s skull with \the [tool]." , \
"\blue You set [target]'s skull with \the [tool].")
affected.stage = 2
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
user.visible_message("\red [user]'s hand slips, damaging [target]'s face with \the [tool]!" , \
"\red Your hand slips, damaging [target]'s face with \the [tool]!")
var/datum/organ/external/head/h = affected
h.createwound(BRUISE, 10)
h.disfigured = 1
/datum/surgery_step/finish_bone
required_tool = /obj/item/weapon/bonegel
allowed_tools = list(/obj/item/weapon/screwdriver)
can_infect = 1
blood_level = 1
min_duration = 50
max_duration = 60
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
return affected.open == 2 && affected.stage == 2
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
user.visible_message("[user] starts to finish mending the damaged bones in [target]'s [affected.display_name] with \the [tool].", \
"You start to finish mending the damaged bones in [target]'s [affected.display_name] with \the [tool].")
..()
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
user.visible_message("\blue [user] has mended the damaged bones in [target]'s [affected.display_name] with \the [tool]." , \
"\blue You have mended the damaged bones in [target]'s [affected.display_name] with \the [tool]." )
affected.status &= ~ORGAN_BROKEN
affected.status &= ~ORGAN_SPLINTED
affected.stage = 0
affected.perma_injury = 0
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
user.visible_message("\red [user]'s hand slips, smearing [tool] in the incision in [target]'s [affected.display_name]!" , \
"\red Your hand slips, smearing [tool] in the incision in [target]'s [affected.display_name]!")
+180
View File
@@ -0,0 +1,180 @@
//Procedures in this file: Brain extraction. slime Core extraction.
//////////////////////////////////////////////////////////////////
// BRAIN SURGERY //
//////////////////////////////////////////////////////////////////
/datum/surgery_step/brain/
blood_level = 1
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
return target_zone == "head" && hasorgans(target)
/datum/surgery_step/brain/saw_skull
required_tool = /obj/item/weapon/circular_saw
min_duration = 50
max_duration = 70
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
return ..() && target_zone == "head" && target.brain_op_stage == 1
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message("[user] begins to cut through [target]'s skull with \the [tool].", \
"You begin to cut through [target]'s skull with \the [tool].")
..()
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message("\blue [user] has cut through [target]'s skull open with \the [tool].", \
"\blue You have cut through [target]'s skull open with \the [tool].")
target.brain_op_stage = 2
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message("\red [user]'s hand slips, cracking [target]'s skull with \the [tool]!" , \
"\red Your hand slips, cracking [target]'s skull with \the [tool]!" )
target.apply_damage(10, BRUTE, "head")
/datum/surgery_step/brain/cut_brain
required_tool = /obj/item/weapon/scalpel
allowed_tools = list(/obj/item/weapon/shard, /obj/item/weapon/kitchenknife)
min_duration = 80
max_duration = 100
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
return ..() && target.brain_op_stage == 2
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message("[user] starts separating connections to [target]'s brain with \the [tool].", \
"You start separating connections to [target]'s brain with \the [tool].")
..()
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message("\blue [user] separates connections to [target]'s brain with \the [tool].", \
"\blue You separate connections to [target]'s brain with \the [tool].")
target.brain_op_stage = 3
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message("\red [user]'s hand slips, cutting a vein in [target]'s brain with \the [tool]!", \
"\red Your hand slips, cutting a vein in [target]'s brain with \the [tool]!")
target.apply_damage(50, BRUTE, "head", 1)
/datum/surgery_step/brain/saw_spine
required_tool = /obj/item/weapon/circular_saw
min_duration = 50
max_duration = 70
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
return ..() && target.brain_op_stage == 3
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message("[user] starts separating [target]'s brain from \his spine with \the [tool].", \
"You start separating [target]'s brain from spine with \the [tool].")
..()
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message("\blue [user] separates [target]'s brain from \his spine with \the [tool].", \
"\blue You separate [target]'s brain from spine with \the [tool].")
user.attack_log += "\[[time_stamp()]\]<font color='red'> Debrained [target.name] ([target.ckey]) with [tool.name] (INTENT: [uppertext(user.a_intent)])</font>"
target.attack_log += "\[[time_stamp()]\]<font color='orange'> Debrained by [user.name] ([user.ckey]) with [tool.name] (INTENT: [uppertext(user.a_intent)])</font>"
log_admin("ATTACK: [user] ([user.ckey]) debrained [target] ([target.ckey]) with [tool].")
message_admins("ATTACK: [user] ([user.ckey]) debrained [target] ([target.ckey]) with [tool].")
log_attack("<font color='red'>[user.name] ([user.ckey]) debrained [target.name] ([target.ckey]) with [tool.name] (INTENT: [uppertext(user.a_intent)])</font>")
var/obj/item/brain/B = new(target.loc)
B.transfer_identity(target)
target:brain_op_stage = 4.0
target.death()//You want them to die after the brain was transferred, so not to trigger client death() twice.
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message("\red [user]'s hand slips, cutting a vein in [target]'s brain with \the [tool]!", \
"\red Your hand slips, cutting a vein in [target]'s brain with \the [tool]!")
target.apply_damage(30, BRUTE, "head", 1)
if (ishuman(user))
user:bloody_body(target)
user:bloody_hands(target, 0)
//////////////////////////////////////////////////////////////////
// slime CORE EXTRACTION //
//////////////////////////////////////////////////////////////////
/datum/surgery_step/slime/
can_use(mob/living/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
return istype(target, /mob/living/carbon/slime/) && target.stat == 2
/datum/surgery_step/slime/cut_flesh
required_tool = /obj/item/weapon/scalpel
allowed_tools = list(/obj/item/weapon/shard, /obj/item/weapon/kitchenknife)
min_duration = 30
max_duration = 50
can_use(mob/living/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
return ..() && target.brain_op_stage == 0
begin_step(mob/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
user.visible_message("[user] starts cutting [target]'s flesh with \the [tool].", \
"You start cutting [target]'s flesh with \the [tool].")
end_step(mob/living/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
user.visible_message("\blue [user] cuts [target]'s flesh with \the [tool].", \
"\blue You cut [target]'s flesh with \the [tool], exposing the cores")
target.brain_op_stage = 1
fail_step(mob/living/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
user.visible_message("\red [user]'s hand slips, tearing [target]'s flesh with \the [tool]!", \
"\red Your hand slips, tearing [target]'s flesh with \the [tool]!")
/datum/surgery_step/slime/cut_innards
required_tool = /obj/item/weapon/scalpel
allowed_tools = list(/obj/item/weapon/shard, /obj/item/weapon/kitchenknife)
min_duration = 30
max_duration = 50
can_use(mob/living/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
return ..() && target.brain_op_stage == 1
begin_step(mob/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
user.visible_message("[user] starts cutting [target]'s silky innards apart with \the [tool].", \
"You start cutting [target]'s silky innards apart with \the [tool].")
end_step(mob/living/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
user.visible_message("\blue [user] cuts [target]'s innards apart with \the [tool], exposing the cores", \
"\blue You cut [target]'s innards apart with \the [tool], exposing the cores")
target.brain_op_stage = 2
fail_step(mob/living/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
user.visible_message("\red [user]'s hand slips, tearing [target]'s innards with \the [tool]!", \
"\red Your hand slips, tearing [target]'s innards with \the [tool]!")
/datum/surgery_step/slime/saw_core
required_tool = /obj/item/weapon/circular_saw
min_duration = 50
max_duration = 70
can_use(mob/living/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
return ..() && target.brain_op_stage == 2 && target.cores > 0
begin_step(mob/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
user.visible_message("[user] starts cutting out one of [target]'s cores with \the [tool].", \
"You start cutting out one of [target]'s cores with \the [tool].")
end_step(mob/living/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
target.cores--
user.visible_message("\blue [user] cuts out one of [target]'s cores with \the [tool].",, \
"\blue You cut out one of [target]'s cores with \the [tool]. [target.cores] cores left.")
if(target.cores >= 0)
new target.coretype(target.loc)
if(target.cores <= 0)
target.icon_state = "baby roro dead-nocore"
fail_step(mob/living/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
user.visible_message("\red [user]'s hand slips, failing to cut core out!", \
"\red Your hand slips, failing to cut core out!")
+121
View File
@@ -0,0 +1,121 @@
//Procedures in this file: Eye mending surgery
//////////////////////////////////////////////////////////////////
// EYE SURGERY //
//////////////////////////////////////////////////////////////////
/datum/surgery_step/eye
can_infect = 1
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
if (!hasorgans(target))
return 0
var/datum/organ/external/affected = target.get_organ(target_zone)
if (!affected)
return 0
return target_zone == "eyes"
/datum/surgery_step/eye/cut_open
required_tool = /obj/item/weapon/scalpel
allowed_tools = list(/obj/item/weapon/shard, /obj/item/weapon/kitchenknife)
min_duration = 90
max_duration = 110
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
return ..()
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message("[user] starts to separate the corneas on [target]'s eyes with \the [tool].", \
"You start to separate the corneas on [target]'s eyes with \the [tool].")
..()
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message("\blue [user] has separated the corneas on [target]'s eyes with \the [tool]." , \
"\blue You have separated the corneas on [target]'s eyes with \the [tool].",)
target.op_stage.eyes = 1
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
user.visible_message("\red [user]'s hand slips, slicing [target]'s eyes wth \the [tool]!" , \
"\red Your hand slips, slicing [target]'s eyes wth \the [tool]!" )
affected.createwound(CUT, 10)
/datum/surgery_step/eye/lift_eyes
required_tool = /obj/item/weapon/retractor
allowed_tools = list(/obj/item/weapon/kitchen/utensil/fork)
min_duration = 30
max_duration = 40
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
return ..() && target.op_stage.eyes == 1
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message("[user] starts lifting corneas from [target]'s eyes with \the [tool].", \
"You start lifting corneas from [target]'s eyes with \the [tool].")
..()
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message("\blue [user] has lifted the corneas from [target]'s eyes from with \the [tool]." , \
"\blue You has lifted the corneas from [target]'s eyes from with \the [tool]." )
target.op_stage.eyes = 2
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
user.visible_message("\red [user]'s hand slips, damaging [target]'s eyes with \the [tool]!", \
"\red Your hand slips, damaging [target]'s eyes with \the [tool]!")
target.apply_damage(10, BRUTE, affected)
/datum/surgery_step/eye/mend_eyes
required_tool = /obj/item/weapon/hemostat
allowed_tools = list(/obj/item/weapon/cable_coil, /obj/item/device/assembly/mousetrap)
min_duration = 80
max_duration = 100
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
return ..() && target.op_stage.eyes == 2
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message("[user] starts mending the nerves and lenses in [target]'s eyes with \the [tool].", \
"You start mending the nerves and lenses in [target]'s eyes with the [tool].")
..()
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message("\blue [user] mends the nerves and lenses in [target]'s with \the [tool]." , \
"\blue You mend the nerves and lenses in [target]'s with \the [tool].")
target.op_stage.eyes = 3
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
user.visible_message("\red [user]'s hand slips, stabbing \the [tool] into [target]'s eye!", \
"\red Your hand slips, stabbing \the [tool] into [target]'s eye!")
target.apply_damage(10, BRUTE, affected)
/datum/surgery_step/eye/cauterize
required_tool = /obj/item/weapon/cautery
allowed_tools = list(/obj/item/weapon/weldingtool, /obj/item/clothing/mask/cigarette, /obj/item/weapon/lighter)
min_duration = 70
max_duration = 100
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
return ..()
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message("[user] is beginning to cauterize the incision around [target]'s eyes with \the [tool]." , \
"You are beginning to cauterize the incision around [target]'s eyes with \the [tool].")
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message("\blue [user] cauterizes the incision around [target]'s eyes with \the [tool].", \
"\blue You cauterize the incision around [target]'s eyes with \the [tool].")
if (target.op_stage.eyes == 3)
target.sdisabilities &= ~BLIND
target.eye_stat = 0
target.op_stage.eyes = 0
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
user.visible_message("\red [user]'s hand slips, searing [target]'s eyes with \the [tool]!", \
"\red Your hand slips, searing [target]'s eyes with \the [tool]!")
target.apply_damage(5, BURN, affected)
target.eye_stat += 5
+124
View File
@@ -0,0 +1,124 @@
//Procedures in this file: Facial reconstruction surgery
//////////////////////////////////////////////////////////////////
// FACE SURGERY //
//////////////////////////////////////////////////////////////////
/datum/surgery_step/face
can_infect = 0
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
if (!hasorgans(target))
return 0
var/datum/organ/external/affected = target.get_organ(target_zone)
if (!affected)
return 0
return target_zone == "mouth" && affected.open == 2 && !(affected.status & ORGAN_BLEEDING)
/datum/surgery_step/generic/cut_face
required_tool = /obj/item/weapon/scalpel
allowed_tools = list(/obj/item/weapon/shard, /obj/item/weapon/kitchenknife)
min_duration = 90
max_duration = 110
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
return ..() && target_zone == "mouth" && target.op_stage.face == 0
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message("[user] starts to cut open [target]'s face and neck with \the [tool].", \
"You start to cut open [target]'s face and neck with \the [tool].")
..()
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message("\blue [user] has cut open [target]'s face and neck with \the [tool]." , \
"\blue You have cut open [target]'s face and neck with \the [tool].",)
target.op_stage.face = 1
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
user.visible_message("\red [user]'s hand slips, slicing [target]'s throat wth \the [tool]!" , \
"\red Your hand slips, slicing [target]'s throat wth \the [tool]!" )
affected.createwound(CUT, 60)
target.losebreath += 10
/datum/surgery_step/face/mend_vocal
required_tool = /obj/item/weapon/hemostat
allowed_tools = list(/obj/item/weapon/cable_coil, /obj/item/device/assembly/mousetrap)
min_duration = 70
max_duration = 90
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
return ..() && target.op_stage.face == 1
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message("[user] starts mending [target]'s vocal cords with \the [tool].", \
"You start mending [target]'s vocal cords with \the [tool].")
..()
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message("\blue [user] mends [target]'s vocal cords with \the [tool].", \
"\blue You mend [target]'s vocal cords with \the [tool].")
target.op_stage.face = 2
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message("\red [user]'s hand slips, clamping [target]'s trachea shut for a moment with \the [tool]!", \
"\red Your hand slips, clamping [user]'s trachea shut for a moment with \the [tool]!")
target.losebreath += 10
/datum/surgery_step/face/fix_face
required_tool = /obj/item/weapon/retractor
allowed_tools = list(/obj/item/weapon/kitchen/utensil/fork)
min_duration = 80
max_duration = 100
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
return ..() && target.op_stage.face == 2
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message("[user] starts pulling skin on [target]'s face back in place with \the [tool].", \
"You start pulling skin on [target]'s face back in place with \the [tool].")
..()
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message("\blue [user] pulls skin on [target]'s face back in place with \the [tool].", \
"\blue You pull skin on [target]'s face back in place with \the [tool].")
target.op_stage.face = 3
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
user.visible_message("\red [user]'s hand slips, tearing skin on [target]'s face with \the [tool]!", \
"\red Your hand slips, tearing skin on [target]'s face with \the [tool]!")
target.apply_damage(10, BRUTE, affected)
/datum/surgery_step/face/cauterize
required_tool = /obj/item/weapon/cautery
allowed_tools = list(/obj/item/weapon/weldingtool, /obj/item/clothing/mask/cigarette, /obj/item/weapon/lighter)
min_duration = 70
max_duration = 100
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
return ..() && target.op_stage.face > 0
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message("[user] is beginning to cauterize the incision on [target]'s face and neck with \the [tool]." , \
"You are beginning to cauterize the incision on [target]'s face and neck with \the [tool].")
..()
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
user.visible_message("\blue [user] cauterizes the incision on [target]'s face and neck with \the [tool].", \
"\blue You cauterize the incision on [target]'s face and neck with \the [tool].")
affected.open = 0
affected.status &= ~ORGAN_BLEEDING
if (target.op_stage.face == 3)
var/datum/organ/external/head/h = affected
h.disfigured = 0
target.op_stage.face = 0
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
user.visible_message("\red [user]'s hand slips, leaving a small burn on [target]'s face with \the [tool]!", \
"\red Your hand slips, leaving a small burn on [target]'s face with \the [tool]!")
target.apply_damage(4, BURN, affected)
+167
View File
@@ -0,0 +1,167 @@
//Procedures in this file: Gneric surgery steps
//////////////////////////////////////////////////////////////////
// COMMON STEPS //
//////////////////////////////////////////////////////////////////
/datum/surgery_step/generic/
can_infect = 1
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
if (target_zone == "eyes") //there are specific steps for eye surgery
return 0
if (!hasorgans(target))
return 0
var/datum/organ/external/affected = target.get_organ(target_zone)
if (affected == null)
return 0
if (affected.status & ORGAN_DESTROYED)
return 0
if (affected.status & ORGAN_ROBOT)
return 0
return 1
/datum/surgery_step/generic/cut_open
required_tool = /obj/item/weapon/scalpel
allowed_tools = list(/obj/item/weapon/shard, /obj/item/weapon/kitchenknife)
min_duration = 90
max_duration = 110
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
return ..() && affected.open == 0 && target_zone != "mouth"
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
user.visible_message("[user] starts the incision on [target]'s [affected.display_name] with \the [tool].", \
"You start the incision on [target]'s [affected.display_name] with \the [tool].")
target.custom_pain("You feel a horrible pain as if from a sharp knife in your [affected.display_name]!",1)
..()
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
user.visible_message("\blue [user] has made an incision on [target]'s [affected.display_name] with \the [tool].", \
"\blue You have made an incision on [target]'s [affected.display_name] with \the [tool].",)
affected.open = 1
affected.createwound(CUT, 1)
if (target_zone == "head")
target.brain_op_stage = 1
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
user.visible_message("\red [user]'s hand slips, slicing open [target]'s [affected.display_name] in a wrong spot with \the [tool]!", \
"\red Your hand slips, slicing open [target]'s [affected.display_name] in a wrong spot with \the [tool]!")
affected.createwound(CUT, 10)
/datum/surgery_step/generic/clamp_bleeders
required_tool = /obj/item/weapon/hemostat
allowed_tools = list(/obj/item/weapon/cable_coil, /obj/item/device/assembly/mousetrap)
min_duration = 40
max_duration = 60
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
return ..() && affected.open && (affected.status & ORGAN_BLEEDING)
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
user.visible_message("[user] starts clamping bleeders in [target]'s [affected.display_name] with \the [tool].", \
"You start clamping bleeders in [target]'s [affected.display_name] with \the [tool].")
target.custom_pain("The pain in your [affected.display_name] is maddening!",1)
..()
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
user.visible_message("\blue [user] clamps bleeders in [target]'s [affected.display_name] with \the [tool].", \
"\blue You clamp bleeders in [target]'s [affected.display_name] with \the [tool].")
affected.clamp()
spread_germs_to_organ(affected, user)
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
user.visible_message("\red [user]'s hand slips, tearing blood vessals and causing massive bleeding in [target]'s [affected.display_name] with the \[tool]!", \
"\red Your hand slips, tearing blood vessels and causing massive bleeding in [target]'s [affected.display_name] with \the [tool]!",)
affected.createwound(CUT, 10)
/datum/surgery_step/generic/retract_skin
required_tool = /obj/item/weapon/retractor
allowed_tools = list(/obj/item/weapon/kitchen/utensil/fork)
min_duration = 30
max_duration = 40
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
return ..() && affected.open < 2 && !(affected.status & ORGAN_BLEEDING)
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
var/msg = "[user] starts to pry open the incision on [target]'s [affected.display_name] with \the [tool]."
var/self_msg = "You start to pry open the incision on [target]'s [affected.display_name] with \the [tool]."
if (target_zone == "chest")
msg = "[user] starts to separate the ribcage and rearrange the organs in [target]'s torso with \the [tool]."
self_msg = "You start to separate the ribcage and rearrange the organs in [target]'s torso with \the [tool]."
if (target_zone == "groin")
msg = "[user] starts to pry open the incision and rearrange the organs in [target]'s lower abdomen with \the [tool]."
self_msg = "You start to pry open the incision and rearrange the organs in [target]'s lower abdomen with \the [tool]."
user.visible_message(msg, self_msg)
target.custom_pain("It feels like the skin on your [affected.display_name] is on fire!",1)
..()
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
var/msg = "\blue [user] keeps the incision open on [target]'s [affected.display_name] with \the [tool]."
var/self_msg = "\blue You keep the incision open on [target]'s [affected.display_name] with \the [tool]."
if (target_zone == "chest")
msg = "\blue [user] keeps the ribcage open on [target]'s torso with \the [tool]."
self_msg = "\blue You keep the ribcage open on [target]'s torso with \the [tool]."
if (target_zone == "groin")
msg = "\blue [user] keeps the incision open on [target]'s lower abdomen with \the [tool]."
self_msg = "\blue You keep the incision open on [target]'s lower abdomen with \the [tool]."
user.visible_message(msg, self_msg)
affected.open = 2
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
var/msg = "\red [user]'s hand slips, tearing the edges of incision on [target]'s [affected.display_name] with \the [tool]!"
var/self_msg = "\red Your hand slips, tearing the edges of incision on [target]'s [affected.display_name] with \the [tool]!"
if (target_zone == "chest")
msg = "\red [user]'s hand slips, damaging several organs [target]'s torso with \the [tool]!"
self_msg = "\red Your hand slips, damaging several organs [target]'s torso with \the [tool]!"
if (target_zone == "groin")
msg = "\red [user]'s hand slips, damaging several organs [target]'s lower abdomen with \the [tool]"
self_msg = "\red Your hand slips, damaging several organs [target]'s lower abdomen with \the [tool]!"
user.visible_message(msg, self_msg)
target.apply_damage(12, BRUTE, affected)
/datum/surgery_step/generic/cauterize
required_tool = /obj/item/weapon/cautery
allowed_tools = list(/obj/item/weapon/weldingtool, /obj/item/clothing/mask/cigarette, /obj/item/weapon/lighter)
min_duration = 70
max_duration = 100
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
return ..() && affected.open && target_zone != "mouth"
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
user.visible_message("[user] is beginning to cauterize the incision on [target]'s [affected.display_name] with \the [tool]." , \
"You are beginning to cauterize the incision on [target]'s [affected.display_name] with \the [tool].")
target.custom_pain("Your [affected.display_name] is being burned!",1)
..()
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
user.visible_message("\blue [user] cauterizes the incision on [target]'s [affected.display_name] with \the [tool].", \
"\blue You cauterize the incision on [target]'s [affected.display_name] with \the [tool].")
affected.open = 0
affected.germ_level = 0
affected.status &= ~ORGAN_BLEEDING
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
user.visible_message("\red [user]'s hand slips, leaving a small burn on [target]'s [affected.display_name] with \the [tool]!", \
"\red Your hand slips, leaving a small burn on [target]'s [affected.display_name] with \the [tool]!")
target.apply_damage(3, BURN, affected)
+110
View File
@@ -0,0 +1,110 @@
//Procedures in this file: Inernal wound patching, Implant removal.
//////////////////////////////////////////////////////////////////
// INTERNAL WOUND PATCHING //
//////////////////////////////////////////////////////////////////
/datum/surgery_step/fix_vein
required_tool = /obj/item/weapon/FixOVein
allowed_tools = list(/obj/item/weapon/cable_coil)
can_infect = 1
blood_level = 1
min_duration = 70
max_duration = 90
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
var/internal_bleeding = 0
for(var/datum/wound/W in affected.wounds) if(W.internal)
internal_bleeding = 1
break
return affected.open == 2 && internal_bleeding
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
user.visible_message("[user] starts patching the damaged vein in [target]'s [affected.display_name] with \the [tool]." , \
"You start patching the damaged vein in [target]'s [affected.display_name] with \the [tool].")
target.custom_pain("The pain in [affected.display_name] is unbearable!",1)
..()
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
user.visible_message("\blue [user] has patched the damaged vein in [target]'s [affected.display_name] with \the [tool].", \
"\blue You have patched the damaged vein in [target]'s [affected.display_name] with \the [tool].")
for(var/datum/wound/W in affected.wounds) if(W.internal)
affected.wounds -= W
affected.update_damages()
if (ishuman(user) && prob(40)) user:bloody_hands(target, 0)
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
user.visible_message("\red [user]'s hand slips, smearing [tool] in the incision in [target]'s [affected.display_name]!" , \
"\red Your hand slips, smearing [tool] in the incision in [target]'s [affected.display_name]!")
affected.take_damage(5, 0)
//////////////////////////////////////////////////////////////////
// IMPLANT REMOVAL SURGERY //
//////////////////////////////////////////////////////////////////
/datum/surgery_step/implant_removal
required_tool = /obj/item/weapon/hemostat
allowed_tools = list(/obj/item/weapon/wirecutters, /obj/item/weapon/kitchen/utensil/fork)
min_duration = 80
max_duration = 100
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
return affected.open == 2 && !(affected.status & ORGAN_BLEEDING)
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
user.visible_message("[user] starts poking around inside the incision on [target]'s [affected.display_name] with \the [tool].", \
"You start poking around inside the incision on [target]'s [affected.display_name] with \the [tool]" )
target.custom_pain("The pain in your chest is living hell!",1)
..()
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/chest/affected = target.get_organ(target_zone)
var/find_prob = 0
if (affected.implants.len)
var/obj/item/weapon/implant/imp = affected.implants[1]
if (imp.islegal())
find_prob +=60
else
find_prob +=40
if (isright(tool))
find_prob +=20
if (prob(find_prob))
user.visible_message("\blue [user] takes something out of incision on [target]'s [affected.display_name] with \the [tool].", \
"\blue You take something out of incision on [target]'s [affected.display_name]s with \the [tool]." )
var/obj/item/weapon/implant/imp = affected.implants[1]
affected.implants -= imp
imp.loc = get_turf(target)
imp.imp_in = null
imp.implanted = 0
else
user.visible_message("\blue [user] could not find anything inside [target]'s [affected.display_name], and pulls \the [tool] out.", \
"\blue You could not find anything inside [target]'s [affected.display_name]." )
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/chest/affected = target.get_organ(target_zone)
user.visible_message("\red [user]'s hand slips, scraping tissue inside [target]'s [affected.display_name] with \the [tool]!", \
"\red Your hand slips, scraping tissue inside [target]'s [affected.display_name] with \the [tool]!")
affected.createwound(CUT, 20)
if (affected.implants.len)
var/fail_prob = 10
if (!isright(tool))
fail_prob += 30
if (prob(fail_prob))
var/obj/item/weapon/implant/imp = affected.implants[1]
user.visible_message("\red Something beeps inside [target]'s [affected.display_name]!")
playsound(imp.loc, 'sound/items/countdown.ogg', 75, 1, -3)
spawn(25)
imp.activate()
+196
View File
@@ -0,0 +1,196 @@
//Procedures in this file: Generic ribcage opening steps, Removing alien embryo, Fixing ruptured lungs
//////////////////////////////////////////////////////////////////
// GENERIC RIBCAGE SURGERY //
//////////////////////////////////////////////////////////////////
/datum/surgery_step/ribcage
can_infect = 1
blood_level = 1
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
return target_zone == "chest"
/datum/surgery_step/ribcage/saw_ribcage
required_tool = /obj/item/weapon/circular_saw
min_duration = 50
max_duration = 70
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
return ..() && target.op_stage.ribcage == 0 && affected.open >= 2
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message("[user] begins to cut through [target]'s ribcage with \the [tool].", \
"You begin to cut through [target]'s ribcage with \the [tool].")
target.custom_pain("Something hurts horribly in your chest!",1)
..()
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message("\blue [user] has cut through [target]'s ribcage open with \the [tool].", \
"\blue You have cut through [target]'s ribcage open with \the [tool].")
target.op_stage.ribcage = 1
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message("\red [user]'s hand slips, cracking [target]'s ribcage with \the [tool]!" , \
"\red Your hand slips, cracking [target]'s ribcage with \the [tool]!" )
var/datum/organ/external/affected = target.get_organ(target_zone)
affected.createwound(CUT, 20)
affected.fracture()
/datum/surgery_step/ribcage/retract_ribcage
required_tool = /obj/item/weapon/retractor
allowed_tools = list(/obj/item/weapon/crowbar)
min_duration = 30
max_duration = 40
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
return ..() && target.op_stage.ribcage == 1
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/msg = "[user] starts to force open the ribcage in [target]'s torso with \the [tool]."
var/self_msg = "You start to force open the ribcage in [target]'s torso with \the [tool]."
user.visible_message(msg, self_msg)
target.custom_pain("Something hurts horribly in your chest!",1)
..()
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/msg = "\blue [user] forces open [target]'s ribcage with \the [tool]."
var/self_msg = "\blue You force open [target]'s ribcage with \the [tool]."
user.visible_message(msg, self_msg)
target.op_stage.ribcage = 2
// Whoops!
if(prob(10))
var/datum/organ/external/affected = target.get_organ(target_zone)
affected.fracture()
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/msg = "\red [user]'s hand slips, breaking [target]'s ribcage!"
var/self_msg = "\red Your hand slips, breaking [target]'s ribcage!"
user.visible_message(msg, self_msg)
var/datum/organ/external/affected = target.get_organ(target_zone)
affected.createwound(BRUISE, 20)
affected.fracture()
/datum/surgery_step/ribcage/close_ribcage
required_tool = /obj/item/weapon/retractor
allowed_tools = list(/obj/item/weapon/crowbar)
min_duration = 20
max_duration = 40
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
return ..() && target.op_stage.ribcage == 2
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/msg = "[user] starts bending [target]'s ribcage back into place with \the [tool]."
var/self_msg = "You start bending [target]'s ribcage back into place with \the [tool]."
user.visible_message(msg, self_msg)
target.custom_pain("Something hurts horribly in your chest!",1)
..()
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/msg = "\blue [user] bends [target]'s ribcage back into place with \the [tool]."
var/self_msg = "\blue You bend [target]'s ribcage back into place with \the [tool]."
user.visible_message(msg, self_msg)
target.op_stage.ribcage = 1
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/msg = "\red [user]'s hand slips, bending [target]'s ribcage in a wrong shape!"
var/self_msg = "\red Your hand slips, bending [target]'s ribcage in a wrong shape!"
user.visible_message(msg, self_msg)
var/datum/organ/external/chest/affected = target.get_organ("chest")
affected.createwound(BRUISE, 20)
affected.fracture()
if (prob(40))
user.visible_message("\red Rib pierces the lung!")
affected.ruptured_lungs = 1
/datum/surgery_step/ribcage/mend_ribcage
required_tool = /obj/item/weapon/bonegel
min_duration = 20
max_duration = 40
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
return ..() && target.op_stage.ribcage == 1
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/msg = "[user] starts applying \the [tool] to [target]'s ribcage."
var/self_msg = "You start applying \the [tool] to [target]'s ribcage."
user.visible_message(msg, self_msg)
target.custom_pain("Something hurts horribly in your chest!",1)
..()
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/msg = "\blue [user] applied \the [tool] to [target]'s ribcage."
var/self_msg = "\blue You applied \the [tool] to [target]'s ribcage."
user.visible_message(msg, self_msg)
target.op_stage.ribcage = 0
//////////////////////////////////////////////////////////////////
// ALIEN EMBRYO SURGERY //
//////////////////////////////////////////////////////////////////
/datum/surgery_step/ribcage/remove_embryo
required_tool = /obj/item/weapon/hemostat
blood_level = 2
min_duration = 80
max_duration = 100
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/embryo = 0
for(var/obj/item/alien_embryo/A in target)
embryo = 1
break
return ..() && embryo && target.op_stage.ribcage == 2
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/msg = "[user] starts to pull something out from [target]'s ribcage with \the [tool]."
var/self_msg = "You start to pull something out from [target]'s ribcage with \the [tool]."
user.visible_message(msg, self_msg)
target.custom_pain("Something hurts horribly in your chest!",1)
..()
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message("\red [user] rips the larva out of [target]'s ribcage!",
"You rip the larva out of [target]'s ribcage!")
for(var/obj/item/alien_embryo/A in target)
A.loc = A.loc.loc
//////////////////////////////////////////////////////////////////
// LUNG SURGERY //
//////////////////////////////////////////////////////////////////
/datum/surgery_step/ribcage/fix_lungs
required_tool = /obj/item/weapon/scalpel
allowed_tools = list(/obj/item/weapon/shard, /obj/item/weapon/kitchenknife)
min_duration = 70
max_duration = 90
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
return ..() && target.is_lung_ruptured() && target.op_stage.ribcage == 2
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message("[user] starts mending the rupture in [target]'s lungs with \the [tool].", \
"You start mending the rupture in [target]'s lungs with \the [tool]." )
target.custom_pain("The pain in your chest is living hell!",1)
..()
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/chest/affected = target.get_organ("chest")
user.visible_message("\blue [user] mends the rupture in [target]'s lungs with \the [tool].", \
"\blue You mend the rupture in [target]'s lungs with \the [tool]." )
affected.ruptured_lungs = 0
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/chest/affected = target.get_organ("chest")
user.visible_message("\red [user]'s hand slips, slicing an artery inside [target]'s chest with \the [tool]!", \
"\red Your hand slips, slicing an artery inside [target]'s chest with \the [tool]!")
affected.createwound(CUT, 20)
+151
View File
@@ -0,0 +1,151 @@
//Procedures in this file: Robotic limbs attachment
//////////////////////////////////////////////////////////////////
// LIMB SURGERY //
//////////////////////////////////////////////////////////////////
/datum/surgery_step/limb/
can_infect = 1
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
if (!hasorgans(target))
return 0
var/datum/organ/external/affected = target.get_organ(target_zone)
if (!affected)
return 0
if (!(affected.status & ORGAN_DESTROYED))
return 0
if (affected.parent)
if (affected.parent.status & ORGAN_DESTROYED)
return 0
return 1
/datum/surgery_step/limb/cut
required_tool = /obj/item/weapon/scalpel
allowed_tools = list(/obj/item/weapon/shard, /obj/item/weapon/kitchenknife)
min_duration = 80
max_duration = 100
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
user.visible_message("[user] starts cutting away flesh where [target]'s [affected.display_name] used to be with \the [tool].", \
"You start cutting away flesh where [target]'s [affected.display_name] used to be with \the [tool].")
..()
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
user.visible_message("\blue [user] cuts away flesh where [target]'s [affected.display_name] used to be with \the [tool].", \
"\blue You cut away flesh where [target]'s [affected.display_name] used to be with \the [tool].")
affected.status |= ORGAN_CUT_AWAY
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
if (affected.parent)
affected = affected.parent
user.visible_message("\red [user]'s hand slips, cutting [target]'s [affected.display_name] open!", \
"\red Your hand slips, cutting [target]'s [affected.display_name] open!")
affected.createwound(CUT, 10)
/datum/surgery_step/limb/mend
required_tool = /obj/item/weapon/retractor
allowed_tools = list(/obj/item/weapon/kitchen/utensil/fork)
min_duration = 80
max_duration = 100
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
return ..() && affected.status & ORGAN_CUT_AWAY
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
user.visible_message("[user] is beginning reposition flesh and nerve endings where where [target]'s [affected.display_name] used to be with [tool].", \
"You start repositioning flesh and nerve endings where where [target]'s [affected.display_name] used to be with [tool].")
..()
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
user.visible_message("\blue [user] has finished repositioning flesh and nerve endings where [target]'s [affected.display_name] used to be with [tool].", \
"\blue You have finished repositioning flesh and nerve endings where [target]'s [affected.display_name] used to be with [tool].")
affected.open = 3
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
if (affected.parent)
affected = affected.parent
user.visible_message("\red [user]'s hand slips, tearing flesh on [target]'s [affected.display_name]!", \
"\red Your hand slips, tearing flesh on [target]'s [affected.display_name]!")
target.apply_damage(10, BRUTE, affected)
/datum/surgery_step/limb/prepare
required_tool = /obj/item/weapon/cautery
allowed_tools = list(/obj/item/weapon/weldingtool, /obj/item/clothing/mask/cigarette, /obj/item/weapon/lighter)
min_duration = 60
max_duration = 70
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
return ..() && affected.open == 3
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
user.visible_message("[user] starts adjusting area around [target]'s [affected.display_name] with \the [tool].", \
"You start adjusting area around [target]'s [affected.display_name] with \the [tool]..")
..()
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
user.visible_message("\blue [user] has finished adjusting the area around [target]'s [affected.display_name] with \the [tool].", \
"\blue You have finished adjusting the area around [target]'s [affected.display_name] with \the [tool].")
affected.status |= ORGAN_ATTACHABLE
affected.amputated = 1
affected.setAmputatedTree()
affected.open = 0
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
if (affected.parent)
affected = affected.parent
user.visible_message("\red [user]'s hand slips, searing [target]'s [affected.display_name]!", \
"\red Your hand slips, searing [target]'s [affected.display_name]!")
target.apply_damage(10, BURN, affected)
/datum/surgery_step/limb/attach
required_tool = /obj/item/robot_parts
can_infect = 0
min_duration = 80
max_duration = 100
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/robot_parts/p = tool
if (p.part)
if (!(target_zone in p.part))
return 0
var/datum/organ/external/affected = target.get_organ(target_zone)
return ..() && affected.status & ORGAN_ATTACHABLE
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
user.visible_message("[user] starts attaching [tool] where [target]'s [affected.display_name] used to be.", \
"You start attaching [tool] where [target]'s [affected.display_name] used to be.")
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
user.visible_message("\blue [user] has attached [tool] where [target]'s [affected.display_name] used to be.", \
"\blue You have attached [tool] where [target]'s [affected.display_name] used to be.")
affected.robotize()
target.update_body()
target.updatehealth()
target.UpdateDamageIcon()
del(tool)
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
user.visible_message("\red [user]'s hand slips, damaging connectors on [target]'s [affected.display_name]!", \
"\red Your hand slips, damaging connectors on [target]'s [affected.display_name]!")
target.apply_damage(10, BRUTE, affected)
+85
View File
@@ -0,0 +1,85 @@
/* SURGERY STEPS */
/datum/surgery_step
// type path referencing the required tool for this step
var/required_tool = null
// type path referencing tools that can be used as substitude for this step
var/list/allowed_tools = null
// duration of the step
var/min_duration = 0
var/max_duration = 0
// evil infection stuff that will make everyone hate me
var/can_infect = 0
//How much blood this step can get on surgeon. 1 - hands, 2 - full body.
var/blood_level = 0
//is it is a required surgical tool for this step
proc/isright(obj/item/tool)
return (istype(tool,required_tool))
//is it is an accepted replacement tool for this step
proc/isacceptable(obj/item/tool)
if (allowed_tools)
for (var/T in allowed_tools)
if (istype(tool,T))
return 1
return 0
// checks whether this step can be applied with the given user and target
proc/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
return 0
// does stuff to begin the step, usually just printing messages. Moved germs transfering and bloodying here too
proc/begin_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
if (can_infect && affected)
spread_germs_to_organ(affected, user)
if (ishuman(user) && prob(60))
var/mob/living/carbon/human/H = user
if (blood_level)
H.bloody_hands(target,0)
if (blood_level > 1)
H.bloody_body(target,0)
return
// does stuff to end the step, which is normally print a message + do whatever this step changes
proc/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
return
// stuff that happens when the step fails
proc/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
return null
proc/spread_germs_to_organ(datum/organ/external/E, mob/living/carbon/human/user)
if(!istype(user) || !istype(E)) return
var/germ_level = user.germ_level
if(user.gloves)
germ_level = user.gloves.germ_level
E.germ_level = max(germ_level,E.germ_level) //as funny as scrubbing microbes out with clean gloves is - no.
proc/do_surgery(mob/living/M, mob/living/user, obj/item/tool)
if(!istype(M,/mob/living/carbon))
return 0
if (user.a_intent == "harm") //check for Hippocratic Oath
return 0
for(var/datum/surgery_step/S in surgery_steps)
if( S.isright(tool) || S.isacceptable(tool) && \
S.can_use(user, M, user.zone_sel.selecting, tool)) //check if tool is right or close enough and if this step is possible
S.begin_step(user, M, user.zone_sel.selecting, tool) //start on it
if(do_mob(user, M, rand(S.min_duration, S.max_duration))) //if user did nto move or changed hands
S.end_step(user, M, user.zone_sel.selecting, tool) //finish successfully
else //or
S.fail_step(user, M, user.zone_sel.selecting, tool) //malpractice~
return 1 //don't want to do weapony things after surgery
return 0
/datum/surgery_status/
var/eyes = 0
var/face = 0
var/appendix = 0
var/ribcage = 0