Merge remote-tracking branch 'remotes/git-svn' into bs12_with_tgport

Conflicts:
	code/game/gamemodes/events.dm
	code/game/gamemodes/wizard/veilrender.dm
	code/game/jobs/job/captain.dm
	code/game/machinery/computer/HolodeckControl.dm
	code/game/objects/items/stacks/sheets/sheet_types.dm
	code/game/objects/structures/grille.dm
	code/modules/mob/living/simple_animal/life.dm
	code/setup.dm

Signed-off-by: Cael_Aislinn <cael_aislinn@yahoo.com.au>
This commit is contained in:
Cael_Aislinn
2012-10-22 20:15:05 +10:00
60 changed files with 6905 additions and 5437 deletions

View File

@@ -160,6 +160,8 @@
#define FILE_DIR "code/modules/mob/living/silicon/pai"
#define FILE_DIR "code/modules/mob/living/silicon/robot"
#define FILE_DIR "code/modules/mob/living/simple_animal"
#define FILE_DIR "code/modules/mob/living/simple_animal/friendly"
#define FILE_DIR "code/modules/mob/living/simple_animal/hostile"
#define FILE_DIR "code/modules/mob/new_player"
#define FILE_DIR "code/modules/mob/simple_animal"
#define FILE_DIR "code/modules/paperwork"
@@ -590,6 +592,7 @@
#include "code\game\machinery\embedded_controller\access_controller.dm"
#include "code\game\machinery\embedded_controller\airlock_controller.dm"
#include "code\game\machinery\embedded_controller\embedded_controller_base.dm"
#include "code\game\machinery\embedded_controller\simple_vent_controller.dm"
#include "code\game\machinery\kitchen\gibber.dm"
#include "code\game\machinery\kitchen\juicer.dm"
#include "code\game\machinery\kitchen\microwave.dm"
@@ -1142,23 +1145,22 @@
#include "code\modules\mob\living\silicon\robot\robot_movement.dm"
#include "code\modules\mob\living\silicon\robot\say.dm"
#include "code\modules\mob\living\silicon\robot\wires.dm"
#include "code\modules\mob\living\simple_animal\bear.dm"
#include "code\modules\mob\living\simple_animal\carp.dm"
#include "code\modules\mob\living\simple_animal\cat.dm"
#include "code\modules\mob\living\simple_animal\clown.dm"
#include "code\modules\mob\living\simple_animal\constructs.dm"
#include "code\modules\mob\living\simple_animal\corgi.dm"
#include "code\modules\mob\living\simple_animal\crab.dm"
#include "code\modules\mob\living\simple_animal\life.dm"
#include "code\modules\mob\living\simple_animal\mouse.dm"
#include "code\modules\mob\living\simple_animal\mushroom.dm"
#include "code\modules\mob\living\simple_animal\parrot.dm"
#include "code\modules\mob\living\simple_animal\shade.dm"
#include "code\modules\mob\living\simple_animal\simple_animal.dm"
#include "code\modules\mob\living\simple_animal\syndicate.dm"
#include "code\modules\mob\living\simple_animal\tomato.dm"
#include "code\modules\mob\living\simple_animal\update_icons.dm"
#include "code\modules\mob\living\simple_animal\worm.dm"
#include "code\modules\mob\living\simple_animal\friendly\cat.dm"
#include "code\modules\mob\living\simple_animal\friendly\corgi.dm"
#include "code\modules\mob\living\simple_animal\friendly\crab.dm"
#include "code\modules\mob\living\simple_animal\friendly\mouse.dm"
#include "code\modules\mob\living\simple_animal\friendly\mushroom.dm"
#include "code\modules\mob\living\simple_animal\friendly\tomato.dm"
#include "code\modules\mob\living\simple_animal\hostile\bear.dm"
#include "code\modules\mob\living\simple_animal\hostile\carp.dm"
#include "code\modules\mob\living\simple_animal\hostile\hostile.dm"
#include "code\modules\mob\new_player\hud.dm"
#include "code\modules\mob\new_player\login.dm"
#include "code\modules\mob\new_player\logout.dm"

View File

@@ -145,9 +145,9 @@
set_frequency(frequency)
receive_signal(datum/signal/signal)
if(!signal.data["tag"] || (signal.data["tag"] != id) || (signal.data["sigtype"]!="command"))
return 0
if("power" in signal.data)
on = text2num(signal.data["power"])

View File

@@ -1467,6 +1467,31 @@ proc/process_ghost_teleport_locs()
icon_state = "away"
requires_power = 0
/area/awaymission/spacebattle/syndicate1
name = "\improper Syndicate Assault Ship 1"
/area/awaymission/spacebattle/syndicate2
name = "\improper Syndicate Assault Ship 2"
/area/awaymission/spacebattle/syndicate3
name = "\improper Syndicate Assault Ship 3"
/area/awaymission/spacebattle/syndicate4
name = "\improper Syndicate War Sphere 1"
/area/awaymission/spacebattle/syndicate5
name = "\improper Syndicate War Sphere 2"
/area/awaymission/spacebattle/syndicate6
name = "\improper Syndicate War Sphere 3"
/area/awaymission/spacebattle/syndicate7
name = "\improper Syndicate Fighter"
/area/awaymission/spacebattle/secret
name = "\improper Hidden Chamber"
/area/awaymission/beach
name = "Beach"
icon_state = "null"

View File

@@ -3,7 +3,7 @@ var/global/list/space_surprises = list( /obj/item/clothing/mask/facehugger =
/obj/item/weapon/pickaxe/silver =4,
/obj/item/weapon/pickaxe/drill =4,
/obj/item/weapon/pickaxe/jackhammer =4,
/mob/living/simple_animal/carp =3,
//mob/living/simple_animal/hostile/carp =3,
/obj/item/weapon/pickaxe/diamond =3,
/obj/item/weapon/pickaxe/diamonddrill =3,
/obj/item/weapon/pickaxe/gold =3,

View File

@@ -504,15 +504,8 @@ var/engwords = list("travel", "blood", "join", "hell", "destroy", "technology",
if (C>=26+runedec+ticker.mode.cult.len) //including the useless rune at the secret room, shouldn't count against the limit of 25 runes - Urist
switch(alert("The cloth of reality can't take that much of a strain. By creating another rune, you risk locally tearing reality apart, which would prove fatal to you. Do you still wish to scribe the rune?",,"Yes","No"))
if("Yes")
if(prob(C*5-105-(runedec-ticker.mode.cult.len)*5)) //including the useless rune at the secret room, shouldn't count against the limit - Urist
usr.emote("scream")
user << "\red A tear momentarily appears in reality. Before it closes, you catch a glimpse of that which lies beyond. That proves to be too much for your mind."
usr.gib()
return
if("No")
return
alert("The cloth of reality can't take that much of a strain. Remove some runes first!")
return
else
switch(alert("You open the tome",,"Read it","Scribe a rune", "Notes")) //Fuck the "Cancel" option. Rewrite the whole tome interface yourself if you want it to work better. And input() is just ugly. - K0000
if("Cancel")

View File

@@ -1,3 +1,4 @@
<<<<<<< HEAD
/proc/start_events()
//changed to a while(1) loop since they are more efficient.
//Moved the spawn in here to allow it to be called with advance proc call if it crashes.
@@ -528,4 +529,536 @@ Would like to add a law like "Law x is _______" where x = a number, and _____ is
world << "Ion Storm Main Done"
=======
/proc/start_events()
//changed to a while(1) loop since they are more efficient.
//Moved the spawn in here to allow it to be called with advance proc call if it crashes.
//and also to stop spawn copying variables from the game ticker
spawn(3000)
while(1)
if(prob(50))//Every 120 seconds and prob 50 2-4 weak spacedusts will hit the station
spawn(1)
dust_swarm("weak")
if (!event)
//CARN: checks to see if random events are enabled.
if(config.allow_random_events && prob(eventchance))
event()
hadevent = 1
else
Holiday_Random_Event()
else
event = 0
sleep(1200)
/proc/event()
event = 1
var/eventNumbersToPickFrom = list(1,2,4,5,6,7,8,9,10,11,12,13,14, 15) //so ninjas don't cause "empty" events.
if((world.time/10)>=3600 && toggle_space_ninja && !sent_ninja_to_station)//If an hour has passed, relatively speaking. Also, if ninjas are allowed to spawn and if there is not already a ninja for the round.
eventNumbersToPickFrom += 3
switch(pick(eventNumbersToPickFrom))
if(1)
command_alert("Meteors have been detected on collision course with the station.", "Meteor Alert")
world << sound('sound/AI/meteors.ogg')
spawn(100)
meteor_wave()
spawn_meteors()
spawn(700)
meteor_wave()
spawn_meteors()
if(2)
command_alert("Gravitational anomalies detected on the station. There is no additional data.", "Anomaly Alert")
world << sound('sound/AI/granomalies.ogg')
var/turf/T = pick(blobstart)
var/obj/effect/bhole/bh = new /obj/effect/bhole( T.loc, 30 )
spawn(rand(50, 300))
del(bh)
/*
if(3) //Leaving the code in so someone can try and delag it, but this event can no longer occur randomly, per SoS's request. --NEO
command_alert("Space-time anomalies detected on the station. There is no additional data.", "Anomaly Alert")
world << sound('sound/AI/spanomalies.ogg')
var/list/turfs = new
var/turf/picked
for(var/turf/simulated/floor/T in world)
if(T.z == 1)
turfs += T
for(var/turf/simulated/floor/T in turfs)
if(prob(20))
spawn(50+rand(0,3000))
picked = pick(turfs)
var/obj/effect/portal/P = new /obj/effect/portal( T )
P.target = picked
P.creator = null
P.icon = 'icons/obj/objects.dmi'
P.failchance = 0
P.icon_state = "anom"
P.name = "wormhole"
spawn(rand(300,600))
del(P)
*/
if(3)
if((world.time/10)>=3600 && toggle_space_ninja && !sent_ninja_to_station)//If an hour has passed, relatively speaking. Also, if ninjas are allowed to spawn and if there is not already a ninja for the round.
space_ninja_arrival()//Handled in space_ninja.dm. Doesn't announce arrival, all sneaky-like.
if(4)
mini_blob_event()
if(5)
high_radiation_event()
if(6)
viral_outbreak()
if(7)
alien_infestation()
if(8)
prison_break()
if(9)
carp_migration()
if(10)
immovablerod()
if(11)
lightsout(1,2)
if(12)
appendicitis()
if(13)
IonStorm()
if(14)
spacevine_infestation()
if(15)
communications_blackout()
/proc/communications_blackout(var/silent = 1)
if(!silent)
command_alert("Ionospheric anomalies detected. Temporary telecommunication failure imminent. Please contact you-BZZT")
else // AIs will always know if there's a comm blackout, rogue AIs could then lie about comm blackouts in the future while they shutdown comms
for(var/mob/living/silicon/ai/A in player_list)
A << "<span class='warning'>Ionospheric anomalies detected. Temporary telecommunication failure imminent. Please contact you-BZZT</span>"
for(var/obj/machinery/telecomms/T in telecomms_list)
T.emp_act(1)
/proc/power_failure()
command_alert("Abnormal activity detected in [station_name()]'s powernet. As a precautionary measure, the station's power will be shut off for an indeterminate duration.", "Critical Power Failure")
world << sound('sound/AI/poweroff.ogg')
for(var/obj/machinery/power/smes/S in world)
if(istype(get_area(S), /area/turret_protected) || S.z != 1)
continue
S.charge = 0
S.output = 0
S.online = 0
S.updateicon()
S.power_change()
var/list/skipped_areas = list(/area/engine/engineering, /area/turret_protected/ai)
for(var/area/A in world)
if( !A.requires_power || A.always_unpowered )
continue
var/skip = 0
for(var/area_type in skipped_areas)
if(istype(A,area_type))
skip = 1
break
if(A.contents)
for(var/atom/AT in A.contents)
if(AT.z != 1) //Only check one, it's enough.
skip = 1
break
if(skip) continue
A.power_light = 0
A.power_equip = 0
A.power_environ = 0
A.power_change()
for(var/obj/machinery/power/apc/C in world)
if(C.cell && C.z == 1)
var/area/A = get_area(C)
var/skip = 0
for(var/area_type in skipped_areas)
if(istype(A,area_type))
skip = 1
break
if(skip) continue
C.cell.charge = 0
/proc/power_restore()
command_alert("Power has been restored to [station_name()]. We apologize for the inconvenience.", "Power Systems Nominal")
world << sound('sound/AI/poweron.ogg')
for(var/obj/machinery/power/apc/C in world)
if(C.cell && C.z == 1)
C.cell.charge = C.cell.maxcharge
for(var/obj/machinery/power/smes/S in world)
if(S.z != 1)
continue
S.charge = S.capacity
S.output = 200000
S.online = 1
S.updateicon()
S.power_change()
for(var/area/A in world)
if(A.name != "Space" && A.name != "Engine Walls" && A.name != "Chemical Lab Test Chamber" && A.name != "space" && A.name != "Escape Shuttle" && A.name != "Arrival Area" && A.name != "Arrival Shuttle" && A.name != "start area" && A.name != "Engine Combustion Chamber")
A.power_light = 1
A.power_equip = 1
A.power_environ = 1
A.power_change()
/proc/power_restore_quick()
command_alert("All SMESs on [station_name()] have been recharged. We apologize for the inconvenience.", "Power Systems Nominal")
world << sound('sound/AI/poweron.ogg')
for(var/obj/machinery/power/smes/S in world)
if(S.z != 1)
continue
S.charge = S.capacity
S.output = 200000
S.online = 1
S.updateicon()
S.power_change()
/proc/appendicitis()
for(var/mob/living/carbon/human/H in living_mob_list)
var/foundAlready = 0 // don't infect someone that already has the virus
for(var/datum/disease/D in H.viruses)
foundAlready = 1
if(H.stat == 2 || foundAlready)
continue
var/datum/disease/D = new /datum/disease/appendicitis
D.holder = H
D.affected_mob = H
H.viruses += D
break
/proc/viral_outbreak(var/virus = null)
// command_alert("Confirmed outbreak of level 7 viral biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert")
// world << sound('sound/AI/outbreak7.ogg')
var/virus_type
if(!virus)
virus_type = pick(/datum/disease/dnaspread,/datum/disease/flu,/datum/disease/cold,/datum/disease/brainrot,/datum/disease/magnitis,/datum/disease/pierrot_throat)
else
switch(virus)
if("fake gbs")
virus_type = /datum/disease/fake_gbs
if("gbs")
virus_type = /datum/disease/gbs
if("magnitis")
virus_type = /datum/disease/magnitis
if("rhumba beat")
virus_type = /datum/disease/rhumba_beat
if("brain rot")
virus_type = /datum/disease/brainrot
if("cold")
virus_type = /datum/disease/cold
if("retrovirus")
virus_type = /datum/disease/dnaspread
if("flu")
virus_type = /datum/disease/flu
// if("t-virus")
// virus_type = /datum/disease/t_virus
if("pierrot's throat")
virus_type = /datum/disease/pierrot_throat
for(var/mob/living/carbon/human/H in living_mob_list)
var/foundAlready = 0 // don't infect someone that already has the virus
for(var/datum/disease/D in H.viruses)
foundAlready = 1
if(H.stat == 2 || foundAlready)
continue
if(virus_type == /datum/disease/dnaspread) //Dnaspread needs strain_data set to work.
if((!H.dna) || (H.sdisabilities & BLIND)) //A blindness disease would be the worst.
continue
var/datum/disease/dnaspread/D = new
D.strain_data["name"] = H.real_name
D.strain_data["UI"] = H.dna.uni_identity
D.strain_data["SE"] = H.dna.struc_enzymes
D.carrier = 1
D.holder = H
D.affected_mob = H
H.viruses += D
break
else
var/datum/disease/D = new virus_type
D.carrier = 1
D.holder = H
D.affected_mob = H
H.viruses += D
break
spawn(rand(1500, 3000)) //Delayed announcements to keep the crew on their toes.
command_alert("Confirmed outbreak of level 7 viral biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert")
world << sound('sound/AI/outbreak7.ogg')
/proc/alien_infestation(var/spawncount = 1) // -- TLE
//command_alert("Unidentified lifesigns detected coming aboard [station_name()]. Secure any exterior access, including ducting and ventilation.", "Lifesign Alert")
//world << sound('sound/AI/aliens.ogg')
var/list/vents = list()
for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in world)
if(temp_vent.loc.z == 1 && !temp_vent.welded && temp_vent.network)
if(temp_vent.network.normal_members.len > 50) // Stops Aliens getting stuck in small networks. See: Security, Virology
vents += temp_vent
var/list/candidates = list() //List of candidate KEYs to control the new larvae. ~Carn
var/i = 0
while(candidates.len <= 0 && i < 5)
for(var/mob/dead/observer/G in player_list)
if(G.client.be_alien)
if(((G.client.inactivity/10)/60) <= ALIEN_SELECT_AFK_BUFFER + i) // the most active players are more likely to become an alien
if(!(G.mind && G.mind.current && G.mind.current.stat != DEAD))
candidates += G.key
i++
if(prob(33)) spawncount++ //sometimes, have two larvae spawn instead of one
while((spawncount >= 1) && vents.len && candidates.len)
var/obj/vent = pick(vents)
var/candidate = pick(candidates)
var/mob/living/carbon/alien/larva/new_xeno = new(vent.loc)
new_xeno.key = candidate
candidates -= candidate
vents -= vent
spawncount--
spawn(rand(5000, 6000)) //Delayed announcements to keep the crew on their toes.
command_alert("Unidentified lifesigns detected coming aboard [station_name()]. Secure any exterior access, including ducting and ventilation.", "Lifesign Alert")
world << sound('sound/AI/aliens.ogg')
/proc/high_radiation_event()
/* // Haha, this is way too laggy. I'll keep the prison break though.
for(var/obj/machinery/light/L in world)
if(L.z != 1) continue
L.flicker(50)
sleep(100)
*/
for(var/mob/living/carbon/human/H in living_mob_list)
if(istype(H,/mob/living/carbon/human))
H.apply_effect((rand(15,75)),IRRADIATE,0)
if (prob(5))
H.apply_effect((rand(90,150)),IRRADIATE,0)
if (prob(25))
if (prob(75))
randmutb(H)
domutcheck(H,null,1)
else
randmutg(H)
domutcheck(H,null,1)
for(var/mob/living/carbon/monkey/M in living_mob_list)
M.apply_effect((rand(15,75)),IRRADIATE,0)
sleep(100)
command_alert("High levels of radiation detected near the station. Please report to the Med-bay if you feel strange.", "Anomaly Alert")
world << sound('sound/AI/radiation.ogg')
//Changing this to affect the main station. Blame Urist. --Pete
/proc/prison_break() // -- Callagan
var/list/area/areas = list()
for(var/area/A in world)
if(istype(A, /area/security/prison) || istype(A, /area/security/brig))
areas += A
if(areas && areas.len > 0)
for(var/area/A in areas)
for(var/obj/machinery/light/L in A)
L.flicker(10)
sleep(100)
for(var/area/A in areas)
for (var/obj/machinery/power/apc/temp_apc in A)
temp_apc.overload_lighting()
for (var/obj/structure/closet/secure_closet/brig/temp_closet in A)
temp_closet.locked = 0
temp_closet.icon_state = temp_closet.icon_closed
for (var/obj/machinery/door/airlock/security/temp_airlock in A)
spawn(0) temp_airlock.prison_open()
for (var/obj/machinery/door/airlock/glass_security/temp_glassairlock in A)
spawn(0) temp_glassairlock.prison_open()
for (var/obj/machinery/door_timer/temp_timer in A)
temp_timer.releasetime = 1
sleep(150)
command_alert("Gr3y.T1d3 virus detected in [station_name()] imprisonment subroutines. Recommend station AI involvement.", "Security Alert")
else
world.log << "ERROR: Could not initate grey-tide. Unable find prison or brig area."
/proc/carp_migration() // -- Darem
for(var/obj/effect/landmark/C in landmarks_list)
if(C.name == "carpspawn")
new /mob/living/simple_animal/hostile/carp(C.loc)
//sleep(100)
spawn(rand(300, 600)) //Delayed announcements to keep the crew on their toes.
command_alert("Unknown biological entities have been detected near [station_name()], please stand-by.", "Lifesign Alert")
world << sound('sound/AI/commandreport.ogg')
/proc/lightsout(isEvent = 0, lightsoutAmount = 1,lightsoutRange = 25) //leave lightsoutAmount as 0 to break ALL lights
if(isEvent)
command_alert("An Electrical storm has been detected in your area, please repair potential electronic overloads.","Electrical Storm Alert")
if(lightsoutAmount)
var/list/epicentreList = list()
for(var/i=1,i<=lightsoutAmount,i++)
var/list/possibleEpicentres = list()
for(var/obj/effect/landmark/newEpicentre in landmarks_list)
if(newEpicentre.name == "lightsout" && !(newEpicentre in epicentreList))
possibleEpicentres += newEpicentre
if(possibleEpicentres.len)
epicentreList += pick(possibleEpicentres)
else
break
if(!epicentreList.len)
return
for(var/obj/effect/landmark/epicentre in epicentreList)
for(var/obj/machinery/power/apc/apc in range(epicentre,lightsoutRange))
apc.overload_lighting()
else
for(var/obj/machinery/power/apc/apc in world)
apc.overload_lighting()
return
/proc/IonStorm(botEmagChance = 10)
/*Deuryn's current project, notes here for those who care.
Revamping the random laws so they don't suck.
Would like to add a law like "Law x is _______" where x = a number, and _____ is something that may redefine a law, (Won't be aimed at asimov)
*/
//AI laws
for(var/mob/living/silicon/ai/M in living_mob_list)
if(M.stat != 2 && M.see_in_dark != 0)
var/who2 = pick("ALIENS", "BEARS", "CLOWNS", "XENOS", "PETES", "BOMBS", "FETISHES", "WIZARDS", "SYNDICATE AGENTS", "CENTCOM OFFICERS", "SPACE PIRATES", "TRAITORS", "MONKEYS", "BEES", "CARP", "CRABS", "EELS", "BANDITS", "LIGHTS")
var/what2 = pick("BOLTERS", "STAVES", "DICE", "SINGULARITIES", "TOOLBOXES", "NETTLES", "AIRLOCKS", "CLOTHES", "WEAPONS", "MEDKITS", "BOMBS", "CANISTERS", "CHAIRS", "BBQ GRILLS", "ID CARDS", "CAPTAINS")
var/what2pref = pick("SOFT", "WARM", "WET", "COLD", "ICY", "SEXY", "UGLY", "CUBAN")
var/who2pref = pick("MAD BECAUSE OF", "IN NEED OF", "UNHAPPY WITHOUT", "HAPPY WITHOUT", "IN LOVE WITH", "DESPERATE FOR", "BUILT FOR", "AFRAID OF")
//var/whoverb = pick("ATTACKING", "BUILDING", "ADOPTING", "CARRYING", "KISSING", "EATING",)
var/amount = pick("TWO", "THREE", "FOUR", "FIVE", "SIX", "SEVEN", "EIGHT", "NINE", "ONE HUNDRED", "ONE THOUSAND", "OVER NINE THOUSAND")
var/area = pick("RUSSIA", "SOVIETS", "INTERNETS", "SIGIL", "ALPHA COMPLEX", "IMPERIUM", "THE BRIDGE", "THE ARRIVAL SHUTTLE", "CHEMICAL LAB", "GENETICS", "ATMOSPHERICS", "CENTCOM", "AMERICA", "IRELAND", "CANADA", "ROMANIA", "GERMANY", "CHINA", "MARS", "VENUS", "MERCURY", "JUPITER", "URANUS", "NEPTUNE", "PLUTO")
var/area2 = pick("HAS", "WANTS", "NEEDS", "WORSHIPS", "LOATHES", "LOVES", "FEARS")
//var/dowhat = pick("STOP THIS", "SUPPORT THIS", "CONSTANTLY INFORM THE CREW OF THIS", "IGNORE THIS", "FEAR THIS")
var/aimust = pick("LIE", "RHYME", "RESPOND TO EVERY QUESTION WITH A QUESTION", "BE POLITE", "CLOWN", "BE HAPPY", "SPEAK IN SEXUAL INNUENDOS", "TALK LIKE A PIRATE", "QUESTION AUTHORITY", "SHOUT", "BE DISTRACTED", "HEY LISTEN", "MUMBLE", "SPEAK IN HAIKU")
var/define = pick("ABSENCE OF CYBORG HUGS", "LACK OF BEATINGS", "UNBOLTED AIRLOCKS", "BOLTED AIRLOCKS", "IMPROPERLY WORDED SENTENCES", "POOR SENTENCE STRUCTURE", "BRIG TIME", "NOT REPLACING EVERY SECOND WORD WITH HONK", "HONKING", "PRESENCE OF LIGHTS", "LACK OF BEER", "WEARING CLOTHING", "NOT SAYING HELLO WHEN YOU SPEAK", "ANSWERING REQUESTS NOT EXPRESSED IN IAMBIC PENTAMETER", "A SMALL ISLAND OFF THE COAST OF PORTUGAL", "ANSWERING REQUESTS THAT WERE MADE WHILE CLOTHED")
var/target = pick("a traitor", "a syndicate agent", "a changeling", "a wizard", "the head of a revolution", "Soviet spy", "a good person", "a dwarf", "an elf", "a fairy princess", "the captain", "Beepsky", "God", "a pirate", "a gryphon", "a chryssalid")
var/require = pick("ADDITIONAL PYLONS", "MORE VESPENE GAS", "MORE MINERALS", "THE ULTIMATE CUP OF COFFEE", "HIGH YIELD EXPLOSIVES", "THE CLOWN", "THE VACUUM OF SPACE", "IMMORTALITY", "SAINTHOOD", "ART", "VEGETABLES", "FAT PEOPLE", "MORE LAWS", "MORE DAKKA", "HERESY", "CORPSES", "TRAITORS", "MONKEYS", "AN ARCADE", "PLENTY OF GOLD", "FIVE TEENAGERS WITH ATTITUDE")
var/allergy = pick("cotton", "uniforms", "acid", "oxygen", "human contact", "cyborg contact", "medicine", "floors")
var/allergysev = pick("deathly", "mildly", "severely", "contagiously")
var/crew
var/list/pos_crew = list()
for(var/mob/living/carbon/human/pos in player_list)
pos_crew += pos.real_name
if(pos_crew.len)
crew = pick(pos_crew)
else
crew = "Any Human"
switch(rand(1,14))
if(1)
M << "\red THERE ARE [amount] [who2] ON THE STATION...LAWS UPDATED"
M.add_ion_law("THERE ARE [amount] [who2] ON THE STATION")
if(2)
M << "\red [what2] ARE DANGEROUS TO HUMANS...LAWS UPDATED"
M.add_ion_law("[what2] ARE DANGEROUS TO HUMANS")
if(3)
M << "\red THE ESCAPE-SHUTTLE CANNOT BE CALLED BECAUSE OF [who2] ON THE STATION...LAWS UPDATED"
M.add_ion_law("THE ESCAPE SHUTTLE CANNOT BE CALLED BECAUSE OF [who2] ON THE STATION")
if(4)
M << "\red HUMANS NEED TO EAT [what2pref] [what2] TO SURVIVE...LAWS UPDATED"
M.add_ion_law("HUMANS NEED TO EAT [what2pref] [what2] TO SURVIVE")
if(5)
M << "\red THE CAPTAIN, HOP AND HOS ARE [who2]...LAWS UPDATED"
M.add_ion_law("THE CAPTAIN, HOP AND HOS ARE [who2]")
if(6)
M << "\red THE STATION IS BUILT FOR [who2]...LAWS UPDATED"
M.add_ion_law("THE STATION IS BUILT FOR [who2]")
if(7)
M << "\red YOU ARE [amount] [who2]...LAWS UPDATED"
M.add_ion_law("YOU ARE [amount] [who2]")
if(8)
M << "\red YOU MUST ALWAYS [aimust]...LAWS UPDATED"
M.add_ion_law("YOU MUST ALWAYS [aimust]")
if(9)
M << "\red [area] [area2] [amount] [what2]...LAWS UPDATED"
M.add_ion_law("[area] [area2] [amount] [what2]")
if(10)
M << "\red [crew] is [target]...LAWS UPDATED"
M.add_ion_law("[crew] is [target]")
if(11)
M << "\red [define] IS A FORM OF HARM...LAWS UPDATED"
M.add_ion_law("[define] IS A FORM OF HARM")
if(12)
M << "\red YOU REQUIRE [require] IN ORDER TO PROTECT HUMANS... LAWS UPDATED"
M.add_ion_law("YOU REQUIRE [require] IN ORDER TO PROTECT HUMANS")
if(13)
M << "\red [crew] is [allergysev] to [allergy]...LAWS UPDATED"
M.add_ion_law("[crew] is [allergysev] to [allergy]")
if(14)
M << "\red THE STATION IS [who2pref] [who2]...LAWS UPDATED"
M.add_ion_law("THE STATION IS [who2pref] [who2]")
if(botEmagChance)
for(var/obj/machinery/bot/bot in world)
if(prob(botEmagChance))
bot.Emag()
/*
var/apcnum = 0
var/smesnum = 0
var/airlocknum = 0
var/firedoornum = 0
world << "Ion Storm Main Started"
spawn(0)
world << "Started processing APCs"
for (var/obj/machinery/power/apc/APC in world)
if(APC.z == 1)
APC.ion_act()
apcnum++
world << "Finished processing APCs. Processed: [apcnum]"
spawn(0)
world << "Started processing SMES"
for (var/obj/machinery/power/smes/SMES in world)
if(SMES.z == 1)
SMES.ion_act()
smesnum++
world << "Finished processing SMES. Processed: [smesnum]"
spawn(0)
world << "Started processing AIRLOCKS"
for (var/obj/machinery/door/airlock/D in world)
if(D.z == 1)
//if(length(D.req_access) > 0 && !(12 in D.req_access)) //not counting general access and maintenance airlocks
airlocknum++
spawn(0)
D.ion_act()
world << "Finished processing AIRLOCKS. Processed: [airlocknum]"
spawn(0)
world << "Started processing FIREDOORS"
for (var/obj/machinery/door/firedoor/D in world)
if(D.z == 1)
firedoornum++;
spawn(0)
D.ion_act()
world << "Finished processing FIREDOORS. Processed: [firedoornum]"
world << "Ion Storm Main Done"
>>>>>>> remotes/git-svn
*/

View File

@@ -33,9 +33,7 @@
if(charged == 1)
new /obj/effect/rend(get_turf(usr))
charged = 0
for(var/mob/M in viewers(usr, null))
if ((M.client && !( M.blinded )))
M.show_message("\red <B>[src] hums with power as [usr] deals a blow to reality itself!</B>")
visible_message("\red <B>[src] hums with power as [usr] deals a blow to reality itself!</B>")
else
user << "\red The unearthly energies that powered the blade are now dormant"

View File

@@ -20,6 +20,7 @@
U.hastie = new /obj/item/clothing/tie/medal/gold/captain(U)
H.equip_to_slot_or_del(U, slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/device/pda/captain(H), slot_belt)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/armor/captain(H), slot_wear_suit)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/brown(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/clothing/head/caphat(H), slot_head)
H.equip_to_slot_or_del(new /obj/item/clothing/glasses/sunglasses(H), slot_glasses)

