Merge pull request #2181 from caelaislinn/bleeding-edge-freeze

Supply pack tweaks, random event (system news announced at newscaster), cleanup
This commit is contained in:
CIB
2013-01-15 06:56:19 -08:00
37 changed files with 2084 additions and 8000 deletions

View File

@@ -1163,6 +1163,9 @@
#include "code\WorkInProgress\Cael_Aislinn\sculpture.dm"
#include "code\WorkInProgress\Cael_Aislinn\shield_capacitor.dm"
#include "code\WorkInProgress\Cael_Aislinn\shield_gen.dm"
#include "code\WorkInProgress\Cael_Aislinn\Economy\Economy.dm"
#include "code\WorkInProgress\Cael_Aislinn\Economy\Economy_Events.dm"
#include "code\WorkInProgress\Cael_Aislinn\Economy\Economy_TradeDestinations.dm"
#include "code\WorkInProgress\Cael_Aislinn\Jungle\falsewall.dm"
#include "code\WorkInProgress\Cael_Aislinn\Jungle\jungle.dm"
#include "code\WorkInProgress\Cael_Aislinn\Jungle\jungle_animals.dm"

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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)

View File

@@ -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

View File

@@ -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]\"";

View File

@@ -37,6 +37,8 @@ datum/controller/game_controller/New()
createRandomZlevel()
setup_economy()
if(!air_master)
air_master = new /datum/controller/air_system()
air_master.setup()

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"
@@ -156,6 +166,7 @@
cost = 10
containertype = /obj/structure/closet/crate
containername = "Janitorial supplies"
group = "Operations"
/datum/supply_packs/lightbulbs
name = "Replacement lights"
@@ -165,8 +176,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,
@@ -185,7 +196,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,
@@ -195,6 +207,7 @@
cost = 20
containertype = /obj/structure/closet/crate
containername = "Wizard costume crate"
group = "Operations"
/datum/supply_packs/mule
name = "MULEbot Crate"
@@ -202,6 +215,7 @@
cost = 20
containertype = /obj/structure/largecrate/mule
containername = "MULEbot Crate"
group = "Operations"
/datum/supply_packs/lisa
name = "Corgi Crate"
@@ -209,6 +223,7 @@
cost = 50
containertype = /obj/structure/largecrate/lisa
containername = "Corgi Crate"
group = "Hydroponics"
/datum/supply_packs/hydroponics // -- Skie
name = "Hydroponics Supply Crate"
@@ -225,6 +240,7 @@
containertype = /obj/structure/closet/crate/hydroponics
containername = "Hydroponics crate"
access = access_hydroponics
group = "Hydroponics"
/datum/supply_packs/seeds
name = "Seeds Crate"
@@ -244,6 +260,7 @@
containertype = /obj/structure/closet/crate/hydroponics
containername = "Seeds crate"
access = access_hydroponics
group = "Hydroponics"
/datum/supply_packs/weedcontrol
name = "Weed Control Crate"
@@ -255,6 +272,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"
@@ -272,6 +290,7 @@
containertype = /obj/structure/closet/crate/hydroponics
containername = "Exotic Seeds crate"
access = access_hydroponics
group = "Hydroponics"
/datum/supply_packs/medical
name = "Medical crate"
@@ -286,6 +305,7 @@
cost = 10
containertype = /obj/structure/closet/crate/medical
containername = "Medical crate"
group = "Medical / Science"
/datum/supply_packs/virus
@@ -304,6 +324,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"
@@ -312,6 +333,7 @@
cost = 10
containertype = /obj/structure/closet/crate
containername = "Metal sheets crate"
group = "Engineering"
/datum/supply_packs/glass50
name = "50 Glass Sheets"
@@ -320,6 +342,7 @@
cost = 10
containertype = /obj/structure/closet/crate
containername = "Glass sheets crate"
group = "Engineering"
/datum/supply_packs/electrical
name = "Electrical maintenance crate"
@@ -334,6 +357,7 @@
cost = 15
containertype = /obj/structure/closet/crate
containername = "Electrical maintenance crate"
group = "Engineering"
/datum/supply_packs/mechanical
name = "Mechanical maintenance crate"
@@ -349,6 +373,7 @@
cost = 10
containertype = /obj/structure/closet/crate
containername = "Mechanical maintenance crate"
group = "Engineering"
/datum/supply_packs/watertank
name = "Water tank crate"
@@ -356,6 +381,7 @@
cost = 8
containertype = /obj/structure/largecrate
containername = "water tank crate"
group = "Hydroponics"
/datum/supply_packs/fueltank
name = "Fuel tank crate"
@@ -363,6 +389,7 @@
cost = 8
containertype = /obj/structure/largecrate
containername = "fuel tank crate"
group = "Engineering"
/datum/supply_packs/solar
name = "Solar Pack crate"
@@ -393,6 +420,7 @@
cost = 20
containertype = /obj/structure/closet/crate
containername = "solar pack crate"
group = "Engineering"
/datum/supply_packs/engine
name = "Emitter crate"
@@ -402,6 +430,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"
@@ -410,6 +439,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"
@@ -417,6 +447,7 @@
containertype = /obj/structure/closet/crate/secure
containername = "Singularity Generator crate"
access = access_ce
group = "Engineering"
/datum/supply_packs/engine/collector
name = "Collector crate"
@@ -424,6 +455,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"
@@ -438,6 +470,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)"
@@ -448,6 +481,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\")"
@@ -457,6 +491,7 @@
containertype = /obj/structure/closet/crate/secure
containername = "\"Odysseus\" Circuit Crate"
access = access_robotics
group = "Engineering"
/datum/supply_packs/robotics
@@ -475,6 +510,7 @@
containertype = /obj/structure/closet/crate/secure/gear
containername = "Robotics Assembly"
access = access_robotics
group = "Engineering"
/datum/supply_packs/plasma
name = "Plasma assembly crate"
@@ -494,6 +530,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"
@@ -509,6 +546,7 @@
containertype = /obj/structure/closet/crate/secure/weapon
containername = "Weapons crate"
access = access_security
group = "Security"
/datum/supply_packs/eweapons
name = "Experimental weapons crate"
@@ -523,6 +561,7 @@
containertype = /obj/structure/closet/crate/secure/weapon
containername = "Experimental weapons crate"
access = access_heads
group = "Security"
/datum/supply_packs/armor
name = "Armor crate"
@@ -534,6 +573,7 @@
containertype = /obj/structure/closet/crate/secure
containername = "Armor crate"
access = access_security
group = "Security"
/datum/supply_packs/riot
name = "Riot gear crate"
@@ -559,6 +599,7 @@
containertype = /obj/structure/closet/crate/secure
containername = "Riot gear crate"
access = access_armory
group = "Security"
/datum/supply_packs/loyalty
name = "Loyalty implant crate"
@@ -567,6 +608,7 @@
containertype = /obj/structure/closet/crate/secure
containername = "Loyalty implant crate"
access = access_armory
group = "Security"
/datum/supply_packs/ballistic
name = "Ballistic gear crate"
@@ -578,6 +620,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"
@@ -589,6 +632,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"
@@ -600,6 +644,7 @@
containertype = /obj/structure/closet/crate/secure
containername = "Experimental armor crate"
access = access_armory
group = "Security"
/datum/supply_packs/securitybarriers
name = "Security Barriers"
@@ -610,6 +655,7 @@
cost = 20
containertype = /obj/structure/closet/crate/secure/gear
containername = "Security Barriers crate"
group = "Security"
/datum/supply_packs/securitybarriers
name = "Shield Generators"
@@ -621,6 +667,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
@@ -648,6 +695,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:"
@@ -671,12 +719,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
@@ -693,6 +740,7 @@
containertype = /obj/structure/closet/crate
containername = "Unlabeled crate"
contraband = 1
group = "Operations"
/datum/supply_packs/boxes
name = "Empty Box supplies"
@@ -706,9 +754,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"
@@ -735,7 +784,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"

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

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,
)

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

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

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"

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"
)

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 = ""

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)
..()

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

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

View File

@@ -1 +0,0 @@
#define PI 3.141592654

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

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)

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

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

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"

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.
*/

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

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()
*/

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

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)

File diff suppressed because it is too large Load Diff

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

View File

@@ -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"