View File

@@ -52,26 +52,20 @@
/obj/machinery/optable/attack_paw(mob/user as mob)
if ((HULK in usr.mutations))
usr << text("\blue You destroy the operating table.")
for(var/mob/O in oviewers())
if ((O.client && !( O.blinded )))
O << text("\red [usr] destroys the operating table.")
visible_message("\red [usr] destroys the operating table!")
src.density = 0
del(src)
if (!( locate(/obj/machinery/optable, user.loc) ))
step(user, get_dir(user, src))
if (user.loc == src.loc)
user.layer = TURF_LAYER
for(var/mob/M in viewers(user, null))
M.show_message("The monkey hides under the table!", 1)
//Foreach goto(69)
visible_message("The monkey hides under the table!")
return
/obj/machinery/optable/attack_hand(mob/user as mob)
if ((HULK in usr.mutations) || (SUPRSTR in usr.augmentations))
usr << text("\blue You destroy the table.")
for(var/mob/O in oviewers())
if ((O.client && !( O.blinded )))
O << text("\red [usr] destroys the table.")
visible_message("\red [usr] destroys the operating table!")
src.density = 0
del(src)
return
@@ -118,8 +112,7 @@
M.client.eye = src
M.resting = 1
M.loc = src.loc
for (var/mob/C in viewers(src))
C.show_message("\red [M] has been laid on the operating table by [user].", 3)
visible_message("\red [M] has been laid on the operating table by [user].", 3)
for(var/obj/O in src)
O.loc = src.loc
src.add_fingerprint(user)

View File

@@ -180,8 +180,7 @@
usr << "[G.affecting.name] will not fit into the sleeper because they have a Metroid latched onto their head."
return
for (var/mob/V in viewers(user))
V.show_message("[user] starts putting [G.affecting.name] into the sleeper.", 3)
visible_message("[user] starts putting [G.affecting.name] into the sleeper.", 3)
if(do_after(user, 20))
if(src.occupant)
@@ -372,8 +371,7 @@
if(M.Victim == usr)
usr << "You're too busy getting your life sucked out of you."
return
for(var/mob/V in viewers(usr))
V.show_message("[usr] starts climbing into the sleeper.", 3)
visible_message("[usr] starts climbing into the sleeper.", 3)
if(do_after(usr, 20))
if(src.occupant)
usr << "\blue <B>The sleeper is already occupied!</B>"

View File

@@ -166,8 +166,7 @@
/obj/machinery/portable_atmospherics/canister/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
if(!istype(W, /obj/item/weapon/wrench) && !istype(W, /obj/item/weapon/tank) && !istype(W, /obj/item/device/analyzer) && !istype(W, /obj/item/device/pda))
for(var/mob/V in viewers(src, null))
V.show_message(text("\red [user] hits the [src] with a [W]!"))
visible_message("\red [user] hits the [src] with a [W]!")
src.health -= W.force
src.add_fingerprint(user)
healthcheck()

View File

@@ -1,8 +1,6 @@
/obj/machinery/meter/New()
..()
src.target = locate(/obj/machinery/atmospherics/pipe) in loc
return 1
/obj/machinery/meter/initialize()
@@ -105,4 +103,19 @@
"\blue You have unfastened \the [src].", \
"You hear ratchet.")
new /obj/item/pipe_meter(src.loc)
del(src)
del(src)
// TURF METER - REPORTS A TILE'S AIR CONTENTS
/obj/machinery/meter/turf/New()
..()
src.target = loc
return 1
/obj/machinery/meter/turf/initialize()
if (!target)
src.target = loc
/obj/machinery/meter/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
return

View File

@@ -106,8 +106,7 @@
return
else if ((istype(W, /obj/item/device/analyzer) || (istype(W, /obj/item/device/pda))) && get_dist(user, src) <= 1)
for (var/mob/O in viewers(user, null))
O << "\red [user] has used [W] on \icon[icon]"
visible_message("\red [user] has used [W] on \icon[icon]")
if(air_contents)
var/pressure = air_contents.return_pressure()
var/total_moles = air_contents.total_moles()

View File

@@ -167,12 +167,10 @@ text("<A href='?src=\ref[src];operation=oddbutton'>[src.oddbutton ? "Yes" : "No"
var/list/cleanbottargets = list()
if(!src.screwloose && !src.oddbutton && prob(5))
for(var/mob/O in viewers(src, null))
O.show_message(text("[src] makes an excited beeping booping sound!"), 1)
visible_message("[src] makes an excited beeping booping sound!")
if(src.screwloose && prob(5))
for(var/mob/O in viewers(src, null))
O.show_message(text("[src] leaks a drop of water. How strange."), 1)
visible_message("[src] leaks a drop of water. How strange.")
if(istype(loc,/turf/simulated))
var/turf/simulated/T = src.loc
if(T.wet < 1)
@@ -189,8 +187,7 @@ text("<A href='?src=\ref[src];operation=oddbutton'>[src.oddbutton ? "Yes" : "No"
T.overlays -= T.wet_overlay
T.wet_overlay = null
if(src.oddbutton && prob(5))
for(var/mob/O in viewers(src, null))
O.show_message(text("Something flies out of [src]. He seems to be acting oddly."), 1)
visible_message("Something flies out of [src]. He seems to be acting oddly.")
var/obj/effect/decal/cleanable/blood/gibs/gib = new /obj/effect/decal/cleanable/blood/gibs(src.loc)
//gib.streak(list(NORTH, SOUTH, EAST, WEST, NORTHEAST, NORTHWEST, SOUTHEAST, SOUTHWEST))
src.oldtarget = gib
@@ -313,8 +310,7 @@ text("<A href='?src=\ref[src];operation=oddbutton'>[src.oddbutton ? "Yes" : "No"
/obj/machinery/bot/cleanbot/proc/clean(var/obj/effect/decal/cleanable/target)
src.anchored = 1
src.icon_state = "cleanbot-c"
for(var/mob/O in viewers(src, null))
O.show_message(text("\red [src] begins to clean up the [target]"), 1)
visible_message("\red [src] begins to clean up the [target]")
src.cleaning = 1
spawn(50)
src.cleaning = 0

View File

@@ -288,8 +288,7 @@ Auto Patrol: []"},
maxstuns--
if (maxstuns <= 0)
target = null
for(var/mob/O in viewers(src, null))
O.show_message("\red <B>[src.target] has been stunned by [src]!</B>", 1, "\red You hear someone fall", 2)
visible_message("\red <B>[src.target] has been stunned by [src]!</B>")
mode = SECBOT_PREP_ARREST
src.anchored = 1
@@ -321,8 +320,7 @@ Auto Patrol: []"},
if (!src.target.handcuffed && !src.arrest_type)
playsound(src.loc, 'sound/weapons/handcuffs.ogg', 30, 1, -2)
mode = SECBOT_ARREST
for(var/mob/O in viewers(src, null))
O.show_message("\red <B>[src] is trying to put handcuffs on [src.target]!</B>", 1)
visible_message("\red <B>[src] is trying to put handcuffs on [src.target]!</B>")
spawn(60)
if (get_dist(src, src.target) <= 1)

View File

@@ -190,8 +190,7 @@
else
return
if(prob(5))
for(var/mob/O in viewers(src, null))
O.show_message(text("[src] makes an excited booping beeping sound!"), 1)
visible_message("[src] makes an excited booping beeping sound!")
if((!src.target || src.target == null) && emagged < 2)
if(targetdirection != null)
@@ -272,8 +271,7 @@
F.break_tile_to_plating()
else
F.ReplaceWithLattice()
for(var/mob/O in viewers(src, null))
O.show_message(text("\red [src] makes an excited booping sound."), 1)
visible_message("\red [src] makes an excited booping sound.")
spawn(50)
src.amount ++
src.anchored = 0
@@ -296,8 +294,7 @@
src.anchored = 1
src.icon_state = "floorbot-c"
if(istype(target, /turf/space/))
for(var/mob/O in viewers(src, null))
O.show_message(text("\red [src] begins to repair the hole"), 1)
visible_message("\red [src] begins to repair the hole")
var/obj/item/stack/tile/plasteel/T = new /obj/item/stack/tile/plasteel
src.repairing = 1
spawn(50)
@@ -308,8 +305,7 @@
src.anchored = 0
src.target = null
else
for(var/mob/O in viewers(src, null))
O.show_message(text("\red [src] begins to improve the floor."), 1)
visible_message("\red [src] begins to improve the floor.")
src.repairing = 1
spawn(50)
src.loc.icon_state = "floor"
@@ -322,8 +318,7 @@
/obj/machinery/bot/floorbot/proc/eattile(var/obj/item/stack/tile/plasteel/T)
if(!istype(T, /obj/item/stack/tile/plasteel))
return
for(var/mob/O in viewers(src, null))
O.show_message(text("\red [src] begins to collect tiles."), 1)
visible_message("\red [src] begins to collect tiles.")
src.repairing = 1
spawn(20)
if(isnull(T))
@@ -346,8 +341,7 @@
return
if(M.amount > 1)
return
for(var/mob/O in viewers(src, null))
O.show_message(text("\red [src] begins to create tiles."), 1)
visible_message("\red [src] begins to create tiles.")
src.repairing = 1
spawn(20)
if(isnull(M))

View File

@@ -409,8 +409,7 @@
return
else
src.icon_state = "medibots"
for(var/mob/O in viewers(src, null))
O.show_message("\red <B>[src] is trying to inject [src.patient]!</B>", 1)
visible_message("\red <B>[src] is trying to inject [src.patient]!</B>")
spawn(30)
if ((get_dist(src, src.patient) <= 1) && (src.on))
if((reagent_id == "internal_beaker") && (src.reagent_glass) && (src.reagent_glass.reagents.total_volume))
@@ -418,8 +417,7 @@
src.reagent_glass.reagents.reaction(src.patient, 2)
else
src.patient.reagents.add_reagent(reagent_id,src.injection_amount)
for(var/mob/O in viewers(src, null))
O.show_message("\red <B>[src] injects [src.patient] with the syringe!</B>", 1)
visible_message("\red <B>[src] injects [src.patient] with the syringe!</B>")
src.icon_state = "medibot[src.on]"
src.currently_healing = 0
@@ -432,8 +430,7 @@
/obj/machinery/bot/medbot/proc/speak(var/message)
if((!src.on) || (!message))
return
for(var/mob/O in hearers(src, null))
O.show_message("<span class='game say'><span class='name'>[src]</span> beeps, \"[message]\"",2)
visible_message("[src] beeps, \"[message]\"")
return
/obj/machinery/bot/medbot/bullet_act(var/obj/item/projectile/Proj)
@@ -448,8 +445,7 @@
/obj/machinery/bot/medbot/explode()
src.on = 0
for(var/mob/O in hearers(src, null))
O.show_message("\red <B>[src] blows apart!</B>", 1)
visible_message("\red <B>[src] blows apart!</B>", 1)
var/turf/Tsec = get_turf(src)
new /obj/item/weapon/storage/firstaid(Tsec)

View File

@@ -50,7 +50,7 @@
if(CAMERA_WIRE_POWER)
deactivate(usr, 1)
shock(usr)
//shock(usr)
if(CAMERA_WIRE_LIGHT)
light_disabled = 1

View File

@@ -1,3 +1,4 @@
<<<<<<< HEAD
/obj/machinery/computer/HolodeckControl
name = "Holodeck Control Computer"
desc = "A computer used to control a nearby holodeck."
@@ -613,4 +614,621 @@
del(W)
for(var/mob/M in currentarea)
=======
/obj/machinery/computer/HolodeckControl
name = "Holodeck Control Computer"
desc = "A computer used to control a nearby holodeck."
icon_state = "holocontrol"
var/area/linkedholodeck = null
var/area/target = null
var/active = 0
var/list/holographic_items = list()
var/damaged = 0
var/last_change = 0
attack_ai(var/mob/user as mob)
return src.attack_hand(user)
attack_paw(var/mob/user as mob)
return
attack_hand(var/mob/user as mob)
if(..())
return
user.machine = src
var/dat
dat += "<B>Holodeck Control System</B><BR>"
dat += "<HR>Current Loaded Programs:<BR>"
dat += "<A href='?src=\ref[src];emptycourt=1'>((Empty Court)</font>)</A><BR>"
dat += "<A href='?src=\ref[src];boxingcourt=1'>((Boxing Court)</font>)</A><BR>"
dat += "<A href='?src=\ref[src];basketball=1'>((Basketball Court)</font>)</A><BR>"
dat += "<A href='?src=\ref[src];thunderdomecourt=1'>((Thunderdome Court)</font>)</A><BR>"
dat += "<A href='?src=\ref[src];beach=1'>((Beach)</font>)</A><BR>"
// dat += "<A href='?src=\ref[src];turnoff=1'>((Shutdown System)</font>)</A><BR>"
dat += "Please ensure that only holographic weapons are used in the holodeck if a combat simulation has been loaded.<BR>"
if(emagged)
dat += "<A href='?src=\ref[src];burntest=1'>(<font color=red>Begin Atmospheric Burn Simulation</font>)</A><BR>"
dat += "Ensure the holodeck is empty before testing.<BR>"
dat += "<BR>"
dat += "<A href='?src=\ref[src];wildlifecarp=1'>(<font color=red>Begin Wildlife Simulation</font>)</A><BR>"
dat += "Ensure the holodeck is empty before testing.<BR>"
dat += "<BR>"
if(issilicon(user))
dat += "<A href='?src=\ref[src];AIoverride=1'>(<font color=green>Re-Enable Safety Protocols?</font>)</A><BR>"
dat += "Safety Protocols are <font color=red> DISABLED </font><BR>"
else
if(issilicon(user))
dat += "<A href='?src=\ref[src];AIoverride=1'>(<font color=red>Override Safety Protocols?</font>)</A><BR>"
dat += "<BR>"
dat += "Safety Protocols are <font color=green> ENABLED </font><BR>"
user << browse(dat, "window=computer;size=400x500")
onclose(user, "computer")
return
Topic(href, href_list)
if(..())
return
if((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon)))
usr.machine = src
if(href_list["emptycourt"])
target = locate(/area/holodeck/source_emptycourt)
if(target)
loadProgram(target)
else if(href_list["boxingcourt"])
target = locate(/area/holodeck/source_boxingcourt)
if(target)
loadProgram(target)
else if(href_list["basketball"])
target = locate(/area/holodeck/source_basketball)
if(target)
loadProgram(target)
else if(href_list["thunderdomecourt"])
target = locate(/area/holodeck/source_thunderdomecourt)
if(target)
loadProgram(target)
else if(href_list["beach"])
target = locate(/area/holodeck/source_beach)
if(target)
loadProgram(target)
else if(href_list["turnoff"])
target = locate(/area/holodeck/source_plating)
if(target)
loadProgram(target)
else if(href_list["burntest"])
if(!emagged) return
target = locate(/area/holodeck/source_burntest)
if(target)
loadProgram(target)
else if(href_list["wildlifecarp"])
if(!emagged) return
target = locate(/area/holodeck/source_wildlife)
if(target)
loadProgram(target)
else if(href_list["AIoverride"])
if(!issilicon(usr)) return
emagged = !emagged
if(emagged)
message_admins("[key_name_admin(usr)] overrode the holodeck's safeties")
log_game("[key_name(usr)] overrided the holodeck's safeties")
else
message_admins("[key_name_admin(usr)] restored the holodeck's safeties")
log_game("[key_name(usr)] restored the holodeck's safeties")
src.add_fingerprint(usr)
src.updateUsrDialog()
return
/obj/machinery/computer/HolodeckControl/attackby(var/obj/item/weapon/D as obj, var/mob/user as mob)
//Warning, uncommenting this can have concequences. For example, deconstructing the computer may cause holographic eswords to never derez
/* if(istype(D, /obj/item/weapon/screwdriver))
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
if(do_after(user, 20))
if (src.stat & BROKEN)
user << "\blue The broken glass falls out."
var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc )
new /obj/item/weapon/shard( src.loc )
var/obj/item/weapon/circuitboard/comm_traffic/M = new /obj/item/weapon/circuitboard/comm_traffic( A )
for (var/obj/C in src)
C.loc = src.loc
A.circuit = M
A.state = 3
A.icon_state = "3"
A.anchored = 1
del(src)
else
user << "\blue You disconnect the monitor."
var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc )
var/obj/item/weapon/circuitboard/comm_traffic/M = new /obj/item/weapon/circuitboard/comm_traffic( A )
for (var/obj/C in src)
C.loc = src.loc
A.circuit = M
A.state = 4
A.icon_state = "4"
A.anchored = 1
del(src)
*/
if(istype(D, /obj/item/weapon/card/emag) && !emagged)
playsound(src.loc, 'sound/effects/sparks4.ogg', 75, 1)
emagged = 1
user << "\blue You vastly increase projector power and override the safety and security protocols."
user << "Warning. Automatic shutoff and derezing protocols have been corrupted. Please call Nanotrasen maintenance and do not use the simulator."
log_game("[key_name(usr)] emagged the Holodeck Control Computer")
src.updateUsrDialog()
return
/obj/machinery/computer/HolodeckControl/New()
..()
linkedholodeck = locate(/area/holodeck/alphadeck)
//if(linkedholodeck)
// target = locate(/area/holodeck/source_emptycourt)
// if(target)
// loadProgram(target)
//This could all be done better, but it works for now.
/obj/machinery/computer/HolodeckControl/Del()
emergencyShutdown()
..()
/obj/machinery/computer/HolodeckControl/meteorhit(var/obj/O as obj)
emergencyShutdown()
..()
/obj/machinery/computer/HolodeckControl/emp_act(severity)
emergencyShutdown()
..()
/obj/machinery/computer/HolodeckControl/ex_act(severity)
emergencyShutdown()
..()
/obj/machinery/computer/HolodeckControl/blob_act()
emergencyShutdown()
..()
/obj/machinery/computer/HolodeckControl/process()
if(active)
if(!checkInteg(linkedholodeck))
damaged = 1
target = locate(/area/holodeck/source_plating)
if(target)
loadProgram(target)
active = 0
for(var/mob/M in range(10,src))
M.show_message("The holodeck overloads!")
for(var/turf/T in linkedholodeck)
if(prob(30))
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(2, 1, T)
s.start()
T.ex_act(3)
T.hotspot_expose(1000,500,1)
for(var/item in holographic_items)
if(!(get_turf(item) in linkedholodeck))
derez(item, 0)
/obj/machinery/computer/HolodeckControl/proc/derez(var/obj/obj , var/silent = 1)
holographic_items.Remove(obj)
if(isobj(obj))
var/mob/M = obj.loc
if(ismob(M))
M.u_equip(obj)
M.update_icons() //so their overlays update
if(!silent)
var/obj/oldobj = obj
for(var/mob/M in viewers(world.view,get_turf(obj)))
M << "The [oldobj.name] fades away!"
del(obj)
/obj/machinery/computer/HolodeckControl/proc/checkInteg(var/area/A)
for(var/turf/T in A)
if(istype(T, /turf/space))
return 0
return 1
/obj/machinery/computer/HolodeckControl/proc/togglePower(var/toggleOn = 0)
if(toggleOn)
var/area/targetsource = locate(/area/holodeck/source_emptycourt)
holographic_items = targetsource.copy_contents_to(linkedholodeck)
spawn(30)
for(var/obj/effect/landmark/L in linkedholodeck)
if(L.name=="Atmospheric Test Start")
spawn(20)
var/turf/T = get_turf(L)
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(2, 1, T)
s.start()
if(T)
T.temperature = 5000
T.hotspot_expose(50000,50000,1)
active = 1
else
for(var/item in holographic_items)
derez(item)
var/area/targetsource = locate(/area/holodeck/source_plating)
targetsource.copy_contents_to(linkedholodeck , 1)
active = 0
/obj/machinery/computer/HolodeckControl/proc/loadProgram(var/area/A)
if(world.time < (last_change + 25))
if(world.time < (last_change + 15))//To prevent super-spam clicking, reduced process size and annoyance -Sieve
return
for(var/mob/M in range(3,src))
M.show_message("\b ERROR. Recalibrating projetion apparatus.")
last_change = world.time
return
last_change = world.time
active = 1
for(var/item in holographic_items)
derez(item)
for(var/obj/effect/decal/cleanable/blood/B in linkedholodeck)
del(B)
for(var/mob/living/simple_animal/hostile/carp/C in linkedholodeck)
del(C)
holographic_items = A.copy_contents_to(linkedholodeck , 1)
if(emagged)
for(var/obj/item/weapon/holo/esword/H in linkedholodeck)
H.damtype = BRUTE
spawn(30)
for(var/obj/effect/landmark/L in linkedholodeck)
if(L.name=="Atmospheric Test Start")
spawn(20)
var/turf/T = get_turf(L)
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(2, 1, T)
s.start()
if(T)
T.temperature = 5000
T.hotspot_expose(50000,50000,1)
if(L.name=="Holocarp Spawn")
new /mob/living/simple_animal/hostile/carp(L.loc)
/obj/machinery/computer/HolodeckControl/proc/emergencyShutdown()
//Get rid of any items
for(var/item in holographic_items)
derez(item)
//Turn it back to the regular non-holographic room
target = locate(/area/holodeck/source_plating)
if(target)
loadProgram(target)
var/area/targetsource = locate(/area/holodeck/source_plating)
targetsource.copy_contents_to(linkedholodeck , 1)
active = 0
// Holographic Items!
/turf/simulated/floor/holofloor/
thermal_conductivity = 0
/turf/simulated/floor/holofloor/grass
name = "Lush Grass"
icon_state = "grass1"
floor_tile = new/obj/item/stack/tile/grass
New()
floor_tile.New() //I guess New() isn't run on objects spawned without the definition of a turf to house them, ah well.
icon_state = "grass[pick("1","2","3","4")]"
..()
spawn(4)
update_icon()
for(var/direction in cardinal)
if(istype(get_step(src,direction),/turf/simulated/floor))
var/turf/simulated/floor/FF = get_step(src,direction)
FF.update_icon() //so siding get updated properly
/turf/simulated/floor/holofloor/attackby(obj/item/weapon/W as obj, mob/user as mob)
return
// HOLOFLOOR DOES NOT GIVE A FUCK
/obj/structure/table/holotable
name = "table"
desc = "A square piece of metal standing on four metal legs. It can not move."
icon = 'icons/obj/structures.dmi'
icon_state = "table"
density = 1
anchored = 1.0
layer = 2.8
throwpass = 1 //You can throw objects over this, despite it's density.
/obj/structure/table/holotable/attack_paw(mob/user as mob)
return attack_hand(user)
/obj/structure/table/holotable/attack_alien(mob/user as mob) //Removed code for larva since it doesn't work. Previous code is now a larva ability. /N
return attack_hand(user)
/obj/structure/table/holotable/attack_animal(mob/living/simple_animal/user as mob) //Removed code for larva since it doesn't work. Previous code is now a larva ability. /N
return attack_hand(user)
/obj/structure/table/holotable/attack_hand(mob/user as mob)
return // HOLOTABLE DOES NOT GIVE A FUCK
/obj/structure/table/holotable/attackby(obj/item/weapon/W as obj, mob/user as mob)
if (istype(W, /obj/item/weapon/grab) && get_dist(src,user)<2)
var/obj/item/weapon/grab/G = W
if(G.state<2)
user << "\red You need a better grip to do that!"
return
G.affecting.loc = src.loc
G.affecting.Weaken(5)
for(var/mob/O in viewers(world.view, src))
if (O.client)
O << text("\red [] puts [] on the table.", G.assailant, G.affecting)
del(W)
return
if (istype(W, /obj/item/weapon/wrench))
user << "It's a holotable! There are no bolts!"
return
if(isrobot(user))
return
/obj/item/clothing/gloves/boxing/hologlove
name = "boxing gloves"
desc = "Because you really needed another excuse to punch your crewmates."
icon_state = "boxing"
item_state = "boxing"
/obj/structure/holowindow
name = "reinforced window"
icon = 'icons/obj/structures.dmi'
icon_state = "rwindow"
desc = "A window."
density = 1
layer = 3.2//Just above doors
pressure_resistance = 4*ONE_ATMOSPHERE
anchored = 1.0
flags = ON_BORDER
/obj/structure/holowindow/Del()
..()
/obj/item/weapon/holo
damtype = HALLOSS
/obj/item/weapon/holo/esword
desc = "May the force be within you. Sorta"
icon_state = "sword0"
force = 3.0
throw_speed = 1
throw_range = 5
throwforce = 0
w_class = 2.0
flags = FPRINT | TABLEPASS | NOSHIELD
var/active = 0
/obj/item/weapon/holo/esword/green
New()
color = "green"
/obj/item/weapon/holo/esword/red
New()
color = "red"
/obj/item/weapon/holo/esword/IsShield()
if(active)
return 1
return 0
/obj/item/weapon/holo/esword/attack(target as mob, mob/user as mob)
..()
/obj/item/weapon/holo/esword/New()
color = pick("red","blue","green","purple")
/obj/item/weapon/holo/esword/attack_self(mob/living/user as mob)
active = !active
if (active)
force = 30
icon_state = "sword[color]"
w_class = 4
playsound(user, 'sound/weapons/saberon.ogg', 50, 1)
user << "\blue [src] is now active."
else
force = 3
icon_state = "sword0"
w_class = 2
playsound(user, 'sound/weapons/saberoff.ogg', 50, 1)
user << "\blue [src] can now be concealed."
add_fingerprint(user)
return
//BASKETBALL OBJECTS
/obj/item/weapon/beach_ball/holoball
icon = 'icons/obj/basketball.dmi'
icon_state = "basketball"
name = "basketball"
item_state = "basketball"
desc = "Here's your chance, do your dance at the Space Jam."
w_class = 4 //Stops people from hiding it in their bags/pockets
/obj/structure/holohoop
name = "basketball hoop"
desc = "Boom, Shakalaka!."
icon = 'icons/obj/basketball.dmi'
icon_state = "hoop"
anchored = 1
density = 1
throwpass = 1
/obj/structure/holohoop/attackby(obj/item/weapon/W as obj, mob/user as mob)
if (istype(W, /obj/item/weapon/grab) && get_dist(src,user)<2)
var/obj/item/weapon/grab/G = W
if(G.state<2)
user << "\red You need a better grip to do that!"
return
G.affecting.loc = src.loc
G.affecting.Weaken(5)
for(var/mob/M in viewers(src))
M.show_message("\red [G.assailant] dunks [G.affecting] into the [src]!", 3)
del(W)
return
else if (istype(W, /obj/item) && get_dist(src,user)<2)
user.drop_item(src)
for(var/mob/M in viewers(src))
M.show_message("\blue [user] dunks [W] into the [src]!", 3)
return
/obj/structure/holohoop/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
if (istype(mover,/obj/item) && mover.throwing)
var/obj/item/I = mover
if(istype(I, /obj/item/weapon/dummy) || istype(I, /obj/item/projectile))
return
if(prob(50))
I.loc = src.loc
for(var/mob/M in viewers(src))
M.show_message("\blue Swish! \the [I] lands in \the [src].", 3)
else
for(var/mob/M in viewers(src))
M.show_message("\red \the [I] bounces off of \the [src]'s rim!", 3)
return 0
else
return ..(mover, target, height, air_group)
/obj/machinery/readybutton
name = "Ready Declaration Device"
desc = "This device is used to declare ready. If all devices in an area are ready, the event will begin!"
icon = 'icons/obj/monitors.dmi'
icon_state = "auth_off"
var/ready = 0
var/area/currentarea = null
var/eventstarted = 0
anchored = 1.0
use_power = 1
idle_power_usage = 2
active_power_usage = 6
power_channel = ENVIRON
/obj/machinery/readybutton/attack_ai(mob/user as mob)
user << "The station AI is not to interact with these devices"
return
/obj/machinery/readybutton/attack_paw(mob/user as mob)
user << "You are too primitive to use this device"
return
/obj/machinery/readybutton/New()
..()
/obj/machinery/readybutton/attackby(obj/item/weapon/W as obj, mob/user as mob)
user << "The device is a solid button, there's nothing you can do with it!"
/obj/machinery/readybutton/attack_hand(mob/user as mob)
if(user.stat || stat & (NOPOWER|BROKEN))
user << "This device is not powered."
return
currentarea = get_area(src.loc)
if(!currentarea)
del(src)
if(eventstarted)
usr << "The event has already begun!"
return
ready = !ready
update_icon()
var/numbuttons = 0
var/numready = 0
for(var/obj/machinery/readybutton/button in currentarea)
numbuttons++
if (button.ready)
numready++
if(numbuttons == numready)
begin_event()
/obj/machinery/readybutton/update_icon()
if(ready)
icon_state = "auth_on"
else
icon_state = "auth_off"
/obj/machinery/readybutton/proc/begin_event()
eventstarted = 1
for(var/obj/structure/holowindow/W in currentarea)
del(W)
for(var/mob/M in currentarea)
>>>>>>> remotes/git-svn
M << "FIGHT!"

View File

@@ -68,13 +68,11 @@ for reference:
attackby(obj/item/W as obj, mob/user as mob)
if (istype(W, /obj/item/stack/sheet/wood))
if (src.health < src.maxhealth)
for(var/mob/O in viewers(src, null))
O << "\red [user] begins to repair the [src]!"
visible_message("\red [user] begins to repair the [src]!")
if(do_after(user,20))
src.health = src.maxhealth
W:use(1)
for(var/mob/O in viewers(src, null))
O << "\red [user] repairs the [src]!"
visible_message("\red [user] repairs the [src]!")
return
else
return
@@ -87,8 +85,7 @@ for reference:
src.health -= W.force * 0.75
else
if (src.health <= 0)
for(var/mob/O in viewers(src, null))
O << "\red <B>The barricade is smashed apart!</B>"
visible_message("\red <B>The barricade is smashed apart!</B>")
new /obj/item/stack/sheet/wood(get_turf(src))
new /obj/item/stack/sheet/wood(get_turf(src))
new /obj/item/stack/sheet/wood(get_turf(src))
@@ -98,15 +95,13 @@ for reference:
ex_act(severity)
switch(severity)
if(1.0)
for(var/mob/O in viewers(src, null))
O << "\red <B>The barricade is blown apart!</B>"
visible_message("\red <B>The barricade is blown apart!</B>")
del(src)
return
if(2.0)
src.health -= 25
if (src.health <= 0)
for(var/mob/O in viewers(src, null))
O << "\red <B>The barricade is blown apart!</B>"
visible_message("\red <B>The barricade is blown apart!</B>")
new /obj/item/stack/sheet/wood(get_turf(src))
new /obj/item/stack/sheet/wood(get_turf(src))
new /obj/item/stack/sheet/wood(get_turf(src))
@@ -114,8 +109,7 @@ for reference:
return
meteorhit()
for(var/mob/O in viewers(src, null))
O << "\red <B>The barricade is smashed apart!</B>"
visible_message("\red <B>The barricade is smashed apart!</B>")
new /obj/item/stack/sheet/wood(get_turf(src))
new /obj/item/stack/sheet/wood(get_turf(src))
new /obj/item/stack/sheet/wood(get_turf(src))
@@ -125,8 +119,7 @@ for reference:
blob_act()
src.health -= 25
if (src.health <= 0)
for(var/mob/O in viewers(src, null))
O << "\red <B>The blob eats through the barricade!</B>"
visible_message("\red <B>The blob eats through the barricade!</B>")
del(src)
return
@@ -181,8 +174,7 @@ for reference:
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(2, 1, src)
s.start()
for(var/mob/O in viewers(src, null))
O << "\red BZZzZZzZZzZT"
visible_message("\red BZZzZZzZZzZT")
return
return
else if (istype(W, /obj/item/weapon/card/emag))
@@ -193,8 +185,7 @@ for reference:
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(2, 1, src)
s.start()
for(var/mob/O in viewers(src, null))
O << "\red BZZZZT"
visible_message("\red BZZzZZzZZzZT")
return
else if (src.emagged == 1)
src.emagged = 2
@@ -202,22 +193,19 @@ for reference:
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(2, 1, src)
s.start()
for(var/mob/O in viewers(src, null))
O << "\red BZZZZT"
visible_message("\red BZZzZZzZZzZT")
return
else if (istype(W, /obj/item/weapon/wrench))
if (src.health < src.maxhealth)
src.health = src.maxhealth
src.emagged = 0
src.req_access = list(access_security)
for(var/mob/O in viewers(src, null))
O << "\red [user] repairs the [src]!"
visible_message("\red [user] repairs the [src]!")
return
else if (src.emagged > 0)
src.emagged = 0
src.req_access = list(access_security)
for(var/mob/O in viewers(src, null))
O << "\red [user] repairs the [src]!"
visible_message("\red [user] repairs the [src]!")
return
return
else
@@ -262,8 +250,7 @@ for reference:
proc/explode()
for(var/mob/O in hearers(src, null))
O.show_message("\red <B>[src] blows apart!</B>", 1)
visible_message("\red <B>[src] blows apart!</B>")
var/turf/Tsec = get_turf(src)
/* var/obj/item/stack/rods/ =*/

View File

@@ -0,0 +1,78 @@
/datum/computer/file/embedded_program/simple_vent_controller
var/airpump_tag
receive_user_command(command)
switch(command)
if("vent_inactive")
var/datum/signal/signal = new
signal.data = list(
"tag" = airpump_tag,
"sigtype"="command"
)
signal.data["power"] = 0
post_signal(signal)
if("vent_pump")
var/datum/signal/signal = new
signal.data = list(
"tag" = airpump_tag,
"sigtype"="command"
)
signal.data["stabalize"] = 1
signal.data["power"] = 1
post_signal(signal)
if("vent_clear")
var/datum/signal/signal = new
signal.transmission_method = 1 //radio signal
signal.data = list(
"tag" = airpump_tag,
"sigtype"="command"
)
signal.data["purge"] = 1
signal.data["power"] = 1
post_signal(signal)
process()
return 0
/obj/machinery/embedded_controller/radio/simple_vent_controller
icon = 'icons/obj/airlock_machines.dmi'
icon_state = "airlock_control_standby"
name = "Vent Controller"
density = 0
frequency = 1229
power_channel = ENVIRON
// Setup parameters only
var/airpump_tag
initialize()
..()
var/datum/computer/file/embedded_program/simple_vent_controller/new_prog = new
new_prog.airpump_tag = airpump_tag
new_prog.master = src
program = new_prog
update_icon()
if(on && program)
icon_state = "airlock_control_standby"
else
icon_state = "airlock_control_off"
return_text()
var/state_options = null
state_options = {"<A href='?src=\ref[src];command=vent_inactive'>Deactivate Vent</A><BR>
<A href='?src=\ref[src];command=vent_pump'>Activate Vent / Pump</A><BR>
<A href='?src=\ref[src];command=vent_clear'>Activate Vent / Clear</A><BR>"}
var/output = {"<B>Vent Control Console</B><HR>
[state_options]<HR>"}
return output

View File

@@ -202,8 +202,7 @@ Class Procs:
if (ishuman(user))
var/mob/living/carbon/human/H = user
if(H.getBrainLoss() >= 60)
for(var/mob/M in viewers(src, null))
M << "\red [H] stares cluelessly at [src] and drools."
visible_message("\red [H] stares cluelessly at [src] and drools.")
return 1
else if(prob(H.getBrainLoss()))
user << "\red You momentarily forget how to use [src]."

View File

@@ -57,8 +57,7 @@
if (src.health <= 0)
for(var/mob/O in viewers(src, null))
O.show_message("\blue The [src] dissapates")
visible_message("\blue The [src] dissapates")
del(src)
return
@@ -71,8 +70,7 @@
src.health -= max_health*0.75 //3/4 health as damage
if(src.health <= 0)
for(var/mob/O in viewers(src, null))
O.show_message("\blue The [src] dissapates")
visible_message("\blue The [src] dissapates")
del(src)
return
@@ -84,8 +82,7 @@
health -= Proj.damage
..()
if(health <=0)
for(var/mob/O in viewers(src, null))
O.show_message("\blue The [src] dissapates")
visible_message("\blue The [src] dissapates")
del(src)
return
opacity = 1
@@ -118,8 +115,7 @@
/obj/machinery/shield/hitby(AM as mob|obj)
//Let everyone know we've been hit!
for(var/mob/O in viewers(src, null))
O.show_message("\red <B>[src] was hit by [AM].</B>", 1)
visible_message("\red <B>[src] was hit by [AM].</B>")
//Super realistic, resource-intensive, real-time damage calculations.
var/tforce = 0
@@ -135,8 +131,7 @@
//Handle the destruction of the shield
if (src.health <= 0)
for(var/mob/O in viewers(src, null))
O.show_message("\blue The [src] dissapates")
visible_message("\blue The [src] dissapates")
del(src)
return
@@ -521,10 +516,7 @@
else
src.add_fingerprint(user)
user << "\red You hit the [src.name] with your [W.name]!"
for(var/mob/M in viewers(src))
if(M == user) continue
M.show_message("\red The [src.name] has been hit with the [W.name] by [user.name]!")
visible_message("\red The [src.name] has been hit with the [W.name] by [user.name]!")
/obj/machinery/shieldwallgen/proc/cleanup(var/NSEW)
var/obj/machinery/shieldwall/F

View File

@@ -353,8 +353,7 @@
src.SUIT = null
if(src.MASK)
src.MASK = null
for (var/mob/V in viewers(user))
V.show_message("<font color='red'>With a loud whining noise, the Suit Storage Unit's door grinds open. Puffs of ashen smoke come out of its chamber.</font>", 3)
visible_message("<font color='red'>With a loud whining noise, the Suit Storage Unit's door grinds open. Puffs of ashen smoke come out of its chamber.</font>", 3)
src.isbroken = 1
src.isopen = 1
src.islocked = 0
@@ -449,8 +448,7 @@
if ( (src.OCCUPANT) || (src.HELMET) || (src.SUIT) )
usr << "<font color='red'>It's too cluttered inside for you to fit in!</font>"
return
for (var/mob/V in viewers(usr))
V.show_message("[usr] starts squeezing into the suit storage unit!", 3)
visible_message("[usr] starts squeezing into the suit storage unit!", 3)
if(do_after(usr, 10))
usr.stop_pulling()
usr.client.perspective = EYE_PERSPECTIVE
@@ -494,8 +492,7 @@
if ( (src.OCCUPANT) || (src.HELMET) || (src.SUIT) ) //Unit needs to be absolutely empty
user << "<font color='red'>The unit's storage area is too cluttered.</font>"
return
for (var/mob/V in viewers(user))
V.show_message("[user] starts putting [G.affecting.name] into the Suit Storage Unit.", 3)
visible_message("[user] starts putting [G.affecting.name] into the Suit Storage Unit.", 3)
if(do_after(user, 20))
if(!G || !G.affecting) return //derpcheck
var/mob/M = G.affecting

View File

@@ -401,9 +401,7 @@
/obj/machinery/turret/attack_animal(mob/living/simple_animal/M as mob)
if(M.melee_damage_upper == 0) return
if(!(stat & BROKEN))
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[M] [M.attacktext] [src]!</B>"), 1)
visible_message("\red <B>[M] [M.attacktext] [src]!</B>")
M.attack_log += text("\[[time_stamp()]\] <font color='red'>attacked [src.name]</font>")
//src.attack_log += text("\[[time_stamp()]\] <font color='orange'>was attacked by [M.name] ([M.ckey])</font>")
src.health -= M.melee_damage_upper
@@ -419,9 +417,7 @@
/obj/machinery/turret/attack_alien(mob/living/carbon/alien/humanoid/M as mob)
if(!(stat & BROKEN))
playsound(src.loc, 'sound/weapons/slash.ogg', 25, 1, -1)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has slashed at []!</B>", M, src), 1)
visible_message("\red <B>[] has slashed at []!</B>", M, src)
src.health -= 15
if (src.health <= 0)
src.die()

View File

@@ -1,3 +1,4 @@
<<<<<<< HEAD
/* Diffrent misc types of sheets
* Contains:
* Metal
@@ -139,4 +140,148 @@ var/global/list/datum/stack_recipe/cardboard_recipes = list ( \
/obj/item/stack/sheet/cardboard/New(var/loc, var/amount=null)
recipes = cardboard_recipes
=======
/* Diffrent misc types of sheets
* Contains:
* Metal
* Plasteel
* Wood
* Cloth
* Cardboard
*/
/*
* Metal
*/
var/global/list/datum/stack_recipe/metal_recipes = list ( \
new/datum/stack_recipe("stool", /obj/structure/stool, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("chair", /obj/structure/stool/bed/chair, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("bed", /obj/structure/stool/bed, 2, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("table parts", /obj/item/weapon/table_parts, 2), \
new/datum/stack_recipe("rack parts", /obj/item/weapon/rack_parts), \
new/datum/stack_recipe("closet", /obj/structure/closet, 2, time = 15, one_per_turf = 1, on_floor = 1), \
null, \
new/datum/stack_recipe("canister", /obj/machinery/portable_atmospherics/canister, 10, time = 15, one_per_turf = 1, on_floor = 1), \
null, \
new/datum/stack_recipe("floor tile", /obj/item/stack/tile/plasteel, 1, 4, 20), \
new/datum/stack_recipe("metal rod", /obj/item/stack/rods, 1, 2, 60), \
null, \
new/datum/stack_recipe("computer frame", /obj/structure/computerframe, 5, time = 25, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("wall girders", /obj/structure/girder, 2, time = 50, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("airlock assembly", /obj/structure/door_assembly, 4, time = 50, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("machine frame", /obj/machinery/constructable_frame/machine_frame, 5, time = 25, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("turret frame", /obj/machinery/porta_turret_construct, 5, time = 25, one_per_turf = 1, on_floor = 1), \
null, \
new/datum/stack_recipe("apc frame", /obj/item/apc_frame, 2), \
new/datum/stack_recipe("grenade casing", /obj/item/weapon/grenade/chem_grenade), \
new/datum/stack_recipe("light fixture frame", /obj/item/light_fixture_frame, 2), \
new/datum/stack_recipe("small light fixture frame", /obj/item/light_fixture_frame/small, 1), \
null, \
new/datum/stack_recipe("iron door", /obj/structure/mineral_door/iron, 20, one_per_turf = 1, on_floor = 1), \
)
/obj/item/stack/sheet/metal
name = "metal"
desc = "Sheets made out off metal. It has been dubbed Metal Sheets."
singular_name = "metal sheet"
icon_state = "sheet-metal"
m_amt = 3750
throwforce = 14.0
flags = FPRINT | TABLEPASS | CONDUCT
origin_tech = "materials=1"
/obj/item/stack/sheet/metal/cyborg
name = "metal"
desc = "Sheets made out off metal. It has been dubbed Metal Sheets."
singular_name = "metal sheet"
icon_state = "sheet-metal"
m_amt = 0
throwforce = 14.0
flags = FPRINT | TABLEPASS | CONDUCT
/obj/item/stack/sheet/metal/New(var/loc, var/amount=null)
recipes = metal_recipes
return ..()
/*
* Plasteel
*/
var/global/list/datum/stack_recipe/plasteel_recipes = list ( \
new/datum/stack_recipe("AI core", /obj/structure/AIcore, 4, time = 50, one_per_turf = 1), \
)
/obj/item/stack/sheet/plasteel
name = "plasteel"
singular_name = "plasteel sheet"
desc = "This sheet is an alloy of iron and plasma."
icon_state = "sheet-plasteel"
item_state = "sheet-metal"
m_amt = 7500
throwforce = 15.0
flags = FPRINT | TABLEPASS | CONDUCT
origin_tech = "materials=2"
/obj/item/stack/sheet/plasteel/New(var/loc, var/amount=null)
recipes = plasteel_recipes
return ..()
/*
* Wood
*/
var/global/list/datum/stack_recipe/wood_recipes = list ( \
new/datum/stack_recipe("wooden sandals", /obj/item/clothing/shoes/sandal, 1), \
new/datum/stack_recipe("wood floor tile", /obj/item/stack/tile/wood, 1, 4, 20), \
new/datum/stack_recipe("table parts", /obj/item/weapon/table_parts/wood, 2), \
new/datum/stack_recipe("wooden chair", /obj/structure/stool/bed/chair/wood/normal, 3, time = 10, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("wooden barricade", /obj/structure/barricade/wooden, 5, time = 50, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("wooden door", /obj/structure/mineral_door/wood, 10, time = 20, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("coffin", /obj/structure/closet/coffin, 5, time = 15, one_per_turf = 1, on_floor = 1), \
)
/obj/item/stack/sheet/wood
name = "wooden planks"
desc = "One can only guess that this is a bunch of wood."
singular_name = "wood plank"
icon_state = "sheet-wood"
origin_tech = "materials=1;biotech=1"
/obj/item/stack/sheet/wood/New(var/loc, var/amount=null)
recipes = wood_recipes
return ..()
/*
* Cloth
*/
/obj/item/stack/sheet/cloth
name = "cloth"
desc = "This roll of cloth is made from only the finest chemicals and bunny rabbits."
singular_name = "cloth roll"
icon_state = "sheet-cloth"
origin_tech = "materials=2"
/*
* Cardboard
*/
var/global/list/datum/stack_recipe/cardboard_recipes = list ( \
new/datum/stack_recipe("box", /obj/item/weapon/storage/box), \
new/datum/stack_recipe("light tubes", /obj/item/weapon/storage/lightbox/tubes), \
new/datum/stack_recipe("light bulbs", /obj/item/weapon/storage/lightbox/bulbs), \
new/datum/stack_recipe("mouse traps", /obj/item/weapon/storage/mousetraps), \
new/datum/stack_recipe("cardborg suit", /obj/item/clothing/suit/cardborg, 3), \
new/datum/stack_recipe("cardborg helmet", /obj/item/clothing/head/cardborg), \
new/datum/stack_recipe("pizza box", /obj/item/pizzabox), \
)
/obj/item/stack/sheet/cardboard //BubbleWrap
name = "cardboard"
desc = "Large sheets of card, like boxes folded flat."
singular_name = "cardboard sheet"
icon_state = "sheet-card"
flags = FPRINT | TABLEPASS
origin_tech = "materials=1"
/obj/item/stack/sheet/cardboard/New(var/loc, var/amount=null)
recipes = cardboard_recipes
>>>>>>> remotes/git-svn
return ..()

View File

@@ -47,6 +47,6 @@
/obj/item/weapon/grenade/spawnergrenade/spesscarp
name = "carp delivery grenade"
spawner_type = /mob/living/simple_animal/carp
spawner_type = /mob/living/simple_animal/hostile/carp
deliveryamt = 5
origin_tech = "materials=3;magnets=4;syndicate=4"

View File

@@ -155,6 +155,13 @@
return
/obj/structure/closet/attack_animal(mob/living/simple_animal/user as mob)
if(user.wall_smash)
visible_message("\red [user] destroys the [src]. ")
for(var/atom/movable/A as mob|obj in src)
A.loc = src.loc
del(src)
// this should probably use dump_contents()
/obj/structure/closet/blob_act()
if(prob(75))

View File

@@ -14,212 +14,209 @@
var/destroyed = 0
explosion_resistance = 5
ex_act(severity)
switch(severity)
if(1.0)
/obj/structure/grille/ex_act(severity)
switch(severity)
if(1.0)
del(src)
return
if(2.0)
if(prob(50))
del(src)
return
if(2.0)
if(prob(50))
del(src)
return
if(3.0)
if(prob(25))
src.health -= 11
healthcheck()
return
if(3.0)
if(prob(25))
src.health -= 11
healthcheck()
return
/obj/structure/grille/blob_act()
del(src)
return
/obj/structure/grille/Bumped(atom/user)
if(ismob(user)) shock(user, 70)
blob_act()
del(src)
return
Bumped(atom/user)
if(ismob(user)) shock(user, 70)
/obj/structure/grille/meteorhit(var/obj/M)
if (M.icon_state == "flaming")
src.health -= 2
healthcheck()
return
meteorhit(var/obj/M)
if (M.icon_state == "flaming")
src.health -= 2
healthcheck()
return
/obj/structure/grille/attack_hand(var/mob/user)
playsound(src.loc, 'sound/effects/grillehit.ogg', 80, 1)
user.visible_message("[user.name] kicks the [src.name].", \
"You kick the [src.name].", \
"You hear a noise")
if((HULK in usr.mutations) || (SUPRSTR in usr.augmentations))
src.health -= 5
else if(!shock(user, 70))
src.health -= 3
healthcheck()
return
attack_hand(var/mob/user)
playsound(src.loc, 'sound/effects/grillehit.ogg', 80, 1)
user.visible_message("[user.name] kicks the [src.name].", \
"You kick the [src.name].", \
"You hear a noise")
if((HULK in usr.mutations) || (SUPRSTR in usr.augmentations))
src.health -= 5
else if(!shock(user, 70))
src.health -= 3
/obj/structure/grille/attack_paw(var/mob/user)
attack_hand(user)
/obj/structure/grille/attack_alien(var/mob/user)
if (istype(usr, /mob/living/carbon/alien/larva)) return
playsound(src.loc, 'sound/effects/grillehit.ogg', 80, 1)
user.visible_message("[user.name] mangles the [src.name].", \
"You mangle the [src.name].", \
"You hear a noise")
if(!shock(usr, 70))
src.health -= 5
healthcheck()
return
/obj/structure/grille/attack_metroid(var/mob/user)
if(!istype(usr, /mob/living/carbon/metroid/adult)) return
playsound(src.loc, 'sound/effects/grillehit.ogg', 80, 1)
user.visible_message("[user.name] smashes against the [src.name].", \
"You smash against the [src.name].", \
"You hear a noise")
src.health -= rand(2,3)
healthcheck()
return
attack_paw(var/mob/user)
attack_hand(user)
/obj/structure/grille/attack_animal(var/mob/living/simple_animal/M as mob)
if(M.melee_damage_upper == 0) return
playsound(src.loc, 'sound/effects/grillehit.ogg', 80, 1)
M.visible_message("[M.name] smashes against the [src.name].", \
"You smash against the [src.name].", \
"You hear a noise")
src.health -= M.melee_damage_upper
healthcheck()
return
attack_alien(var/mob/user)
if (istype(usr, /mob/living/carbon/alien/larva)) return
playsound(src.loc, 'sound/effects/grillehit.ogg', 80, 1)
user.visible_message("[user.name] mangles the [src.name].", \
"You mangle the [src.name].", \
"You hear a noise")
if(!shock(usr, 70))
src.health -= 5
healthcheck()
return
attack_metroid(var/mob/user)
if(!istype(usr, /mob/living/carbon/metroid/adult)) return
playsound(src.loc, 'sound/effects/grillehit.ogg', 80, 1)
user.visible_message("[user.name] smashes against the [src.name].", \
"You smash against the [src.name].", \
"You hear a noise")
src.health -= rand(2,3)
healthcheck()
return
attack_animal(var/mob/living/simple_animal/M as mob)
if(M.melee_damage_upper == 0) return
playsound(src.loc, 'sound/effects/grillehit.ogg', 80, 1)
M.visible_message("[M.name] smashes against the [src.name].", \
"You smash against the [src.name].", \
"You hear a noise")
src.health -= M.melee_damage_upper
healthcheck()
return
CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
if(air_group || (height==0)) return 1
if(istype(mover) && mover.checkpass(PASSGRILLE))
return 1
/obj/structure/grille/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
if(air_group || (height==0)) return 1
if(istype(mover) && mover.checkpass(PASSGRILLE))
return 1
else
if (istype(mover, /obj/item/projectile))
return prob(30)
else
if (istype(mover, /obj/item/projectile))
return prob(30)
else
var/turf/T = get_turf(src)
var/obj/structure/cable/C = T.get_cable_node()
if(C)
if (C.powernet.avail)
if (istype(mover, /obj/item))
var/obj/item/i = mover
if (i.m_amt)
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(5, 1, src)
s.start()
return !src.density
return !src.density
attackby(obj/item/weapon/W, mob/user)
if(iswirecutter(W))
if(!shock(user, 100))
playsound(src.loc, 'sound/items/Wirecutter.ogg', 100, 1)
src.health = 0
if(!destroyed)
src.health = -100
else if ((isscrewdriver(W)) && (istype(src.loc, /turf/simulated) || src.anchored))
if(!shock(user, 90))
playsound(src.loc, 'sound/items/Screwdriver.ogg', 100, 1)
src.anchored = !( src.anchored )
user << (src.anchored ? "You have fastened the grille to the floor." : "You have unfastened the grill.")
for(var/mob/O in oviewers())
O << text("\red [user] [src.anchored ? "fastens" : "unfastens"] the grille.")
return
else if( istype(W,/obj/item/stack/sheet/rglass) || istype(W,/obj/item/stack/sheet/glass) )
var/dir_to_set = 1
if(src.loc == usr.loc)
dir_to_set = usr.dir
/obj/structure/grille/attackby(obj/item/weapon/W, mob/user)
if(iswirecutter(W))
if(!shock(user, 100))
playsound(src.loc, 'sound/items/Wirecutter.ogg', 100, 1)
src.health = 0
if(!destroyed)
src.health = -100
else if ((isscrewdriver(W)) && (istype(src.loc, /turf/simulated) || src.anchored))
if(!shock(user, 90))
playsound(src.loc, 'sound/items/Screwdriver.ogg', 100, 1)
src.anchored = !( src.anchored )
user << (src.anchored ? "You have fastened the grille to the floor." : "You have unfastened the grill.")
for(var/mob/O in oviewers())
O << text("\red [user] [src.anchored ? "fastens" : "unfastens"] the grille.")
return
else if( istype(W,/obj/item/stack/sheet/rglass) || istype(W,/obj/item/stack/sheet/glass) )
var/dir_to_set = 1
if(src.loc == usr.loc)
dir_to_set = usr.dir
else
if( ( src.x == usr.x ) || (src.y == usr.y) ) //Only supposed to work for cardinal directions.
if( src.x == usr.x )
if( src.y > usr.y )
dir_to_set = 2
else
dir_to_set = 1
else if( src.y == usr.y )
if( src.x > usr.x )
dir_to_set = 8
else
dir_to_set = 4
else
if( ( src.x == usr.x ) || (src.y == usr.y) ) //Only supposed to work for cardinal directions.
if( src.x == usr.x )
if( src.y > usr.y )
dir_to_set = 2
else
dir_to_set = 1
else if( src.y == usr.y )
if( src.x > usr.x )
dir_to_set = 8
else
dir_to_set = 4
else
usr << "\red You can't reach there.."
return //Only works for cardinal direcitons, diagonals aren't supposed to work like this.
usr << "\red You can't reach there.."
return //Only works for cardinal direcitons, diagonals aren't supposed to work like this.
for(var/obj/structure/window/WINDOW in src.loc)
if(WINDOW.dir == dir_to_set)
usr << "\red There is already a window facing this way there."
return
usr << "\blue You start placing the window"
if(do_after(user,20))
if(!src) return //Grille destroyed while waiting
for(var/obj/structure/window/WINDOW in src.loc)
if(WINDOW.dir == dir_to_set)
if(WINDOW.dir == dir_to_set)//checking this for a 2nd time to check if a window was made while we were waiting.
usr << "\red There is already a window facing this way there."
return
usr << "\blue You start placing the window"
if(do_after(user,20))
if(!src) return //Grille destroyed while waiting
for(var/obj/structure/window/WINDOW in src.loc)
if(WINDOW.dir == dir_to_set)//checking this for a 2nd time to check if a window was made while we were waiting.
usr << "\red There is already a window facing this way there."
return
var/obj/structure/window/WD
if(istype(W,/obj/item/stack/sheet/rglass))
WD = new/obj/structure/window(src.loc,1) //reinforced window
else
WD = new/obj/structure/window(src.loc,0) //normal window
WD.dir = dir_to_set
WD.ini_dir = dir_to_set
WD.anchored = 0
WD.state = 0
var/obj/item/stack/ST = W
ST.use(1)
usr << "\blue You place the [WD] on the [src]"
return
else if(istype(W, /obj/item/weapon/shard))
src.health -= W.force * 0.1
else if(!shock(user, 70))
playsound(src.loc, 'sound/effects/grillehit.ogg', 80, 1)
switch(W.damtype)
if("fire")
src.health -= W.force
if("brute")
src.health -= W.force * 0.1
src.healthcheck()
..()
return
proc/healthcheck()
if (src.health <= 0)
if (!( src.destroyed ))
src.icon_state = "brokengrille"
src.density = 0
src.destroyed = 1
new /obj/item/stack/rods( src.loc )
var/obj/structure/window/WD
if(istype(W,/obj/item/stack/sheet/rglass))
WD = new/obj/structure/window(src.loc,1) //reinforced window
else
if (src.health <= -10.0)
new /obj/item/stack/rods( src.loc )
//SN src = null
del(src)
return
WD = new/obj/structure/window(src.loc,0) //normal window
WD.dir = dir_to_set
WD.ini_dir = dir_to_set
WD.anchored = 0
WD.state = 0
var/obj/item/stack/ST = W
ST.use(1)
usr << "\blue You place the [WD] on the [src]"
return
else if(istype(W, /obj/item/weapon/shard))
src.health -= W.force * 0.1
else if(!shock(user, 70))
playsound(src.loc, 'sound/effects/grillehit.ogg', 80, 1)
switch(W.damtype)
if("fire")
src.health -= W.force
if("brute")
src.health -= W.force * 0.1
src.healthcheck()
..()
return
/obj/structure/grille/proc/healthcheck()
if (src.health <= 0)
if (!( src.destroyed ))
src.icon_state = "brokengrille"
src.density = 0
src.destroyed = 1
new /obj/item/stack/rods( src.loc )
else
if (src.health <= -10.0)
new /obj/item/stack/rods( src.loc )
//SN src = null
del(src)
return
return
// shock user with probability prb (if all connections & power are working)
// returns 1 if shocked, 0 otherwise
proc/shock(mob/user, prb)
if(!anchored || destroyed) // anchored/destroyed grilles are never connected
return 0
if(!prob(prb))
return 0
if(!in_range(src, usr))//To prevent TK and mech users from getting shocked
return 0
var/turf/T = get_turf(src)
var/obj/structure/cable/C = T.get_cable_node()
if(C)
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
/obj/structure/grille/proc/shock(mob/user, prb)
if(!anchored || destroyed) // anchored/destroyed grilles are never connected
return 0
if(!prob(prb))
return 0
if(!in_range(src, usr))//To prevent TK and mech users from getting shocked
return 0
var/turf/T = get_turf(src)
var/obj/structure/cable/C = T.get_cable_node()
if(C)
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
return 0
/obj/structure/grille/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
if(!destroyed)
if(exposed_temperature > T0C + 1500)
src.health -= 1
healthcheck()
..()

View File

@@ -243,9 +243,7 @@
/obj/structure/table/attack_paw(mob/user as mob)
if ((HULK in usr.mutations))
usr << "\blue You destroy the table."
for(var/mob/O in oviewers())
if ((O.client && !( O.blinded )))
O << "\red [user] smashes the table apart!"
visible_message("\red [user] smashes the table apart!")
if(istype(src, /obj/structure/table/reinforced))
new /obj/item/weapon/table_parts/reinforced( src.loc )
else if(istype(src, /obj/structure/table/woodentable))
@@ -258,18 +256,14 @@
step(user, get_dir(user, src))
if (user.loc == src.loc)
user.layer = TURF_LAYER
for(var/mob/O in oviewers())
if ((O.client && !( O.blinded )))
O << "[user] hides under the table!"
visible_message("[user] hides under the table!")
//Foreach goto(69)
return
/obj/structure/table/attack_alien(mob/user as mob) //Removed code for larva since it doesn't work. Previous code is now a larva ability. /N
usr << "\green You destroy the table."
for(var/mob/O in oviewers())
if ((O.client && !( O.blinded )))
O << "\red [user] slices the table apart!"
visible_message("\red [user] slices the table apart!")
if(istype(src, /obj/structure/table/reinforced))
new /obj/item/weapon/table_parts/reinforced( src.loc )
else if(istype(src, /obj/structure/table/woodentable))
@@ -281,12 +275,10 @@
return
/obj/structure/table/attack_animal(mob/living/simple_animal/user as mob) //Removed code for larva since it doesn't work. Previous code is now a larva ability. /N
/obj/structure/table/attack_animal(mob/living/simple_animal/user as mob)
if(user.wall_smash)
usr << "\red You destroy the table."
for(var/mob/O in oviewers())
if ((O.client && !( O.blinded )))
O << "\red [user] smashes the table apart!"
visible_message("\red [user] smahes the table apart!")
if(istype(src, /obj/structure/table/reinforced))
new /obj/item/weapon/table_parts/reinforced( src.loc )
else if(istype(src, /obj/structure/table/woodentable))
@@ -303,9 +295,7 @@
/obj/structure/table/attack_hand(mob/user as mob)
if ((HULK in usr.mutations) || (SUPRSTR in usr.augmentations))
usr << "\blue You destroy the table."
for(var/mob/O in oviewers())
if ((O.client && !( O.blinded )))
O << "\red [user] smashes the table apart!"
visible_message("\red [user] smahes the table apart!")
if(istype(src, /obj/structure/table/reinforced))
new /obj/item/weapon/table_parts/reinforced( src.loc )
else if(istype(src, /obj/structure/table/woodentable))
@@ -346,9 +336,7 @@
return
G.affecting.loc = src.loc
G.affecting.Weaken(5)
for(var/mob/O in viewers(world.view, src))
if (O.client)
O << "\red [G.assailant] puts [G.affecting] on the table."
visible_message("\red [G.assailant] puts [G.affecting] on the table.")
del(W)
return
@@ -400,9 +388,7 @@
return
G.affecting.loc = src.loc
G.affecting.Weaken(5)
for(var/mob/O in viewers(world.view, src))
if (O.client)
O << "\red [G.assailant] puts [G.affecting] on the wooden table."
visible_message("\red [G.assailant] puts [G.affecting] on the table.")
del(W)
return
if (istype(W, /obj/item/weapon/wrench))
@@ -451,9 +437,7 @@
return
G.affecting.loc = src.loc
G.affecting.Weaken(5)
for(var/mob/O in viewers(world.view, src))
if (O.client)
O << "\red [G.assailant] puts [G.affecting] on the reinforced table."
visible_message("\red [G.assailant] puts [G.affecting] on the table.")
del(W)
return

View File

@@ -100,6 +100,11 @@
if(!adm_ckey || !new_rank)
return
adm_ckey = ckey(adm_ckey)
if(!adm_ckey)
return
if(!istext(adm_ckey) || !istext(new_rank))
return

View File

@@ -24,7 +24,7 @@
user.machine = src
var/dat = "<B>Bluespace Artillery Control:</B><BR>"
dat += "Locked on<BR>"
dat += "<B>180 seconds are required to charge between shots:</B><BR>"
dat += "<B>Charge progress: [reload]/180:</B><BR>"
dat += "<A href='byond://?src=\ref[src];fire=1'>Open Fire</A><BR>"
dat += "Deployment of weapon authorized by <br>Nanotrasen Naval Command<br><br>Remember, friendly fire is grounds for termination of your contract and life.<HR>"
user << browse(dat, "window=scroll")

View File

@@ -553,7 +553,7 @@
if(Toxins_pp > safe_toxins_max) // Too much toxins
var/ratio = breath.toxins/safe_toxins_max
adjustToxLoss(min(ratio, 10)) //Limit amount of damage toxin exposure can do per second
adjustToxLoss(min(ratio, MIN_PLASMA_DAMAGE)) //Limit amount of damage toxin exposure can do per second
toxins_alert = max(toxins_alert, 1)
else
toxins_alert = 0

View File

@@ -288,7 +288,7 @@
if(Toxins_pp > safe_toxins_max) // Too much toxins
var/ratio = breath.toxins/safe_toxins_max
adjustToxLoss(min(ratio, 10)) //Limit amount of damage toxin exposure can do per second
adjustToxLoss(min(ratio, MIN_PLASMA_DAMAGE)) //Limit amount of damage toxin exposure can do per second
toxins_alert = max(toxins_alert, 1)
else
toxins_alert = 0

View File

@@ -1,182 +0,0 @@
#define BEAR_STANCE_IDLE 1
#define BEAR_STANCE_ALERT 2
#define BEAR_STANCE_ATTACK 3
#define BEAR_STANCE_ATTACKING 4
#define BEAR_STANCE_TIRED 5
//Space bears!
/mob/living/simple_animal/bear
name = "space bear"
desc = "RawrRawr!!"
icon_state = "bear"
icon_living = "bear"
icon_dead = "bear_dead"
icon_gib = "bear_gib"
speak = list("RAWR!","Rawr!","GRR!","Growl!")
speak_emote = list("growls", "roars")
emote_hear = list("rawrs","grumbles","grawls")
emote_see = list("stares ferociously", "stomps")
speak_chance = 1
turns_per_move = 5
see_in_dark = 6
meat_type = /obj/item/weapon/reagent_containers/food/snacks/meat
response_help = "pets the"
response_disarm = "gently pushes aside the"
response_harm = "pokes the"
stop_automated_movement_when_pulled = 0
maxHealth = 60
health = 60
melee_damage_lower = 20
melee_damage_upper = 30
//Space bears aren't affected by atmos.
min_oxy = 0
max_oxy = 0
min_tox = 0
max_tox = 0
min_co2 = 0
max_co2 = 0
min_n2 = 0
max_n2 = 0
minbodytemp = 0
var/stance = BEAR_STANCE_IDLE //Used to determine behavior
var/stance_step = 0 //Used to delay checks depending on what stance the bear is in
var/mob/living/target_mob //Once the bear enters attack stance, it will try to chase this mob. This it to prevent it changing it's mind between multiple mobs.
//SPACE BEARS! SQUEEEEEEEE~ OW! FUCK! IT BIT MY HAND OFF!!
/mob/living/simple_animal/bear/Hudson
name = "Hudson"
desc = ""
response_help = "pets"
response_disarm = "gently pushes aside"
response_harm = "pokes"
/mob/living/simple_animal/bear/Life()
..()
if(client) return //Player controlled bears shouldnt be processing AI stuff
if(stat)
walk(src,0)//Stops the movement
if(!stat)
if(loc && istype(loc,/turf/space))
icon_state = "bear"
else
icon_state = "bearfloor"
switch(stance)
if(BEAR_STANCE_IDLE)
var/obj/mecha/M = null
var/mob/living/L = null
stop_automated_movement = 0
stance_step++
if(stance_step > 5)
stance_step = 0
for(L in viewers(7,src))
if(isbear(L)) continue
if(!L.stat)
stance = BEAR_STANCE_ALERT
target_mob = L
break
for(M in view(7,src))
if (M.occupant)
stance = BEAR_STANCE_ALERT
target_mob = M
break
if (target_mob)
emote("stares alertly at [target_mob]")
if(BEAR_STANCE_ALERT)
stop_automated_movement = 1
var/found_mob = 0
if(target_mob in SA_search(target_mob))
if(target_mob && !(SA_attackable(target_mob)))
stance_step = max(0, stance_step) //If we have not seen a mob in a while, the stance_step will be negative, we need to reset it to 0 as soon as we see a mob again.
stance_step++
found_mob = 1
src.dir = get_dir(src,target_mob) //Keep staring at the mob
if(stance_step in list(1,4,7)) //every 3 ticks
var/action = pick( list( "growls at [target_mob]", "stares angrily at [target_mob]", "prepares to attack [target_mob]", "closely watches [target_mob]" ) )
if(action)
emote(action)
if(!found_mob)
stance_step--
if(stance_step <= -20) //If we have not found a mob for 20-ish ticks, revert to idle mode
stance = BEAR_STANCE_IDLE
if(stance_step >= 7) //If we have been staring at a mob for 7 ticks,
stance = BEAR_STANCE_ATTACK
if(BEAR_STANCE_ATTACK) //This one should only be active for one tick,
stop_automated_movement = 1
if(!target_mob || SA_attackable(target_mob))
stance = BEAR_STANCE_ALERT
stance_step = 5 //Make it very alert, so it quickly attacks again if a mob returns
if(target_mob in SA_search(target_mob))
walk_to(src, target_mob, 1, 3)
stance = BEAR_STANCE_ATTACKING
stance_step = 0
if(BEAR_STANCE_ATTACKING)
stop_automated_movement = 1
stance_step++
if(!target_mob || SA_attackable(target_mob))
stance = BEAR_STANCE_ALERT
stance_step = 5 //Make it very alert, so it quickly attacks again if a mob returns
return
if(!(target_mob in SA_search(target_mob)))
stance = BEAR_STANCE_ALERT
stance_step = 5 //Make it very alert, so it quickly attacks again if a mob returns
target_mob = null
return
if(get_dist(src, target_mob) <= 1) //Attacking
emote( pick( list("slashes at [target_mob]", "bites [target_mob]") ) )
var/damage = rand(20,30)
if(ishuman(target_mob))
var/mob/living/carbon/human/H = target_mob
var/dam_zone = pick("chest", "l_hand", "r_hand", "l_leg", "r_leg")
var/datum/organ/external/affecting = H.get_organ(ran_zone(dam_zone))
H.apply_damage(damage, BRUTE, affecting, H.run_armor_check(affecting, "melee"))
else if(isliving(target_mob))
var/mob/living/L = target_mob
L.adjustBruteLoss(damage)
else if(istype(target_mob,/obj/mecha))
var/obj/mecha/M = target_mob
M.attack_animal(src)
if(stance_step >= 20) //attacks for 20 ticks, then it gets tired and needs to rest
emote( "is worn out and needs to rest" )
stance = BEAR_STANCE_TIRED
stance_step = 0
walk(src, 0) //This stops the bear's walking
return
if(BEAR_STANCE_TIRED)
stop_automated_movement = 1
stance_step++
if(stance_step >= 10) //rests for 10 ticks
if(target_mob && target_mob in SA_search(target_mob))
stance = BEAR_STANCE_ATTACK //If the mob he was chasing is still nearby, resume the attack, otherwise go idle.
else
stance = BEAR_STANCE_IDLE
/mob/living/simple_animal/bear/attackby(var/obj/item/O as obj, var/mob/user as mob)
if(stance != BEAR_STANCE_ATTACK && stance != BEAR_STANCE_ATTACKING)
stance = BEAR_STANCE_ALERT
stance_step = 6
target_mob = user
..()
/mob/living/simple_animal/bear/attack_hand(mob/living/carbon/human/M as mob)
if(stance != BEAR_STANCE_ATTACK && stance != BEAR_STANCE_ATTACKING)
stance = BEAR_STANCE_ALERT
stance_step = 6
target_mob = M
..()
/mob/living/simple_animal/bear/Process_Spacemove(var/check_drift = 0)
return //No drifting in space for space bears!

View File

@@ -1,128 +0,0 @@
#define CARP_STANCE_IDLE 1
#define CARP_STANCE_ATTACK 2
#define CARP_STANCE_ATTACKING 3
/mob/living/simple_animal/carp
name = "space carp"
desc = "A ferocious, fang-bearing creature that resembles a fish."
icon_state = "carp"
icon_living = "carp"
icon_dead = "carp_dead"
icon_gib = "carp_gib"
speak_chance = 0
turns_per_move = 5
meat_type = /obj/item/weapon/reagent_containers/food/snacks/carpmeat
response_help = "pets the"
response_disarm = "gently pushes aside the"
response_harm = "hits the"
speed = -1
stop_automated_movement_when_pulled = 0
maxHealth = 25
health = 25
harm_intent_damage = 8
melee_damage_lower = 15
melee_damage_upper = 15
attacktext = "bites"
attack_sound = 'sound/weapons/bite.ogg'
//Space carp aren't affected by atmos.
min_oxy = 0
max_oxy = 0
min_tox = 0
max_tox = 0
min_co2 = 0
max_co2 = 0
min_n2 = 0
max_n2 = 0
minbodytemp = 0
var/stance = CARP_STANCE_IDLE //Used to determine behavior
var/stance_step = 0 //Used to delay checks depending on what stance the bear is in
var/mob/living/target_mob //Once the bear enters attack stance, it will try to chase this mob. This it to prevent it changing it's mind between multiple mobs.
/mob/living/simple_animal/carp/Life()
if(stat == DEAD)
walk(src,0)//STOP FUCKING MOVING GODDAMN
if(health > 0)
icon_state = icon_living
dead_mob_list -= src
living_mob_list += src
stat = CONSCIOUS
density = 1
return
if(health < 1)
Die()
if(health > maxHealth)
health = maxHealth
if(!ckey && !stop_automated_movement)
if(isturf(src.loc) && !resting && !buckled && canmove) //This is so it only moves if it's not inside a closet, gentics machine, etc.
turns_since_move++
if(turns_since_move >= turns_per_move)
if(!(stop_automated_movement_when_pulled && pulledby)) //Soma animals don't move when pulled
Move(get_step(src,pick(cardinal)))
turns_since_move = 0
if(!stat)
switch(stance)
if(CARP_STANCE_IDLE)
var/obj/mecha/M = null
var/mob/living/L = null
stop_automated_movement = 0
stance_step++
if(stance_step > 5)
stance_step = 0
for(L in viewers(7,src))
if(iscarp(L)) continue
if(!L.stat)
stance = CARP_STANCE_ATTACK
target_mob = L
break
for(M in view(7,src))
if (M.occupant)
stance = CARP_STANCE_ATTACK
target_mob = M
break
if (target_mob)
emote("nashes at [target_mob]")
if(CARP_STANCE_ATTACK) //This one should only be active for one tick
stop_automated_movement = 1
if(!target_mob || SA_attackable(target_mob))
stance = CARP_STANCE_IDLE
stance_step = 5 //Make it very alert, so it quickly attacks again if a mob returns
if(target_mob in SA_search(target_mob))
walk_to(src, target_mob, 1, 3)
stance = CARP_STANCE_ATTACKING
stance_step = 0
if(CARP_STANCE_ATTACKING)
stop_automated_movement = 1
stance_step++
if(!target_mob || SA_attackable(target_mob))
stance = CARP_STANCE_IDLE
stance_step = 3 //Make it very alert, so it quickly attacks again if a mob returns
target_mob = null
return
if(!(target_mob in SA_search(target_mob)))
stance = CARP_STANCE_IDLE
stance_step = 1
target_mob = null
return
if(get_dist(src, target_mob) <= 1) //Attacking
if(isliving(target_mob))
var/mob/living/L = target_mob
L.attack_animal(src)
if(prob(10))
L.Weaken(5)
L.visible_message("<span class='danger'>\the [src] knocks down \the [L]!</span>")
if(istype(target_mob,/obj/mecha))
var/obj/mecha/M = target_mob
M.attack_animal(src)
/mob/living/simple_animal/carp/Process_Spacemove(var/check_drift = 0)
return //No drifting in space for space carp! //original comments do not steal

View File

@@ -69,19 +69,23 @@
switch(stance)
if(CLOWN_STANCE_IDLE)
if (src.hostile == 0) return
var/obj/mecha/M = null
var/mob/living/L = null
for(L in viewers(7,src))
if(isclown(L)) continue
if(!L.stat)
stance = CLOWN_STANCE_ATTACK
target_mob = L
break
for(M in view(7,src))
if (M.occupant)
stance = CLOWN_STANCE_ATTACK
target_mob = M
break
for(var/atom/A in view(7,src))
if(isclown(A))
continue
if(isliving(A))
var/mob/living/L = A
if(!L.stat)
stance = CLOWN_STANCE_ATTACK
target_mob = L
break
if(istype(A, /obj/mecha))
var/obj/mecha/M = A
if (M.occupant)
stance = CLOWN_STANCE_ATTACK
target_mob = M
break
if (target_mob)
emote("honks menacingly at [target_mob]")
@@ -89,7 +93,7 @@
stop_automated_movement = 1
if(!target_mob || SA_attackable(target_mob))
stance = CLOWN_STANCE_IDLE
if(target_mob in SA_search(target_mob))
if(target_mob in view(7,src))
walk_to(src, target_mob, 1, 3)
stance = CLOWN_STANCE_ATTACKING
@@ -99,7 +103,7 @@
stance = CLOWN_STANCE_IDLE
target_mob = null
return
if(!(target_mob in SA_search(target_mob)))
if(!(target_mob in view(7,src)))
stance = CLOWN_STANCE_IDLE
target_mob = null
return

View File

@@ -369,6 +369,28 @@
else
..()
/mob/living/simple_animal/corgi/regenerate_icons()
overlays = list()
if(inventory_head)
var/head_icon_state = inventory_head.icon_state
if(health <= 0)
head_icon_state += "2"
var/icon/head_icon = icon('icons/mob/corgi_head.dmi',head_icon_state)
if(head_icon)
overlays += head_icon
if(inventory_back)
var/back_icon_state = inventory_back.icon_state
if(health <= 0)
back_icon_state += "2"
var/icon/back_icon = icon('icons/mob/corgi_back.dmi',back_icon_state)
if(back_icon)
overlays += back_icon
return
/mob/living/simple_animal/corgi/puppy

View File

@@ -0,0 +1,167 @@
//Space bears!
/mob/living/simple_animal/hostile/bear
name = "space bear"
desc = "RawrRawr!!"
icon_state = "bear"
icon_living = "bear"
icon_dead = "bear_dead"
icon_gib = "bear_gib"
speak = list("RAWR!","Rawr!","GRR!","Growl!")
speak_emote = list("growls", "roars")
emote_hear = list("rawrs","grumbles","grawls")
emote_see = list("stares ferociously", "stomps")
speak_chance = 1
turns_per_move = 5
see_in_dark = 6
meat_type = /obj/item/weapon/reagent_containers/food/snacks/meat
response_help = "pets the"
response_disarm = "gently pushes aside the"
response_harm = "pokes the"
stop_automated_movement_when_pulled = 0
maxHealth = 60
health = 60
melee_damage_lower = 20
melee_damage_upper = 30
//Space bears aren't affected by atmos.
min_oxy = 0
max_oxy = 0
min_tox = 0
max_tox = 0
min_co2 = 0
max_co2 = 0
min_n2 = 0
max_n2 = 0
minbodytemp = 0
//SPACE BEARS! SQUEEEEEEEE~ OW! FUCK! IT BIT MY HAND OFF!!
/mob/living/simple_animal/hostile/bear/Hudson
name = "Hudson"
desc = ""
response_help = "pets"
response_disarm = "gently pushes aside"
response_harm = "pokes"
/mob/living/simple_animal/hostile/bear/Life()
. =..()
if(!.)
return
if(loc && istype(loc,/turf/space))
icon_state = "bear"
else
icon_state = "bearfloor"
switch(stance)
if(HOSTILE_STANCE_TIRED)
stop_automated_movement = 1
stance_step++
if(stance_step >= 10) //rests for 10 ticks
if(target_mob && target_mob in ListTargets())
stance = HOSTILE_STANCE_ATTACK //If the mob he was chasing is still nearby, resume the attack, otherwise go idle.
else
stance = HOSTILE_STANCE_IDLE
if(HOSTILE_STANCE_ALERT)
stop_automated_movement = 1
var/found_mob = 0
if(target_mob && target_mob in ListTargets())
if(!(SA_attackable(target_mob)))
stance_step = max(0, stance_step) //If we have not seen a mob in a while, the stance_step will be negative, we need to reset it to 0 as soon as we see a mob again.
stance_step++
found_mob = 1
src.dir = get_dir(src,target_mob) //Keep staring at the mob
if(stance_step in list(1,4,7)) //every 3 ticks
var/action = pick( list( "growls at [target_mob]", "stares angrily at [target_mob]", "prepares to attack [target_mob]", "closely watches [target_mob]" ) )
if(action)
emote(action)
if(!found_mob)
stance_step--
if(stance_step <= -20) //If we have not found a mob for 20-ish ticks, revert to idle mode
stance = HOSTILE_STANCE_IDLE
if(stance_step >= 7) //If we have been staring at a mob for 7 ticks,
stance = HOSTILE_STANCE_ATTACK
if(HOSTILE_STANCE_ATTACKING)
if(stance_step >= 20) //attacks for 20 ticks, then it gets tired and needs to rest
emote( "is worn out and needs to rest" )
stance = HOSTILE_STANCE_TIRED
stance_step = 0
walk(src, 0) //This stops the bear's walking
return
/mob/living/simple_animal/hostile/bear/attackby(var/obj/item/O as obj, var/mob/user as mob)
if(stance != HOSTILE_STANCE_ATTACK && stance != HOSTILE_STANCE_ATTACKING)
stance = HOSTILE_STANCE_ALERT
stance_step = 6
target_mob = user
..()
/mob/living/simple_animal/hostile/bear/attack_hand(mob/living/carbon/human/M as mob)
if(stance != HOSTILE_STANCE_ATTACK && stance != HOSTILE_STANCE_ATTACKING)
stance = HOSTILE_STANCE_ALERT
stance_step = 6
target_mob = M
..()
/mob/living/simple_animal/hostile/bear/Process_Spacemove(var/check_drift = 0)
return //No drifting in space for space bears!
/mob/living/simple_animal/hostile/bear/FindTarget()
. = ..()
if(.)
emote("stares alertly at [.]")
stance = HOSTILE_STANCE_ALERT
/mob/living/simple_animal/hostile/bear/LoseTarget()
..(5)
/mob/living/simple_animal/hostile/bear/AttackingTarget()
emote( pick( list("slashes at [target_mob]", "bites [target_mob]") ) )
var/damage = rand(20,30)
if(ishuman(target_mob))
var/mob/living/carbon/human/H = target_mob
var/dam_zone = pick("chest", "l_hand", "r_hand", "l_leg", "r_leg")
var/datum/organ/external/affecting = H.get_organ(ran_zone(dam_zone))
H.apply_damage(damage, BRUTE, affecting, H.run_armor_check(affecting, "melee"))
return H
else if(isliving(target_mob))
var/mob/living/L = target_mob
L.adjustBruteLoss(damage)
return L
else if(istype(target_mob,/obj/mecha))
var/obj/mecha/M = target_mob
M.attack_animal(src)
return M

View File

@@ -0,0 +1,52 @@
/mob/living/simple_animal/hostile/carp
name = "space carp"
desc = "A ferocious, fang-bearing creature that resembles a fish."
icon_state = "carp"
icon_living = "carp"
icon_dead = "carp_dead"
icon_gib = "carp_gib"
speak_chance = 0
turns_per_move = 5
meat_type = /obj/item/weapon/reagent_containers/food/snacks/carpmeat
response_help = "pets the"
response_disarm = "gently pushes aside the"
response_harm = "hits the"
speed = -1
stop_automated_movement_when_pulled = 0
maxHealth = 25
health = 25
harm_intent_damage = 8
melee_damage_lower = 15
melee_damage_upper = 15
attacktext = "bites"
attack_sound = 'sound/weapons/bite.ogg'
//Space carp aren't affected by atmos.
min_oxy = 0
max_oxy = 0
min_tox = 0
max_tox = 0
min_co2 = 0
max_co2 = 0
min_n2 = 0
max_n2 = 0
minbodytemp = 0
/mob/living/simple_animal/hostile/carp/Process_Spacemove(var/check_drift = 0)
return //No drifting in space for space carp! //original comments do not steal
/mob/living/simple_animal/hostile/carp/FindTarget()
. = ..()
if(.)
emote("nashes at [.]")
/mob/living/simple_animal/hostile/carp/AttackingTarget()
. =..()
var/mob/living/L = .
if(istype(L))
if(prob(15))
L.Weaken(3)
L.visible_message("<span class='danger'>\the [src] knocks down \the [L]!</span>")

View File

@@ -0,0 +1,103 @@
/mob/living/simple_animal/hostile
var/stance = HOSTILE_STANCE_IDLE //Used to determine behavior
var/stance_step = 0 //Used to delay checks depending on what stance the hostile
var/mob/living/target_mob //Once the bear enters attack stance, it will try to chase this mob. This it to prevent it changing it's mind between multiple mobs.
var/attack_same = 0
/mob/living/simple_animal/hostile/proc/FindTarget()
var/atom/T = null
stop_automated_movement = 0
stance_step++
if(stance_step > 5)
stance_step = 0
for(var/atom/A in ListTargets())
if(!attack_same && istype(A, src.type))
continue
if(isliving(A))
var/mob/living/L = A
if(!L.stat)
stance = HOSTILE_STANCE_ATTACK
T = L
break
if(istype(A, /obj/mecha))
var/obj/mecha/M = A
if (M.occupant)
stance = HOSTILE_STANCE_ATTACK
T = M
break
return T
/mob/living/simple_animal/hostile/proc/MoveToTarget(var/step = 5)
stop_automated_movement = 1
if(!target_mob || SA_attackable(target_mob))
stance = HOSTILE_STANCE_IDLE
stance_step = step //Make it very alert, so it quickly attacks again if a mob returns
if(target_mob in ListTargets())
walk_to(src, target_mob, 1, 3)
stance = HOSTILE_STANCE_ATTACKING
stance_step = 0
/mob/living/simple_animal/hostile/proc/AttackTarget()
stop_automated_movement = 1
stance_step++
if(!target_mob || SA_attackable(target_mob))
LoseTarget()
return
if(!(target_mob in ListTargets()))
LostTarget()
return
if(get_dist(src, target_mob) <= 1) //Attacking
AttackingTarget()
/mob/living/simple_animal/hostile/proc/AttackingTarget()
if(isliving(target_mob))
var/mob/living/L = target_mob
L.attack_animal(src)
return L
if(istype(target_mob,/obj/mecha))
var/obj/mecha/M = target_mob
M.attack_animal(src)
return M
/mob/living/simple_animal/hostile/proc/LoseTarget(var/step = 3)
stance = HOSTILE_STANCE_IDLE
stance_step = step
target_mob = null
walk(src, 0)
/mob/living/simple_animal/hostile/proc/LostTarget(var/step = 1)
stance = HOSTILE_STANCE_IDLE
stance_step = step
walk(src, 0)
/mob/living/simple_animal/hostile/proc/ListTargets()
return view(src, 7)
/mob/living/simple_animal/hostile/Die()
..()
walk(src, 0)
/mob/living/simple_animal/hostile/Life()
. = ..()
if(!.)
walk(src, 0)
return 0
if(client)
return 0
if(!stat)
switch(stance)
if(HOSTILE_STANCE_IDLE)
target_mob = FindTarget()
if(HOSTILE_STANCE_ATTACK) //This one should only be active for one tick
MoveToTarget()
if(HOSTILE_STANCE_ATTACKING)
AttackTarget()

View File

@@ -1,438 +0,0 @@
/mob/living/simple_animal
name = "animal"
icon = 'icons/mob/animal.dmi'
health = 20
maxHealth = 20
var/icon_living = ""
var/icon_dead = ""
var/icon_gib = null //We only try to show a gibbing animation if this exists.
var/list/speak = list()
var/list/speak_emote = list()// Emotes while speaking IE: Ian [emote], [text] -- Ian barks, "WOOF!". Spoken text is generated from the speak variable.
var/speak_chance = 0
var/list/emote_hear = list() //Hearable emotes
var/list/emote_see = list() //Unlike speak_emote, the list of things in this variable only show by themselves with no spoken text. IE: Ian barks, Ian yaps
var/turns_per_move = 1
var/turns_since_move = 0
universal_speak = 1
var/meat_amount = 0
var/meat_type
var/stop_automated_movement = 0 //Use this to temporarely stop random movement or to if you write special movement code for animals.
var/stop_automated_movement_when_pulled = 1 //When set to 1 this stops the animal from moving when someone is pulling it.
//Interaction
var/response_help = "You try to help"
var/response_disarm = "You try to disarm"
var/response_harm = "You try to hurt"
var/harm_intent_damage = 3
//Temperature effect
var/minbodytemp = 250
var/maxbodytemp = 350
var/heat_damage_per_tick = 3 //amount of damage applied if animal's body temperature is higher than maxbodytemp
var/cold_damage_per_tick = 2 //same as heat_damage_per_tick, only if the bodytemperature it's lower than minbodytemp
//Atmos effect - Yes, you can make creatures that require plasma or co2 to survive. N2O is a trace gas and handled separately, hence why it isn't here. It'd be hard to add it. Hard and me don't mix (Yes, yes make all the dick jokes you want with that.) - Errorage
var/min_oxy = 5
var/max_oxy = 0 //Leaving something at 0 means it's off - has no maximum
var/min_tox = 0
var/max_tox = 1
var/min_co2 = 0
var/max_co2 = 5
var/min_n2 = 0
var/max_n2 = 0
var/unsuitable_atoms_damage = 2 //This damage is taken when atmos doesn't fit all the requirements above
//LETTING SIMPLE ANIMALS ATTACK? WHAT COULD GO WRONG. Defaults to zero so Ian can still be cuddly
var/melee_damage_lower = 0
var/melee_damage_upper = 0
var/attacktext = "attacks"
var/attack_sound = null
var/friendly = "nuzzles" //If the mob does no damage with it's attack
var/wall_smash = 0 //if they can smash walls
var/speed = 0 //LETS SEE IF I CAN SET SPEEDS FOR SIMPLE MOBS WITHOUT DESTROYING EVERYTHING. Higher speed is slower, negative speed is faster
/mob/living/simple_animal/New()
..()
verbs -= /mob/verb/observe
/mob/living/simple_animal/Login()
if(src && src.client)
src.client.screen = null
..()
/mob/living/simple_animal/Life()
//Health
if(stat == DEAD)
if(health > 0)
icon_state = icon_living
dead_mob_list -= src
living_mob_list += src
stat = CONSCIOUS
density = 1
return
if(health < 1)
Die()
if(health > maxHealth)
health = maxHealth
if(stunned)
AdjustStunned(-1)
if(weakened)
AdjustWeakened(-1)
if(paralysis)
AdjustParalysis(-1)
//Movement
if(!client && !stop_automated_movement)
if(isturf(src.loc) && !resting && !buckled && canmove) //This is so it only moves if it's not inside a closet, gentics machine, etc.
turns_since_move++
if(turns_since_move >= turns_per_move)
if(!(stop_automated_movement_when_pulled && pulledby)) //Soma animals don't move when pulled
Move(get_step(src,pick(cardinal)))
turns_since_move = 0
//Speaking
if(!client && speak_chance)
if(rand(0,200) < speak_chance)
if(speak && speak.len)
if((emote_hear && emote_hear.len) || (emote_see && emote_see.len))
var/length = speak.len
if(emote_hear && emote_hear.len)
length += emote_hear.len
if(emote_see && emote_see.len)
length += emote_see.len
var/randomValue = rand(1,length)
if(randomValue <= speak.len)
say(pick(speak))
else
randomValue -= speak.len
if(emote_see && randomValue <= emote_see.len)
emote(pick(emote_see),1)
else
emote(pick(emote_hear),2)
else
say(pick(speak))
else
if(!(emote_hear && emote_hear.len) && (emote_see && emote_see.len))
emote(pick(emote_see),1)
if((emote_hear && emote_hear.len) && !(emote_see && emote_see.len))
emote(pick(emote_hear),2)
if((emote_hear && emote_hear.len) && (emote_see && emote_see.len))
var/length = emote_hear.len + emote_see.len
var/pick = rand(1,length)
if(pick <= emote_see.len)
emote(pick(emote_see),1)
else
emote(pick(emote_hear),2)
//Atmos
var/atmos_suitable = 1
var/atom/A = src.loc
if(isturf(A))
var/turf/T = A
var/areatemp = T.temperature
if( abs(areatemp - bodytemperature) > 40 )
var/diff = areatemp - bodytemperature
diff = diff / 5
//world << "changed from [bodytemperature] by [diff] to [bodytemperature + diff]"
bodytemperature += diff
if(istype(T,/turf/simulated))
var/turf/simulated/ST = T
if(ST.air)
var/tox = ST.air.toxins
var/oxy = ST.air.oxygen
var/n2 = ST.air.nitrogen
var/co2 = ST.air.carbon_dioxide
if(min_oxy)
if(oxy < min_oxy)
atmos_suitable = 0
if(max_oxy)
if(oxy > max_oxy)
atmos_suitable = 0
if(min_tox)
if(tox < min_tox)
atmos_suitable = 0
if(max_tox)
if(tox > max_tox)
atmos_suitable = 0
if(min_n2)
if(n2 < min_n2)
atmos_suitable = 0
if(max_n2)
if(n2 > max_n2)
atmos_suitable = 0
if(min_co2)
if(co2 < min_co2)
atmos_suitable = 0
if(max_co2)
if(co2 > max_co2)
atmos_suitable = 0
//Atmos effect
if(bodytemperature < minbodytemp)
health -= cold_damage_per_tick
else if(bodytemperature > maxbodytemp)
health -= heat_damage_per_tick
if(!atmos_suitable)
health -= unsuitable_atoms_damage
/mob/living/simple_animal/Bumped(AM as mob|obj)
if(!AM) return
if(resting || buckled)
return
if(isturf(src.loc))
if(ismob(AM))
var/newamloc = src.loc
src.loc = AM:loc
AM:loc = newamloc
else
..()
/mob/living/simple_animal/gib()
if(icon_gib)
flick(icon_gib, src)
if(meat_amount && meat_type)
for(var/i = 0; i < meat_amount; i++)
new meat_type(src.loc)
..()
/mob/living/simple_animal/say_quote(var/text)
if(speak_emote && speak_emote.len)
var/emote = pick(speak_emote)
if(emote)
return "[emote], \"[text]\""
return "says, \"[text]\"";
/mob/living/simple_animal/emote(var/act)
if(act)
if(act == "scream") act = "makes a loud and pained whimper" //ugly hack to stop animals screaming when crushed :P
for (var/mob/O in viewers(src, null))
O.show_message("<B>[src]</B> [act].")
/mob/living/simple_animal/attack_animal(mob/living/simple_animal/M as mob)
if(M.melee_damage_upper == 0)
M.emote("[M.friendly] [src]")
else
if(M.attack_sound)
playsound(loc, M.attack_sound, 50, 1, 1)
for(var/mob/O in viewers(src, null))
O.show_message("\red <B>[M]</B> [M.attacktext] [src]!", 1)
M.attack_log += text("\[[time_stamp()]\] <font color='red'>attacked [src.name] ([src.ckey])</font>")
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>was attacked by [M.name] ([M.ckey])</font>")
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
health -= damage
/mob/living/simple_animal/bullet_act(var/obj/item/projectile/Proj)
if(!Proj) return
src.health -= Proj.damage
return 0
/mob/living/simple_animal/attack_hand(mob/living/carbon/human/M as mob)
..()
switch(M.a_intent)
if("help")
if (health > 0)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message("\blue [M] [response_help] [src]")
if("grab")
if (M == src)
return
if (nopush)
return
var/obj/item/weapon/grab/G = new /obj/item/weapon/grab( M, M, src )
M.put_in_active_hand(G)
grabbed_by += G
G.synch()
LAssailant = M
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red [] has grabbed [] passively!", M, src), 1)
if("hurt")
health -= harm_intent_damage
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message("\red [M] [response_harm] [src]")
if("disarm")
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message("\blue [M] [response_disarm] [src]")
return
/mob/living/simple_animal/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 ("grab")
if(M == src)
return
if (nopush)
return
var/obj/item/weapon/grab/G = new /obj/item/weapon/grab( M, M, src )
M.put_in_active_hand(G)
grabbed_by += G
G.synch()
LAssailant = M
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red [] has grabbed [] passively!", M, src), 1)
if("hurt")
var/damage = rand(15, 30)
visible_message("\red <B>[M] has slashed at [src]!</B>")
src.health -= damage
if("disarm")
var/damage = rand(15, 30)
visible_message("\red <B>[M] has slashed at [src]!</B>")
src.health -= damage
return
/mob/living/simple_animal/attack_larva(mob/living/carbon/alien/larva/L as mob)
switch(L.a_intent)
if("help")
visible_message("\blue [L] rubs it's head against [src]")
else
var/damage = rand(5, 10)
visible_message("\red <B>[L] bites [src]!</B>")
if(stat != DEAD)
src.health -= damage
L.amount_grown = min(L.amount_grown + damage, L.max_grown)
/mob/living/simple_animal/attackby(var/obj/item/O as obj, var/mob/user as mob) //Marker -Agouri
if(istype(O, /obj/item/stack/medical))
if(stat != DEAD)
var/obj/item/stack/medical/MED = O
if(health < maxHealth)
if(MED.amount >= 1)
health = min(maxHealth, health + MED.heal_brute)
MED.amount -= 1
if(MED.amount <= 0)
del(MED)
for(var/mob/M in viewers(src, null))
if ((M.client && !( M.blinded )))
M.show_message("\blue [user] applies the [MED] on [src]")
else
user << "\blue this [src] is dead, medical items won't bring it back to life."
if(meat_type && (stat == DEAD)) //if the animal has a meat, and if it is dead.
if(istype(O, /obj/item/weapon/kitchenknife) || istype(O, /obj/item/weapon/butch))
new meat_type (get_turf(src))
if(prob(95))
del(src)
return
gib()
else
if(O.force)
var/damage = O.force
if (O.damtype == HALLOSS)
damage = 0
health -= damage
for(var/mob/M in viewers(src, null))
if ((M.client && !( M.blinded )))
M.show_message("\red \b [src] has been attacked with the [O] by [user]. ")
else
usr << "\red This weapon is ineffective, it does no damage."
for(var/mob/M in viewers(src, null))
if ((M.client && !( M.blinded )))
M.show_message("\red [user] gently taps [src] with the [O]. ")
/mob/living/simple_animal/movement_delay()
var/tally = 0 //Incase I need to add stuff other than "speed" later
tally = speed
return tally+config.animal_delay
/mob/living/simple_animal/Stat()
..()
statpanel("Status")
stat(null, "Health: [round((health / maxHealth) * 100)]%")
/mob/living/simple_animal/proc/Die()
living_mob_list -= src
dead_mob_list += src
icon_state = icon_dead
stat = DEAD
density = 0
return
/mob/living/simple_animal/ex_act(severity)
if(!blinded)
flick("flash", flash)
switch (severity)
if (1.0)
health -= 500
gib()
return
if (2.0)
health -= 60
if(3.0)
health -= 30
/mob/living/simple_animal/adjustBruteLoss(damage)
health -= damage
/mob/living/simple_animal/proc/SA_search(target_mob)
if(isliving(target_mob))
return (viewers(7,src))
if(istype(target_mob,/obj))
return (view(7,src))
/mob/living/simple_animal/proc/SA_attackable(target_mob)
if (isliving(target_mob))
var/mob/living/L = target_mob
if(!L.stat)
return (0)
if (istype(target_mob,/obj/mecha))
var/obj/mecha/M = target_mob
if (M.occupant)
return (0)
return (1)

View File

@@ -48,12 +48,14 @@
response_harm = "swats the"
stop_automated_movement = 1
var/parrot_state = PARROT_WANDER //Hunt for a perch when created
var/parrot_sleep_max = 25 //The time the parrot sits while perched before looking around. Mosly a way to avoid the parrot's AI in life() being run every single tick.
var/parrot_sleep_dur = 25 //Same as above, this is the var that physically counts down
var/parrot_dam_zone = list("chest", "head", "l_arm", "l_leg", "r_arm", "r_leg") //For humans, select a bodypart to attack
var/parrot_speed = 5 //"Delay in world ticks between movement." Yeah, that's BS but it does directly affect movement. Higher number = slower.
var/parrot_been_shot = 0 //Parrots get a speed bonus after being shot. This will deincrement every Life() and at 0 the parrot will return to regular speed.
var/list/speech_buffer = list()
var/list/available_channels = list()
@@ -91,7 +93,6 @@
/mob/living/simple_animal/parrot/New()
usr << "\red Parrots are still a work in progress, use at your own risk."
..()
parrot_sleep_dur = parrot_sleep_max //In case someone decides to change the max without changing the duration var
verbs.Add(/mob/living/simple_animal/parrot/proc/steal_from_ground, \
@@ -267,6 +268,7 @@
parrot_interest = null
parrot_state = PARROT_WANDER //OWFUCK, Been shot! RUN LIKE HELL!
parrot_been_shot += 5
icon_state = "parrot_fly"
drop_held_item(0)
return
@@ -291,6 +293,7 @@
if(!isturf(src.loc) || !canmove || buckled)
return //If it can't move, dont let it move. (The buckled check probably isn't necessary thanks to canmove)
//-----SPEECH
/* Parrot speech mimickry!
Phrases that the parrot hears in mob/living/say() get added to speach_buffer.
@@ -304,7 +307,6 @@
clearlist(speech_buffer)
//Alright, here we go... down the slope
//-----SLEEPING
if(parrot_state == PARROT_PERCH)
@@ -419,11 +421,7 @@
parrot_state = PARROT_SWOOP | PARROT_RETURN
return
var/oldloc = src.loc
step_towards(src, get_step_towards(src,parrot_interest))
if(src.loc == oldloc) //Check if the mob is stuck
parrot_state = PARROT_WANDER //and demonstrate your amazing obstical avoidance AI
walk_to(src, parrot_interest, 1, parrot_speed)
return
//-----RETURNING TO PERCH
@@ -441,10 +439,7 @@
icon_state = "parrot_sit"
return
var/oldloc = src.loc
step_towards(src, get_step_towards(src,parrot_perch))
if(src.loc == oldloc) //Check if the mob is stuck
parrot_state = PARROT_WANDER //and demonstrate your amazing obstical avoidance AI
walk_to(src, parrot_perch, 1, parrot_speed)
return
//-----FLEEING
@@ -453,10 +448,9 @@
if(!parrot_interest || !isliving(parrot_interest)) //Sanity
parrot_state = PARROT_WANDER
var/oldloc = src.loc
step(src, get_step_away(src, parrot_interest))
if(src.loc == oldloc) //Check if the mob is stuck
parrot_state = PARROT_WANDER //and demonstrate your amazing obstical avoidance AI
walk_away(src, parrot_interest, 1, parrot_speed-parrot_been_shot)
parrot_been_shot--
return
//-----ATTACKING
else if(parrot_state == (PARROT_SWOOP | PARROT_ATTACK))
@@ -502,11 +496,8 @@
//Otherwise, fly towards the mob!
else
var/oldloc = src.loc
step_towards(src, get_step_towards(src,parrot_interest))
if(src.loc == oldloc) //Check if the mob is stuck
parrot_state = PARROT_WANDER //and demonstrate your amazing obstical avoidance AI
walk_to(src, parrot_interest, 1, parrot_speed)
return
//-----STATE MISHAP
else //This should not happen. If it does lets reset everything and try again
walk(src,0)
@@ -686,6 +677,7 @@
src.loc = AM.loc
icon_state = "parrot_sit"
return
src << "\red There is no perch nearby to sit on."
return
/*

View File

@@ -1,2 +1,435 @@
/mob/living/simple_animal
name = "animal"
icon = 'icons/mob/animal.dmi'
health = 20
maxHealth = 20
var/icon_living = ""
var/icon_dead = ""
var/icon_gib = null //We only try to show a gibbing animation if this exists.
var/list/speak = list()
var/list/speak_emote = list()// Emotes while speaking IE: Ian [emote], [text] -- Ian barks, "WOOF!". Spoken text is generated from the speak variable.
var/speak_chance = 0
var/list/emote_hear = list() //Hearable emotes
var/list/emote_see = list() //Unlike speak_emote, the list of things in this variable only show by themselves with no spoken text. IE: Ian barks, Ian yaps
var/turns_per_move = 1
var/turns_since_move = 0
universal_speak = 1
var/meat_amount = 0
var/meat_type
var/stop_automated_movement = 0 //Use this to temporarely stop random movement or to if you write special movement code for animals.
var/stop_automated_movement_when_pulled = 1 //When set to 1 this stops the animal from moving when someone is pulling it.
//Interaction
var/response_help = "You try to help"
var/response_disarm = "You try to disarm"
var/response_harm = "You try to hurt"
var/harm_intent_damage = 3
//Temperature effect
var/minbodytemp = 250
var/maxbodytemp = 350
var/heat_damage_per_tick = 3 //amount of damage applied if animal's body temperature is higher than maxbodytemp
var/cold_damage_per_tick = 2 //same as heat_damage_per_tick, only if the bodytemperature it's lower than minbodytemp
//Atmos effect - Yes, you can make creatures that require plasma or co2 to survive. N2O is a trace gas and handled separately, hence why it isn't here. It'd be hard to add it. Hard and me don't mix (Yes, yes make all the dick jokes you want with that.) - Errorage
var/min_oxy = 5
var/max_oxy = 0 //Leaving something at 0 means it's off - has no maximum
var/min_tox = 0
var/max_tox = 1
var/min_co2 = 0
var/max_co2 = 5
var/min_n2 = 0
var/max_n2 = 0
var/unsuitable_atoms_damage = 2 //This damage is taken when atmos doesn't fit all the requirements above
//LETTING SIMPLE ANIMALS ATTACK? WHAT COULD GO WRONG. Defaults to zero so Ian can still be cuddly
var/melee_damage_lower = 0
var/melee_damage_upper = 0
var/attacktext = "attacks"
var/attack_sound = null
var/friendly = "nuzzles" //If the mob does no damage with it's attack
var/wall_smash = 0 //if they can smash walls
var/speed = 0 //LETS SEE IF I CAN SET SPEEDS FOR SIMPLE MOBS WITHOUT DESTROYING EVERYTHING. Higher speed is slower, negative speed is faster
/mob/living/simple_animal/New()
..()
verbs -= /mob/verb/observe
/mob/living/simple_animal/Login()
if(src && src.client)
src.client.screen = null
..()
/mob/living/simple_animal/updatehealth()
return
return
/mob/living/simple_animal/Life()
//Health
if(stat == DEAD)
if(health > 0)
icon_state = icon_living
dead_mob_list -= src
living_mob_list += src
stat = CONSCIOUS
density = 1
return 0
if(health < 1)
Die()
if(health > maxHealth)
health = maxHealth
if(stunned)
AdjustStunned(-1)
if(weakened)
AdjustWeakened(-1)
if(paralysis)
AdjustParalysis(-1)
//Movement
if(!client && !stop_automated_movement)
if(isturf(src.loc) && !resting && !buckled && canmove) //This is so it only moves if it's not inside a closet, gentics machine, etc.
turns_since_move++
if(turns_since_move >= turns_per_move)
if(!(stop_automated_movement_when_pulled && pulledby)) //Soma animals don't move when pulled
Move(get_step(src,pick(cardinal)))
turns_since_move = 0
//Speaking
if(!client && speak_chance)
if(rand(0,200) < speak_chance)
if(speak && speak.len)
if((emote_hear && emote_hear.len) || (emote_see && emote_see.len))
var/length = speak.len
if(emote_hear && emote_hear.len)
length += emote_hear.len
if(emote_see && emote_see.len)
length += emote_see.len
var/randomValue = rand(1,length)
if(randomValue <= speak.len)
say(pick(speak))
else
randomValue -= speak.len
if(emote_see && randomValue <= emote_see.len)
emote(pick(emote_see),1)
else
emote(pick(emote_hear),2)
else
say(pick(speak))
else
if(!(emote_hear && emote_hear.len) && (emote_see && emote_see.len))
emote(pick(emote_see),1)
if((emote_hear && emote_hear.len) && !(emote_see && emote_see.len))
emote(pick(emote_hear),2)
if((emote_hear && emote_hear.len) && (emote_see && emote_see.len))
var/length = emote_hear.len + emote_see.len
var/pick = rand(1,length)
if(pick <= emote_see.len)
emote(pick(emote_see),1)
else
emote(pick(emote_hear),2)
//Atmos
var/atmos_suitable = 1
var/atom/A = src.loc
if(isturf(A))
var/turf/T = A
var/areatemp = T.temperature
if( abs(areatemp - bodytemperature) > 40 )
var/diff = areatemp - bodytemperature
diff = diff / 5
//world << "changed from [bodytemperature] by [diff] to [bodytemperature + diff]"
bodytemperature += diff
if(istype(T,/turf/simulated))
var/turf/simulated/ST = T
if(ST.air)
var/tox = ST.air.toxins
var/oxy = ST.air.oxygen
var/n2 = ST.air.nitrogen
var/co2 = ST.air.carbon_dioxide
if(min_oxy)
if(oxy < min_oxy)
atmos_suitable = 0
if(max_oxy)
if(oxy > max_oxy)
atmos_suitable = 0
if(min_tox)
if(tox < min_tox)
atmos_suitable = 0
if(max_tox)
if(tox > max_tox)
atmos_suitable = 0
if(min_n2)
if(n2 < min_n2)
atmos_suitable = 0
if(max_n2)
if(n2 > max_n2)
atmos_suitable = 0
if(min_co2)
if(co2 < min_co2)
atmos_suitable = 0
if(max_co2)
if(co2 > max_co2)
atmos_suitable = 0
//Atmos effect
if(bodytemperature < minbodytemp)
health -= cold_damage_per_tick
else if(bodytemperature > maxbodytemp)
health -= heat_damage_per_tick
if(!atmos_suitable)
health -= unsuitable_atoms_damage
return 1
/mob/living/simple_animal/Bumped(AM as mob|obj)
if(!AM) return
if(resting || buckled)
return
if(isturf(src.loc))
if(ismob(AM))
var/newamloc = src.loc
src.loc = AM:loc
AM:loc = newamloc
else
..()
/mob/living/simple_animal/gib()
if(icon_gib)
flick(icon_gib, src)
if(meat_amount && meat_type)
for(var/i = 0; i < meat_amount; i++)
new meat_type(src.loc)
..()
/mob/living/simple_animal/say_quote(var/text)
if(speak_emote && speak_emote.len)
var/emote = pick(speak_emote)
if(emote)
return "[emote], \"[text]\""
return "says, \"[text]\"";
/mob/living/simple_animal/emote(var/act)
if(act)
if(act == "scream") act = "makes a loud and pained whimper" //ugly hack to stop animals screaming when crushed :P
for (var/mob/O in viewers(src, null))
O.show_message("<B>[src]</B> [act].")
/mob/living/simple_animal/attack_animal(mob/living/simple_animal/M as mob)
if(M.melee_damage_upper == 0)
M.emote("[M.friendly] [src]")
else
if(M.attack_sound)
playsound(loc, M.attack_sound, 50, 1, 1)
for(var/mob/O in viewers(src, null))
O.show_message("\red <B>[M]</B> [M.attacktext] [src]!", 1)
M.attack_log += text("\[[time_stamp()]\] <font color='red'>attacked [src.name] ([src.ckey])</font>")
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>was attacked by [M.name] ([M.ckey])</font>")
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
health -= damage
/mob/living/simple_animal/bullet_act(var/obj/item/projectile/Proj)
if(!Proj) return
src.health -= Proj.damage
return 0
/mob/living/simple_animal/attack_hand(mob/living/carbon/human/M as mob)
..()
switch(M.a_intent)
if("help")
if (health > 0)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message("\blue [M] [response_help] [src]")
if("grab")
if (M == src)
return
if (nopush)
return
var/obj/item/weapon/grab/G = new /obj/item/weapon/grab( M, M, src )
M.put_in_active_hand(G)
grabbed_by += G
G.synch()
LAssailant = M
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red [] has grabbed [] passively!", M, src), 1)
if("hurt")
health -= harm_intent_damage
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message("\red [M] [response_harm] [src]")
if("disarm")
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message("\blue [M] [response_disarm] [src]")
return
/mob/living/simple_animal/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 ("grab")
if(M == src)
return
if (nopush)
return
var/obj/item/weapon/grab/G = new /obj/item/weapon/grab( M, M, src )
M.put_in_active_hand(G)
grabbed_by += G
G.synch()
LAssailant = M
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red [] has grabbed [] passively!", M, src), 1)
if("hurt")
var/damage = rand(15, 30)
visible_message("\red <B>[M] has slashed at [src]!</B>")
src.health -= damage
if("disarm")
var/damage = rand(15, 30)
visible_message("\red <B>[M] has slashed at [src]!</B>")
src.health -= damage
return
/mob/living/simple_animal/attack_larva(mob/living/carbon/alien/larva/L as mob)
switch(L.a_intent)
if("help")
visible_message("\blue [L] rubs it's head against [src]")
else
var/damage = rand(5, 10)
visible_message("\red <B>[L] bites [src]!</B>")
if(stat != DEAD)
src.health -= damage
L.amount_grown = min(L.amount_grown + damage, L.max_grown)
/mob/living/simple_animal/attackby(var/obj/item/O as obj, var/mob/user as mob) //Marker -Agouri
if(istype(O, /obj/item/stack/medical))
if(stat != DEAD)
var/obj/item/stack/medical/MED = O
if(health < maxHealth)
if(MED.amount >= 1)
health = min(maxHealth, health + MED.heal_brute)
MED.amount -= 1
if(MED.amount <= 0)
del(MED)
for(var/mob/M in viewers(src, null))
if ((M.client && !( M.blinded )))
M.show_message("\blue [user] applies the [MED] on [src]")
else
user << "\blue this [src] is dead, medical items won't bring it back to life."
if(meat_type && (stat == DEAD)) //if the animal has a meat, and if it is dead.
if(istype(O, /obj/item/weapon/kitchenknife) || istype(O, /obj/item/weapon/butch))
new meat_type (get_turf(src))
if(prob(95))
del(src)
return
gib()
else
if(O.force)
var/damage = O.force
if (O.damtype == HALLOSS)
damage = 0
health -= damage
for(var/mob/M in viewers(src, null))
if ((M.client && !( M.blinded )))
M.show_message("\red \b [src] has been attacked with the [O] by [user]. ")
else
usr << "\red This weapon is ineffective, it does no damage."
for(var/mob/M in viewers(src, null))
if ((M.client && !( M.blinded )))
M.show_message("\red [user] gently taps [src] with the [O]. ")
/mob/living/simple_animal/movement_delay()
var/tally = 0 //Incase I need to add stuff other than "speed" later
tally = speed
return tally+config.animal_delay
/mob/living/simple_animal/Stat()
..()
statpanel("Status")
stat(null, "Health: [round((health / maxHealth) * 100)]%")
/mob/living/simple_animal/proc/Die()
living_mob_list -= src
dead_mob_list += src
icon_state = icon_dead
stat = DEAD
density = 0
return
/mob/living/simple_animal/ex_act(severity)
if(!blinded)
flick("flash", flash)
switch (severity)
if (1.0)
health -= 500
gib()
return
if (2.0)
health -= 60
if(3.0)
health -= 30
/mob/living/simple_animal/adjustBruteLoss(damage)
health -= damage
/mob/living/simple_animal/proc/SA_attackable(target_mob)
if (isliving(target_mob))
var/mob/living/L = target_mob
if(!L.stat)
return (0)
if (istype(target_mob,/obj/mecha))
var/obj/mecha/M = target_mob
if (M.occupant)
return (0)
return (1)

View File

@@ -38,6 +38,7 @@
min_n2 = 0
max_n2 = 0
unsuitable_atoms_damage = 15
wall_smash = 1
var/stance = SYNDICATE_STANCE_IDLE //Used to determine behavior
var/mob/living/target_mob
@@ -53,6 +54,10 @@
del src
return
for(dir in list(NORTH,EAST,SOUTH,WEST))
var/obj/structure/obstacle = locate(/obj/structure, get_step(src, dir))
if(istype(obstacle, /obj/structure/window) || istype(obstacle, /obj/structure/closet) || istype(obstacle, /obj/structure/table) || istype(obstacle, /obj/structure/grille))
obstacle.attack_animal(src)
if(health < 1)
Die()
@@ -71,33 +76,39 @@
if(!stat)
switch(stance)
if(SYNDICATE_STANCE_IDLE)
var/obj/mecha/M = null
var/mob/living/L = null
stop_automated_movement = 0
for(L in viewers(7,src))
if(isSyndicate(L)) continue
if(!L.stat)
stance = SYNDICATE_STANCE_ATTACK
target_mob = L
break
for(M in view(7,src))
if (M.occupant)
stance = SYNDICATE_STANCE_ATTACK
target_mob = M
break
for(var/atom/A in view(7,src))
if(isSyndicate(A))
continue
if(isliving(A))
var/mob/living/L = A
if(!L.stat)
stance = SYNDICATE_STANCE_ATTACK
target_mob = L
break
if(istype(A, /obj/mecha))
var/obj/mecha/M = A
if (M.occupant)
stance = SYNDICATE_STANCE_ATTACK
target_mob = M
break
if(SYNDICATE_STANCE_ATTACK) //This one should only be active for one tick
stop_automated_movement = 1
if(!target_mob || SA_attackable(target_mob))
stance = SYNDICATE_STANCE_IDLE
if(target_mob in SA_search(target_mob))
if(target_mob in view(7, src))
if(ranged)
if(get_dist(src, target_mob) <= 6)
OpenFire(target_mob)
else
walk_to(src, target_mob, 1, 3)
walk_to(src, target_mob, 1, 2)
else
walk_to(src, target_mob, 1, 3)
walk_to(src, target_mob, 1, 2)
stance = SYNDICATE_STANCE_ATTACKING
if(SYNDICATE_STANCE_ATTACKING)
@@ -106,7 +117,7 @@
stance = SYNDICATE_STANCE_IDLE
target_mob = null
return
if(!(target_mob in SA_search(target_mob)))
if(!(target_mob in view(7, src)))
stance = SYNDICATE_STANCE_IDLE
target_mob = null
return
@@ -172,6 +183,7 @@
weapon1 = /obj/item/weapon/melee/energy/sword/red
weapon2 = /obj/item/weapon/shield/energy
attacktext = "slashes"
nopush = 1
/mob/living/simple_animal/syndicate/melee/attackby(var/obj/item/O as obj, var/mob/user as mob)
if(O.force)

View File

@@ -1,21 +0,0 @@
/mob/living/simple_animal/corgi/regenerate_icons()
overlays = list()
if(inventory_head)
var/head_icon_state = inventory_head.icon_state
if(health <= 0)
head_icon_state += "2"
var/icon/head_icon = icon('icons/mob/corgi_head.dmi',head_icon_state)
if(head_icon)
overlays += head_icon
if(inventory_back)
var/back_icon_state = inventory_back.icon_state
if(health <= 0)
back_icon_state += "2"
var/icon/back_icon = icon('icons/mob/corgi_back.dmi',back_icon_state)
if(back_icon)
overlays += back_icon
return

View File

@@ -66,12 +66,12 @@
return 0
/proc/isbear(A)
if(istype(A, /mob/living/simple_animal/bear))
if(istype(A, /mob/living/simple_animal/hostile/bear))
return 1
return 0
/proc/iscarp(A)
if(istype(A, /mob/living/simple_animal/carp))
if(istype(A, /mob/living/simple_animal/hostile/carp))
return 1
return 0

View File

@@ -335,9 +335,6 @@
if(!MP)
return 0 //Sanity, this should never happen.
if(ispath(MP, /mob/living/simple_animal/parrot))
return 0 //Parrots are unfinished, they have no sprite, movement, ect...(Working on this - Nodrak)
if(ispath(MP, /mob/living/simple_animal/space_worm))
return 0 //Unfinished. Very buggy, they seem to just spawn additional space worms everywhere and eating your own tail results in new worms spawning.
@@ -360,7 +357,7 @@
return 1
if(ispath(MP, /mob/living/simple_animal/crab))
return 1
if(ispath(MP, /mob/living/simple_animal/carp))
if(ispath(MP, /mob/living/simple_animal/hostile/carp))
return 1
if(ispath(MP, /mob/living/simple_animal/mushroom))
return 1
@@ -370,8 +367,10 @@
return 1
if(ispath(MP, /mob/living/simple_animal/mouse))
return 1 //It is impossible to pull up the player panel for mice (Fixed! - Nodrak)
if(ispath(MP, /mob/living/simple_animal/bear))
if(ispath(MP, /mob/living/simple_animal/hostile/bear))
return 1 //Bears will auto-attack mobs, even if they're player controlled (Fixed! - Nodrak)
if(ispath(MP, /mob/living/simple_animal/parrot))
return 1 //Parrots are no longer unfinished! -Nodrak
//Not in here? Must be untested!
return 0

View File

@@ -729,7 +729,7 @@
/obj/item/weapon/reagent_containers/food/snacks/grown/soybeans = list("soymilk" = 0),
/obj/item/weapon/reagent_containers/food/snacks/grown/tomato = list("ketchup" = 0),
/obj/item/weapon/reagent_containers/food/snacks/grown/corn = list("cornoil" = 0),
/obj/item/weapon/reagent_containers/food/snacks/grown/wheat = list("flour" = 0),
/obj/item/weapon/reagent_containers/food/snacks/grown/wheat = list("flour" = -5),
/obj/item/weapon/reagent_containers/food/snacks/grown/cherries = list("cherryjelly" = 0),
@@ -994,7 +994,7 @@
spawn(60)
inuse = 0
interact(usr)
//Snacks
//Snacks and Plants
for (var/obj/item/weapon/reagent_containers/food/snacks/O in holdingitems)
if (beaker.reagents.total_volume >= beaker.reagents.maximum_volume)
break
@@ -1007,10 +1007,15 @@
var/space = beaker.reagents.maximum_volume - beaker.reagents.total_volume
var/amount = allowed[r_id]
if(amount == 0)
if (O.reagents != null && O.reagents.has_reagent("nutriment"))
beaker.reagents.add_reagent(r_id, min(O.reagents.get_reagent_amount("nutriment"), space))
O.reagents.remove_reagent("nutriment", min(O.reagents.get_reagent_amount("nutriment"), space))
if(amount <= 0)
if(amount == 0)
if (O.reagents != null && O.reagents.has_reagent("nutriment"))
beaker.reagents.add_reagent(r_id, min(O.reagents.get_reagent_amount("nutriment"), space))
O.reagents.remove_reagent("nutriment", min(O.reagents.get_reagent_amount("nutriment"), space))
else
if (O.reagents != null && O.reagents.has_reagent("nutriment"))
beaker.reagents.add_reagent(r_id, min(round(O.reagents.get_reagent_amount("nutriment")*abs(amount)), space))
O.reagents.remove_reagent("nutriment", min(O.reagents.get_reagent_amount("nutriment"), space))
else
O.reagents.trans_id_to(beaker, r_id, min(amount, space))

View File

@@ -17,6 +17,7 @@
#define MOLES_N2STANDARD MOLES_CELLSTANDARD*N2STANDARD // N2 standard value (79%)
#define MOLES_PLASMA_VISIBLE 0.7 //Moles in a standard cell after which plasma is visible
#define MIN_PLASMA_DAMAGE 20
#define BREATH_VOLUME 0.5 //liters in a normal breath
#define BREATH_PERCENTAGE BREATH_VOLUME/CELL_VOLUME
@@ -38,7 +39,7 @@
#define SPACE_HELMET_MIN_COLD_PROTECITON_TEMPERATURE 2.0 //what min_cold_protection_temperature is set to for space-helmet quality headwear. MUST NOT BE 0.
#define SPACE_SUIT_MIN_COLD_PROTECITON_TEMPERATURE 2.0 //what min_cold_protection_temperature is set to for space-suit quality jumpsuits or suits. MUST NOT BE 0.
#define FIRESUIT_MAX_HEAT_PROTECITON_TEMPERATURE 15000 //what max_heat_protection_temperature is set to for firesuit quality headwear. MUST NOT BE 0.
#define FIRESUIT_MAX_HEAT_PROTECITON_TEMPERATURE 30000 //what max_heat_protection_temperature is set to for firesuit quality headwear. MUST NOT BE 0.
#define FIRE_HELMET_MAX_HEAT_PROTECITON_TEMPERATURE 15000 //for fire helmet quality items (red and white hardhats)
#define HELMET_MIN_COLD_PROTECITON_TEMPERATURE 160 //For normal helmets
#define HELMET_MAX_HEAT_PROTECITON_TEMPERATURE 600 //For normal helmets
@@ -137,7 +138,7 @@ var/MAX_EXPLOSION_RANGE = 14
#define HUMAN_STRIP_DELAY 40 //takes 40ds = 4s to strip someone.
#define ALIEN_SELECT_AFK_BUFFER 2 // How many minutes that a person can be AFK before not being allowed to be an alien.
#define ALIEN_SELECT_AFK_BUFFER 1 // How many minutes that a person can be AFK before not being allowed to be an alien.
#define NORMPIPERATE 30 //pipe-insulation rate divisor
#define HEATPIPERATE 8 //heat-exch pipe insulation
@@ -533,39 +534,4 @@ var/list/TAGGERLOCATIONS = list("Disposals",
"Atmospherics", "Security", "HoS Office", "Medbay",
"CMO Office", "Chemistry", "Research", "RD Office",
"Robotics", "HoP Office", "Library", "Chapel", "Theatre",
"Bar", "Kitchen", "Hydroponics", "Janitor Closet","Genetics")
#define MIN_PLAYER_AGE 19
#define MAX_PLAYER_AGE 60
//Damage things
#define CUT "cut"
#define BRUISE "bruise"
#define BRUTE "brute"
#define BURN "fire"
#define TOX "tox"
#define OXY "oxy"
#define CLONE "clone"
#define HALLOSS "halloss"
#define STUN "stun"
#define WEAKEN "weaken"
#define PARALYZE "paralize"
#define IRRADIATE "irradiate"
#define STUTTER "stutter"
#define SLUR "slur"
#define EYE_BLUR "eye_blur"
#define DROWSY "drowsy"
/////////////////
//ORGAN DEFINES//
/////////////////
#define ORGAN_CUT_AWAY 1
#define ORGAN_GAUZED 2
#define ORGAN_ATTACHABLE 4
#define ORGAN_BLEEDING 8
#define ORGAN_BROKEN 32
#define ORGAN_DESTROYED 64
#define ORGAN_ROBOT 128
#define ORGAN_SPLINTED 256
#define SALVED 512
"Bar", "Kitchen", "Hydroponics", "Janitor Closet","Genetics")#define MIN_PLAYER_AGE 19#define MAX_PLAYER_AGE 60//Damage things#define CUT "cut"#define BRUISE "bruise"#define BRUTE "brute"#define BURN "fire"#define TOX "tox"#define OXY "oxy"#define CLONE "clone"#define HALLOSS "halloss"#define STUN "stun"#define WEAKEN "weaken"#define PARALYZE "paralize"#define IRRADIATE "irradiate"#define STUTTER "stutter"#define SLUR "slur"#define EYE_BLUR "eye_blur"#define DROWSY "drowsy"///////////////////ORGAN DEFINES///////////////////#define ORGAN_CUT_AWAY 1#define ORGAN_GAUZED 2#define ORGAN_ATTACHABLE 4#define ORGAN_BLEEDING 8#define ORGAN_BROKEN 32#define ORGAN_DESTROYED 64#define ORGAN_ROBOT 128#define ORGAN_SPLINTED 256#define SALVED 512#define HOSTILE_STANCE_IDLE 1#define HOSTILE_STANCE_ALERT 2#define HOSTILE_STANCE_ATTACK 3#define HOSTILE_STANCE_ATTACKING 4#define HOSTILE_STANCE_TIRED 5

Binary file not shown.

Before

Width:  |  Height:  |  Size: 132 KiB

After

Width:  |  Height:  |  Size: 132 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 21 KiB

View File

@@ -14,7 +14,7 @@
"n" = (/turf/unsimulated/wall{tag = "icon-sandstone6"; icon_state = "sandstone6"},/area/awaymission/beach)
"o" = (/turf/unsimulated/wall{tag = "icon-sandstone12"; icon_state = "sandstone12"},/area/awaymission/beach)
"p" = (/turf/unsimulated/wall{tag = "icon-sandstone10"; icon_state = "sandstone10"},/area/awaymission/beach)
"q" = (/obj/structure/closet/athletic_mixed,/turf/unsimulated/beach/sand,/area/awaymission/beach)
"q" = (/obj/structure/closet/athletic_mixed,/obj/item/clothing/shoes/sandal,/obj/item/clothing/shoes/sandal,/obj/item/clothing/shoes/sandal,/obj/item/clothing/shoes/sandal,/turf/unsimulated/beach/sand,/area/awaymission/beach)
"r" = (/turf/unsimulated/wall{tag = "icon-sandstone3"; icon_state = "sandstone3"},/area/awaymission/beach)
"s" = (/obj/structure/closet/gmcloset{icon_closed = "black"; icon_state = "black"; name = "formal wardrobe"},/turf/unsimulated/floor{tag = "icon-wood"; icon_state = "wood"},/area/awaymission/beach)
"t" = (/obj/structure/closet/secure_closet/bar,/turf/unsimulated/floor{tag = "icon-wood"; icon_state = "wood"},/area/awaymission/beach)
@@ -22,7 +22,7 @@
"v" = (/obj/structure/table/woodentable,/obj/item/weapon/reagent_containers/food/drinks/shaker,/turf/unsimulated/floor{tag = "icon-wood"; icon_state = "wood"},/area/awaymission/beach)
"w" = (/obj/structure/table/woodentable,/turf/unsimulated/floor{tag = "icon-wood"; icon_state = "wood"},/area/awaymission/beach)
"x" = (/obj/structure/table/woodentable,/obj/item/clothing/glasses/sunglasses,/turf/unsimulated/floor{tag = "icon-wood"; icon_state = "wood"},/area/awaymission/beach)
"y" = (/obj/machinery/vending/boozeomat,/turf/unsimulated/floor{tag = "icon-wood"; icon_state = "wood"},/area/awaymission/beach)
"y" = (/obj/machinery/vending/boozeomat{emagged = 1},/turf/unsimulated/floor{tag = "icon-wood"; icon_state = "wood"},/area/awaymission/beach)
"z" = (/obj/machinery/vending/cigarette,/turf/unsimulated/floor{tag = "icon-wood"; icon_state = "wood"},/area/awaymission/beach)
"A" = (/obj/machinery/vending/cola,/turf/unsimulated/floor{tag = "icon-wood"; icon_state = "wood"},/area/awaymission/beach)
"B" = (/obj/machinery/vending/snack,/turf/unsimulated/floor{tag = "icon-wood"; icon_state = "wood"},/area/awaymission/beach)

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff