mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-21 11:07:12 +01:00
Merge branch 'bleeding-edge-freeze' of https://github.com/Baystation12/Baystation12
Conflicts: code/modules/reagents/Chemistry-Reagents.dm code/setup.dm
This commit is contained in:
@@ -76,7 +76,7 @@ datum/admins/proc/DB_ban_record(var/bantype, var/mob/banned_mob, var/duration =
|
||||
|
||||
reason = sql_sanitize_text(reason)
|
||||
|
||||
var/sql = "INSERT INTO erro_ban VALUES (null, Now(), '[serverip]', '[bantype_str]', '[reason]', '[job]', [(duration)?"[duration]":"0"], [(rounds)?"[rounds]":"0"], Now() + INTERVAL [(duration>0) ? duration : 0] MINUTE, '[ckey]', '[computerid]', '[ip]', '[a_ckey]', '[a_computerid]', '[a_ip]', '[who]', '[adminwho]', '', null, null, null, null, null)"
|
||||
var/sql = "INSERT INTO erro_ban (`id`,`bantime`,`serverip`,`bantype`,`reason`,`job`,`duration`,`rounds`,`expiration_time`,`ckey`,`computerid`,`ip`,`a_ckey`,`a_computerid`,`a_ip`,`who`,`adminwho`,`edits`,`unbanned`,`unbanned_datetime`,`unbanned_ckey`,`unbanned_computerid`,`unbanned_ip`) VALUES (null, Now(), '[serverip]', '[bantype_str]', '[reason]', '[job]', [(duration)?"[duration]":"0"], [(rounds)?"[rounds]":"0"], Now() + INTERVAL [(duration>0) ? duration : 0] MINUTE, '[ckey]', '[computerid]', '[ip]', '[a_ckey]', '[a_computerid]', '[a_ip]', '[who]', '[adminwho]', '', null, null, null, null, null)"
|
||||
var/DBQuery/query_insert = dbcon.NewQuery(sql)
|
||||
query_insert.Execute()
|
||||
usr << "\blue Ban saved to database."
|
||||
|
||||
@@ -536,6 +536,7 @@ var/global/floorIsLava = 0
|
||||
<A href='?src=\ref[src];secretsfun=goblob'>Spawn blob</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=aliens'>Trigger an Alien infestation</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=alien_silent'>Spawn an Alien silently</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=spiders'>Trigger a Spider infestation</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=spaceninja'>Send in a space ninja</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=striketeam'>Send in a strike team</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=carp'>Trigger an Carp migration</A><BR>
|
||||
|
||||
@@ -1924,10 +1924,8 @@
|
||||
if("wave")
|
||||
feedback_inc("admin_secrets_fun_used",1)
|
||||
feedback_add_details("admin_secrets_fun_used","MW")
|
||||
meteor_wave()
|
||||
message_admins("[key_name_admin(usr)] has spawned meteors", 1)
|
||||
command_alert("Meteors have been detected on collision course with the station.", "Meteor Alert")
|
||||
world << sound('sound/AI/meteors.ogg')
|
||||
new /datum/event/meteor_wave
|
||||
|
||||
if("gravanomalies")
|
||||
feedback_inc("admin_secrets_fun_used",1)
|
||||
feedback_add_details("admin_secrets_fun_used","GA")
|
||||
@@ -1954,13 +1952,18 @@
|
||||
feedback_inc("admin_secrets_fun_used",1)
|
||||
feedback_add_details("admin_secrets_fun_used","AL")
|
||||
if(aliens_allowed)
|
||||
alien_infestation()
|
||||
new /datum/event/alien_infestation
|
||||
message_admins("[key_name_admin(usr)] has spawned aliens", 1)
|
||||
if("alien_silent") //replaces the spawn_xeno verb
|
||||
feedback_inc("admin_secrets_fun_used",1)
|
||||
feedback_add_details("admin_secrets_fun_used","ALS")
|
||||
if(aliens_allowed)
|
||||
create_xeno()
|
||||
if("spiders")
|
||||
feedback_inc("admin_secrets_fun_used",1)
|
||||
feedback_add_details("admin_secrets_fun_used","SL")
|
||||
new /datum/event/spider_infestation
|
||||
message_admins("[key_name_admin(usr)] has spawned spiders", 1)
|
||||
if("comms_blackout")
|
||||
feedback_inc("admin_secrets_fun_used",1)
|
||||
feedback_add_details("admin_secrets_fun_used","CB")
|
||||
@@ -1982,12 +1985,12 @@
|
||||
var/choice = input("You sure you want to spawn carp?") in list("Badmin", "Cancel")
|
||||
if(choice == "Badmin")
|
||||
message_admins("[key_name_admin(usr)] has spawned carp.", 1)
|
||||
carp_migration()
|
||||
new /datum/event/carp_migration
|
||||
if("radiation")
|
||||
feedback_inc("admin_secrets_fun_used",1)
|
||||
feedback_add_details("admin_secrets_fun_used","R")
|
||||
message_admins("[key_name_admin(usr)] has has irradiated the station", 1)
|
||||
high_radiation_event()
|
||||
new /datum/event/radiation_storm
|
||||
if("immovable")
|
||||
feedback_inc("admin_secrets_fun_used",1)
|
||||
feedback_add_details("admin_secrets_fun_used","IR")
|
||||
@@ -2150,7 +2153,7 @@
|
||||
if("spacevines")
|
||||
feedback_inc("admin_secrets_fun_used",1)
|
||||
feedback_add_details("admin_secrets_fun_used","K")
|
||||
spacevine_infestation()
|
||||
new /datum/event/spacevine
|
||||
message_admins("[key_name_admin(usr)] has spawned spacevines", 1)
|
||||
if("onlyone")
|
||||
feedback_inc("admin_secrets_fun_used",1)
|
||||
|
||||
@@ -7,6 +7,10 @@ var/list/adminhelp_ignored_words = list("unknown","the","a","an","of","monkey","
|
||||
set category = "Admin"
|
||||
set name = "Adminhelp"
|
||||
|
||||
if(say_disabled) //This is here to try to identify lag problems
|
||||
usr << "\red Speech is currently admin-disabled."
|
||||
return
|
||||
|
||||
//handle muting and automuting
|
||||
if(prefs.muted & MUTE_ADMINHELP)
|
||||
src << "<font color='red'>Error: Admin-PM: You cannot send adminhelps (Muted).</font>"
|
||||
|
||||
@@ -152,6 +152,13 @@ var/intercom_range_display_status = 0
|
||||
src.verbs += /datum/admins/proc/show_traitor_panel
|
||||
src.verbs += /client/proc/print_jobban_old
|
||||
src.verbs += /client/proc/print_jobban_old_filter
|
||||
src.verbs += /client/proc/forceEvent
|
||||
src.verbs += /client/proc/break_all_air_groups
|
||||
src.verbs += /client/proc/regroup_all_air_groups
|
||||
src.verbs += /client/proc/kill_pipe_processing
|
||||
src.verbs += /client/proc/kill_air_processing
|
||||
src.verbs += /client/proc/disable_communication
|
||||
src.verbs += /client/proc/disable_movement
|
||||
//src.verbs += /client/proc/cmd_admin_rejuvenate
|
||||
|
||||
feedback_add_details("admin_verb","mDV") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
@@ -224,4 +231,81 @@ var/intercom_range_display_status = 0
|
||||
world << line*/
|
||||
|
||||
world << "There are [count] objects of type [type_path] in the game world"
|
||||
feedback_add_details("admin_verb","mOBJ") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
feedback_add_details("admin_verb","mOBJ") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
|
||||
var/global/prevent_airgroup_regroup = 0
|
||||
|
||||
/client/proc/break_all_air_groups()
|
||||
set category = "Mapping"
|
||||
set name = "Break All Airgroups"
|
||||
|
||||
/*prevent_airgroup_regroup = 1
|
||||
for(var/datum/air_group/AG in air_master.air_groups)
|
||||
AG.suspend_group_processing()
|
||||
message_admins("[src.ckey] used 'Break All Airgroups'")*/
|
||||
|
||||
/client/proc/regroup_all_air_groups()
|
||||
set category = "Mapping"
|
||||
set name = "Regroup All Airgroups Attempt"
|
||||
|
||||
usr << "\red Proc disabled."
|
||||
|
||||
/*prevent_airgroup_regroup = 0
|
||||
for(var/datum/air_group/AG in air_master.air_groups)
|
||||
AG.check_regroup()
|
||||
message_admins("[src.ckey] used 'Regroup All Airgroups Attempt'")*/
|
||||
|
||||
/client/proc/kill_pipe_processing()
|
||||
set category = "Mapping"
|
||||
set name = "Kill pipe processing"
|
||||
|
||||
usr << "\red Proc disabled."
|
||||
|
||||
/*pipe_processing_killed = !pipe_processing_killed
|
||||
if(pipe_processing_killed)
|
||||
message_admins("[src.ckey] used 'kill pipe processing', stopping all pipe processing.")
|
||||
else
|
||||
message_admins("[src.ckey] used 'kill pipe processing', restoring all pipe processing.")*/
|
||||
|
||||
/client/proc/kill_air_processing()
|
||||
set category = "Mapping"
|
||||
set name = "Kill air processing"
|
||||
|
||||
usr << "\red Proc disabled."
|
||||
|
||||
/*air_processing_killed = !air_processing_killed
|
||||
if(air_processing_killed)
|
||||
message_admins("[src.ckey] used 'kill air processing', stopping all air processing.")
|
||||
else
|
||||
message_admins("[src.ckey] used 'kill air processing', restoring all air processing.")*/
|
||||
|
||||
//This proc is intended to detect lag problems relating to communication procs
|
||||
var/global/say_disabled = 0
|
||||
/client/proc/disable_communication()
|
||||
set category = "Mapping"
|
||||
set name = "Disable all communication verbs"
|
||||
|
||||
usr << "\red Proc disabled."
|
||||
|
||||
/*say_disabled = !say_disabled
|
||||
if(say_disabled)
|
||||
message_admins("[src.ckey] used 'Disable all communication verbs', killing all communication methods.")
|
||||
else
|
||||
message_admins("[src.ckey] used 'Disable all communication verbs', restoring all communication methods.")*/
|
||||
|
||||
//This proc is intended to detect lag problems relating to movement
|
||||
var/global/movement_disabled = 0
|
||||
var/global/movement_disabled_exception //This is the client that calls the proc, so he can continue to run around to gauge any change to lag.
|
||||
/client/proc/disable_movement()
|
||||
set category = "Mapping"
|
||||
set name = "Disable all movement"
|
||||
|
||||
usr << "\red Proc disabled."
|
||||
|
||||
/*movement_disabled = !movement_disabled
|
||||
if(movement_disabled)
|
||||
message_admins("[src.ckey] used 'Disable all movement', killing all movement.")
|
||||
movement_disabled_exception = usr.ckey
|
||||
else
|
||||
message_admins("[src.ckey] used 'Disable all movement', restoring all movement.")*/
|
||||
@@ -2,6 +2,10 @@
|
||||
set category = "IC"
|
||||
set name = "Pray"
|
||||
|
||||
if(say_disabled) //This is here to try to identify lag problems
|
||||
usr << "\red Speech is currently admin-disabled."
|
||||
return
|
||||
|
||||
msg = copytext(sanitize(msg), 1, MAX_MESSAGE_LEN)
|
||||
if(!msg) return
|
||||
|
||||
|
||||
@@ -121,9 +121,6 @@ var/global/sent_strike_team = 0
|
||||
return new_commando
|
||||
|
||||
/mob/living/carbon/human/proc/equip_death_commando(leader_selected = 0)
|
||||
var/obj/machinery/camera/camera = new /obj/machinery/camera(src) //Gives all the commandos internals cameras.
|
||||
camera.network = "CREED"
|
||||
camera.c_tag = real_name
|
||||
|
||||
var/obj/item/device/radio/R = new /obj/item/device/radio/headset(src)
|
||||
R.set_frequency(1441)
|
||||
|
||||
@@ -128,9 +128,6 @@ var/global/sent_syndicate_strike_team = 0
|
||||
return new_syndicate_commando
|
||||
|
||||
/mob/living/carbon/human/proc/equip_syndicate_commando(syndicate_leader_selected = 0)
|
||||
var/obj/machinery/camera/camera = new /obj/machinery/camera(src) //Gives all the commandos internals cameras.
|
||||
camera.network = "Syndicate"
|
||||
camera.c_tag = real_name
|
||||
|
||||
var/obj/item/device/radio/R = new /obj/item/device/radio/headset/syndicate(src)
|
||||
R.set_frequency(SYND_FREQ) //Same frequency as the syndicate team in Nuke mode.
|
||||
|
||||
@@ -31,3 +31,10 @@
|
||||
// comment out the line below when debugging locally to enable the options & messages menu
|
||||
control_freak = 1
|
||||
|
||||
|
||||
////////////////////////////////////
|
||||
//things that require the database//
|
||||
////////////////////////////////////
|
||||
var/player_age = "Requires database" //So admins know why it isn't working - Used to determine how old the account is - in days.
|
||||
var/related_accounts_ip = "Requires database" //So admins know why it isn't working - Used to determine what other accounts previously logged in from this ip
|
||||
var/related_accounts_cid = "Requires database" //So admins know why it isn't working - Used to determine what other accounts previously logged in from this computer id
|
||||
|
||||
@@ -168,11 +168,26 @@
|
||||
|
||||
var/sql_ckey = sql_sanitize_text(src.ckey)
|
||||
|
||||
var/DBQuery/query = dbcon.NewQuery("SELECT id FROM erro_player WHERE ckey = '[sql_ckey]'")
|
||||
var/DBQuery/query = dbcon.NewQuery("SELECT id, datediff(Now(),firstseen) as age FROM erro_player WHERE ckey = '[sql_ckey]'")
|
||||
query.Execute()
|
||||
var/sql_id = 0
|
||||
while(query.NextRow())
|
||||
sql_id = query.item[1]
|
||||
player_age = text2num(query.item[2])
|
||||
break
|
||||
|
||||
var/DBQuery/query_ip = dbcon.NewQuery("SELECT ckey FROM erro_player WHERE ip = '[address]'")
|
||||
query_ip.Execute()
|
||||
related_accounts_ip = ""
|
||||
while(query_ip.NextRow())
|
||||
related_accounts_ip += "[query_ip.item[1]], "
|
||||
break
|
||||
|
||||
var/DBQuery/query_cid = dbcon.NewQuery("SELECT ckey FROM erro_player WHERE computerid = '[computer_id]'")
|
||||
query_cid.Execute()
|
||||
related_accounts_cid = ""
|
||||
while(query_cid.NextRow())
|
||||
related_accounts_cid += "[query_cid.item[1]], "
|
||||
break
|
||||
|
||||
//Just the standard check to see if it's actually a number
|
||||
@@ -200,6 +215,12 @@
|
||||
var/DBQuery/query_insert = dbcon.NewQuery("INSERT INTO erro_player (id, ckey, firstseen, lastseen, ip, computerid, lastadminrank) VALUES (null, '[sql_ckey]', Now(), Now(), '[sql_ip]', '[sql_computerid]', '[sql_admin_rank]')")
|
||||
query_insert.Execute()
|
||||
|
||||
//Logging player access
|
||||
var/serverip = "[world.internet_address]:[world.port]"
|
||||
var/DBQuery/query_accesslog = dbcon.NewQuery("INSERT INTO `erro_connection_log`(`id`,`datetime`,`serverip`,`ckey`,`ip`,`computerid`) VALUES(null,Now(),'[serverip]','[sql_ckey]','[sql_ip]','[sql_computerid]');")
|
||||
query_accesslog.Execute()
|
||||
|
||||
|
||||
#undef TOPIC_SPAM_DELAY
|
||||
#undef UPLOAD_LIMIT
|
||||
#undef MIN_CLIENT_VERSION
|
||||
|
||||
@@ -396,6 +396,10 @@ datum/preferences
|
||||
if(jobban_isbanned(user, rank))
|
||||
HTML += "<font color=red>[rank]</font></td><td><font color=red><b> \[BANNED]</b></font></td></tr>"
|
||||
continue
|
||||
if(!job.player_old_enough(user.client))
|
||||
var/available_in_days = job.available_in_days(user.client)
|
||||
HTML += "<font color=red>[rank]</font></td><td><font color=red> \[IN [(available_in_days)] DAYS]</font></td></tr>"
|
||||
continue
|
||||
if((job_civilian_low & ASSISTANT) && (rank != "Assistant"))
|
||||
HTML += "<font color=orange>[rank]</font></td><td></td></tr>"
|
||||
continue
|
||||
|
||||
@@ -89,6 +89,9 @@
|
||||
if(I)
|
||||
C.images += image(tempHud, perp, "hud[ckey(I.GetJobRealName())]")
|
||||
perpname = I.registered_name
|
||||
else
|
||||
perpname = perp.name
|
||||
C.images += image(tempHud, perp, "hudunknown")
|
||||
else
|
||||
C.images += image(tempHud, perp, "hudunknown")
|
||||
|
||||
|
||||
@@ -81,3 +81,12 @@
|
||||
flags_inv = HIDEFACE
|
||||
w_class = 2
|
||||
|
||||
/obj/item/clothing/mask/horsehead
|
||||
name = "horse head mask"
|
||||
desc = "A mask made of soft vinyl and latex, representing the head of a horse."
|
||||
icon_state = "horsehead"
|
||||
item_state = "horsehead"
|
||||
flags = FPRINT|TABLEPASS|BLOCKHAIR
|
||||
flags_inv = HIDEFACE
|
||||
w_class = 2
|
||||
var/voicechange = 0
|
||||
|
||||
@@ -96,13 +96,6 @@
|
||||
desc = "Shoes for a cyborg costume"
|
||||
icon_state = "boots"
|
||||
|
||||
/obj/item/clothing/shoes/laceups
|
||||
name = "laceup shoes"
|
||||
desc = "Stylish black leather."
|
||||
icon_state = "laceups"
|
||||
item_state = "laceups"
|
||||
color = "black"
|
||||
|
||||
/obj/item/clothing/shoes/slippers
|
||||
name = "bunny slippers"
|
||||
desc = "Fluffy!"
|
||||
@@ -113,4 +106,9 @@
|
||||
name = "worn bunny slippers"
|
||||
desc = "Fluffy..."
|
||||
icon_state = "slippers_worn"
|
||||
item_state = "slippers_worn"
|
||||
item_state = "slippers_worn"
|
||||
|
||||
/obj/item/clothing/shoes/laceup
|
||||
name = "laceup shoes"
|
||||
desc = "The height of fashion, and they're pre-polished!"
|
||||
icon_state = "laceups"
|
||||
|
||||
@@ -47,6 +47,7 @@
|
||||
//Chief Engineer's rig
|
||||
/obj/item/clothing/head/helmet/space/rig/elite
|
||||
name = "advanced hardsuit helmet"
|
||||
desc = "A special suit that protects against hazardous, low pressure environments. Shines with a high polish."
|
||||
icon_state = "rig0-white"
|
||||
item_state = "ce_helm"
|
||||
color = "white"
|
||||
@@ -119,25 +120,17 @@
|
||||
name = "medical hardsuit"
|
||||
item_state = "medical_hardsuit"
|
||||
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank/emergency_oxygen,/obj/item/weapon/storage/firstaid,/obj/item/device/healthanalyzer,/obj/item/stack/medical)
|
||||
|
||||
|
||||
//Security Rig (BS12)
|
||||
//Security
|
||||
/obj/item/clothing/head/helmet/space/rig/security
|
||||
name = "security hardsuit helmet"
|
||||
desc = "A special helmet designed for work in a hazardous, low pressure environment. Has additional layers of armour and ablative shielding in lieu of radiation shielding."
|
||||
icon_state = "rig0-security"
|
||||
item_state = "security_helm"
|
||||
color = "security"
|
||||
armor = list(melee = 45, bullet = 10, laser = 25,energy = 10, bomb = 40, bio = 100, rad = 5)
|
||||
|
||||
icon_state = "rig0-sec"
|
||||
item_state = "sec_helm"
|
||||
color = "sec"
|
||||
/obj/item/clothing/suit/space/rig/security
|
||||
desc = "A special suit that protects against hazardous, low pressure environments. Has additional layers of armour and ablative shielding in lieu of radiation shielding."
|
||||
icon_state = "rig-security"
|
||||
icon_state = "rig-sec"
|
||||
name = "security hardsuit"
|
||||
item_state = "atmos_hardsuit"
|
||||
armor = list(melee = 45, bullet = 10, laser = 25,energy = 10, bomb = 40, bio = 100, rad = 5)
|
||||
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank/emergency_oxygen,/obj/item/weapon/melee/baton,/obj/item/weapon/handcuffs,/obj/item/weapon/gun/energy)
|
||||
|
||||
item_state = "sec_hardsuit"
|
||||
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank, /obj/item/weapon/gun/energy,/obj/item/weapon/reagent_containers/spray/pepper,/obj/item/weapon/gun/projectile,/obj/item/ammo_magazine,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/handcuffs)
|
||||
|
||||
//Atmospherics Rig (BS12)
|
||||
/obj/item/clothing/head/helmet/space/rig/atmos
|
||||
|
||||
@@ -65,25 +65,6 @@
|
||||
return ..(M,user)
|
||||
|
||||
|
||||
/obj/item/clothing/tie/holster
|
||||
name = "shoulder holster"
|
||||
desc = "A handgun holster."
|
||||
icon_state = "holster"
|
||||
color = "holster"
|
||||
var/obj/item/weapon/gun/holstered = null
|
||||
|
||||
/obj/item/clothing/tie/holster/armpit
|
||||
name = "shoulder holster"
|
||||
desc = "A worn-out handgun holster. Perfect for concealed carry"
|
||||
icon_state = "holster"
|
||||
color = "holster"
|
||||
|
||||
/obj/item/clothing/tie/holster/waist
|
||||
name = "shoulder holster"
|
||||
desc = "A handgun holster. Made of expensive leather."
|
||||
icon_state = "holster"
|
||||
color = "holster_low"
|
||||
|
||||
//Medals
|
||||
/obj/item/clothing/tie/medal
|
||||
name = "bronze medal"
|
||||
@@ -167,4 +148,29 @@
|
||||
name = "medical guard armband"
|
||||
desc = "An armband, worn by the station's security forces to display which department they're assigned to. This one is white."
|
||||
icon_state = "med"
|
||||
color = "med"
|
||||
color = "med"
|
||||
|
||||
/obj/item/clothing/tie/armband/medgreen
|
||||
name = "medical guard armband"
|
||||
desc = "An armband, worn by the station's security forces to display which department they're assigned to. This one is white and green."
|
||||
icon_state = "medgreen"
|
||||
color = "medgreen"
|
||||
|
||||
/obj/item/clothing/tie/holster
|
||||
name = "shoulder holster"
|
||||
desc = "A handgun holster."
|
||||
icon_state = "holster"
|
||||
color = "holster"
|
||||
var/obj/item/weapon/gun/holstered = null
|
||||
|
||||
/obj/item/clothing/tie/holster/armpit
|
||||
name = "shoulder holster"
|
||||
desc = "A worn-out handgun holster. Perfect for concealed carry"
|
||||
icon_state = "holster"
|
||||
color = "holster"
|
||||
|
||||
/obj/item/clothing/tie/holster/waist
|
||||
name = "shoulder holster"
|
||||
desc = "A handgun holster. Made of expensive leather."
|
||||
icon_state = "holster"
|
||||
color = "holster_low"
|
||||
|
||||
@@ -0,0 +1,290 @@
|
||||
//This dm file includes some food processing machines:
|
||||
// - I. Mill
|
||||
// - II. Fermenter
|
||||
// - III. Still
|
||||
// - IV. Squeezer
|
||||
// - V. Centrifuge
|
||||
|
||||
|
||||
|
||||
// I. The mill is intended to be loaded with produce and returns ground up items. For example: Wheat should become flour and grapes should become raisins.
|
||||
|
||||
/obj/machinery/mill
|
||||
var/list/obj/item/weapon/reagent_containers/food/input = list()
|
||||
var/list/obj/item/weapon/reagent_containers/food/output = list()
|
||||
var/obj/item/weapon/reagent_containers/food/milled_item
|
||||
var/busy = 0
|
||||
var/progress = 0
|
||||
var/error = 0
|
||||
name = "\improper Mill"
|
||||
desc = "It is a machine that grinds produce."
|
||||
icon_state = "autolathe"
|
||||
density = 1
|
||||
anchored = 1
|
||||
use_power = 1
|
||||
idle_power_usage = 10
|
||||
active_power_usage = 1000
|
||||
|
||||
/obj/machinery/mill/process()
|
||||
if(error)
|
||||
return
|
||||
|
||||
if(!busy)
|
||||
use_power = 1
|
||||
if(input.len)
|
||||
milled_item = input[1]
|
||||
input -= milled_item
|
||||
progress = 0
|
||||
busy = 1
|
||||
use_power = 2
|
||||
return
|
||||
|
||||
progress++
|
||||
if(progress < 10) //Edit this value to make milling faster or slower
|
||||
return //Not done yet.
|
||||
|
||||
switch(milled_item.type)
|
||||
if(/obj/item/weapon/reagent_containers/food/snacks/grown/wheat) //Wheat becomes flour
|
||||
var/obj/item/weapon/reagent_containers/food/drinks/flour/F = new(src)
|
||||
output += F
|
||||
if(/obj/item/weapon/reagent_containers/food/drinks/flour) //Flour is still flour
|
||||
var/obj/item/weapon/reagent_containers/food/drinks/flour/F = new(src)
|
||||
output += F
|
||||
else
|
||||
error = 1
|
||||
|
||||
del(milled_item)
|
||||
busy = 0
|
||||
|
||||
/obj/machinery/mill/attackby(var/obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(istype(W,/obj/item/weapon/reagent_containers/food))
|
||||
user.u_equip(W)
|
||||
W.loc = src
|
||||
input += W
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/machinery/mill/attack_hand(var/mob/user as mob)
|
||||
for(var/obj/item/weapon/reagent_containers/food/F in output)
|
||||
F.loc = src.loc
|
||||
output -= F
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// II. The fermenter is intended to be loaded with food items and returns medium-strength alcohol items, sucha s wine and beer.
|
||||
|
||||
/obj/machinery/fermenter
|
||||
var/list/obj/item/weapon/reagent_containers/food/input = list()
|
||||
var/list/obj/item/weapon/reagent_containers/food/output = list()
|
||||
var/obj/item/weapon/reagent_containers/food/fermenting_item
|
||||
var/water_level = 0
|
||||
var/busy = 0
|
||||
var/progress = 0
|
||||
var/error = 0
|
||||
name = "\improper Fermenter"
|
||||
desc = "It is a machine that ferments produce into alcoholic drinks."
|
||||
icon_state = "autolathe"
|
||||
density = 1
|
||||
anchored = 1
|
||||
use_power = 1
|
||||
idle_power_usage = 10
|
||||
active_power_usage = 500
|
||||
|
||||
/obj/machinery/fermenter/process()
|
||||
if(error)
|
||||
return
|
||||
|
||||
if(!busy)
|
||||
use_power = 1
|
||||
if(input.len)
|
||||
fermenting_item = input[1]
|
||||
input -= fermenting_item
|
||||
progress = 0
|
||||
busy = 1
|
||||
use_power = 2
|
||||
return
|
||||
|
||||
if(!water_level)
|
||||
return
|
||||
|
||||
water_level--
|
||||
|
||||
progress++
|
||||
if(progress < 10) //Edit this value to make milling faster or slower
|
||||
return //Not done yet.
|
||||
|
||||
switch(fermenting_item.type)
|
||||
if(/obj/item/weapon/reagent_containers/food/drinks/flour) //Flour is still flour
|
||||
var/obj/item/weapon/reagent_containers/food/drinks/beer/B = new(src)
|
||||
output += B
|
||||
else
|
||||
error = 1
|
||||
|
||||
del(fermenting_item)
|
||||
busy = 0
|
||||
|
||||
/obj/machinery/fermenter/attackby(var/obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(istype(W,/obj/item/weapon/reagent_containers/food))
|
||||
user.u_equip(W)
|
||||
W.loc = src
|
||||
input += W
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/machinery/fermenter/attack_hand(var/mob/user as mob)
|
||||
for(var/obj/item/weapon/reagent_containers/food/F in output)
|
||||
F.loc = src.loc
|
||||
output -= F
|
||||
|
||||
|
||||
|
||||
// III. The still is a machine that is loaded with food items and returns hard liquor, such as vodka.
|
||||
|
||||
/obj/machinery/still
|
||||
var/list/obj/item/weapon/reagent_containers/food/input = list()
|
||||
var/list/obj/item/weapon/reagent_containers/food/output = list()
|
||||
var/obj/item/weapon/reagent_containers/food/destilling_item
|
||||
var/busy = 0
|
||||
var/progress = 0
|
||||
var/error = 0
|
||||
name = "\improper Still"
|
||||
desc = "It is a machine that produces hard liquor from alcoholic drinks."
|
||||
icon_state = "autolathe"
|
||||
density = 1
|
||||
anchored = 1
|
||||
use_power = 1
|
||||
idle_power_usage = 10
|
||||
active_power_usage = 10000
|
||||
|
||||
/obj/machinery/still/process()
|
||||
if(error)
|
||||
return
|
||||
|
||||
if(!busy)
|
||||
use_power = 1
|
||||
if(input.len)
|
||||
destilling_item = input[1]
|
||||
input -= destilling_item
|
||||
progress = 0
|
||||
busy = 1
|
||||
use_power = 2
|
||||
return
|
||||
|
||||
progress++
|
||||
if(progress < 10) //Edit this value to make distilling faster or slower
|
||||
return //Not done yet.
|
||||
|
||||
switch(destilling_item.type)
|
||||
if(/obj/item/weapon/reagent_containers/food/drinks/beer) //Flour is still flour
|
||||
var/obj/item/weapon/reagent_containers/food/drinks/bottle/vodka/V = new(src)
|
||||
output += V
|
||||
else
|
||||
error = 1
|
||||
|
||||
del(destilling_item)
|
||||
busy = 0
|
||||
|
||||
/obj/machinery/still/attackby(var/obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(istype(W,/obj/item/weapon/reagent_containers/food))
|
||||
user.u_equip(W)
|
||||
W.loc = src
|
||||
input += W
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/machinery/still/attack_hand(var/mob/user as mob)
|
||||
for(var/obj/item/weapon/reagent_containers/food/F in output)
|
||||
F.loc = src.loc
|
||||
output -= F
|
||||
|
||||
|
||||
|
||||
|
||||
// IV. The squeezer is intended to destroy inserted food items, but return some of the reagents they contain.
|
||||
|
||||
/obj/machinery/squeezer
|
||||
var/list/obj/item/weapon/reagent_containers/food/input = list()
|
||||
var/obj/item/weapon/reagent_containers/food/squeezed_item
|
||||
var/water_level = 0
|
||||
var/busy = 0
|
||||
var/progress = 0
|
||||
var/error = 0
|
||||
name = "\improper Squeezer"
|
||||
desc = "It is a machine that squeezes extracts from produce."
|
||||
icon_state = "autolathe"
|
||||
density = 1
|
||||
anchored = 1
|
||||
use_power = 1
|
||||
idle_power_usage = 10
|
||||
active_power_usage = 500
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// V. The centrifuge spins inserted food items. It is intended to squeeze out the reagents that are common food catalysts (enzymes currently)
|
||||
|
||||
/obj/machinery/centrifuge
|
||||
var/list/obj/item/weapon/reagent_containers/food/input = list()
|
||||
var/list/obj/item/weapon/reagent_containers/food/output = list()
|
||||
var/obj/item/weapon/reagent_containers/food/spinning_item
|
||||
var/busy = 0
|
||||
var/progress = 0
|
||||
var/error = 0
|
||||
var/enzymes = 0
|
||||
var/water = 0
|
||||
name = "\improper Centrifuge"
|
||||
desc = "It is a machine that spins produce."
|
||||
icon_state = "autolathe"
|
||||
density = 1
|
||||
anchored = 1
|
||||
use_power = 1
|
||||
idle_power_usage = 10
|
||||
active_power_usage = 10000
|
||||
|
||||
/obj/machinery/centrifuge/process()
|
||||
if(error)
|
||||
return
|
||||
|
||||
if(!busy)
|
||||
use_power = 1
|
||||
if(input.len)
|
||||
spinning_item = input[1]
|
||||
input -= spinning_item
|
||||
progress = 0
|
||||
busy = 1
|
||||
use_power = 2
|
||||
return
|
||||
|
||||
progress++
|
||||
if(progress < 10) //Edit this value to make milling faster or slower
|
||||
return //Not done yet.
|
||||
|
||||
var/transfer_enzymes = spinning_item.reagents.get_reagent_amount("enzyme")
|
||||
|
||||
if(transfer_enzymes)
|
||||
enzymes += transfer_enzymes
|
||||
spinning_item.reagents.remove_reagent("enzyme",transfer_enzymes)
|
||||
|
||||
output += spinning_item
|
||||
busy = 0
|
||||
|
||||
/obj/machinery/centrifuge/attackby(var/obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(istype(W,/obj/item/weapon/reagent_containers/food))
|
||||
user.u_equip(W)
|
||||
W.loc = src
|
||||
input += W
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/machinery/centrifuge/attack_hand(var/mob/user as mob)
|
||||
for(var/obj/item/weapon/reagent_containers/food/F in output)
|
||||
F.loc = src.loc
|
||||
output -= F
|
||||
while(enzymes >= 50)
|
||||
enzymes -= 50
|
||||
new/obj/item/weapon/reagent_containers/food/condiment/enzyme(src.loc)
|
||||
|
||||
@@ -1,13 +1,19 @@
|
||||
/datum/event/alien_infestation
|
||||
announceWhen = 75
|
||||
endWhen = 75
|
||||
announceWhen = 400
|
||||
oneShot = 1
|
||||
|
||||
var/spawncount = 1
|
||||
var/successSpawn = 0 //So we don't make a command report if nothing gets spawned.
|
||||
|
||||
|
||||
/datum/event/alien_infestation/setup()
|
||||
announceWhen = rand(announceWhen, announceWhen + 50)
|
||||
spawncount = rand(1, 2)
|
||||
|
||||
/datum/event/alien_infestation/announce()
|
||||
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')
|
||||
if(successSpawn)
|
||||
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')
|
||||
|
||||
|
||||
/datum/event/alien_infestation/start()
|
||||
@@ -19,8 +25,7 @@
|
||||
|
||||
var/list/candidates = get_alien_candidates()
|
||||
|
||||
if(prob(50)) spawncount++ //sometimes, have two larvae spawn instead of one
|
||||
while((spawncount >= 1) && vents.len && candidates.len)
|
||||
while(spawncount > 0 && vents.len && candidates.len)
|
||||
var/obj/vent = pick(vents)
|
||||
var/candidate = pick(candidates)
|
||||
|
||||
@@ -29,4 +34,5 @@
|
||||
|
||||
candidates -= candidate
|
||||
vents -= vent
|
||||
spawncount--
|
||||
spawncount--
|
||||
successSpawn = 1
|
||||
@@ -12,14 +12,17 @@
|
||||
|
||||
/datum/event/blob/start()
|
||||
var/turf/T = pick(blobstart)
|
||||
if(!T) kill()
|
||||
if(!T)
|
||||
kill()
|
||||
return
|
||||
Blob = new /obj/effect/blob/core(T, 200)
|
||||
Blob.Life()
|
||||
Blob.Life()
|
||||
Blob.Life()
|
||||
for(var/i = 1; i < rand(3, 6), i++)
|
||||
Blob.process()
|
||||
|
||||
|
||||
/datum/event/blob/tick()
|
||||
if(!Blob) kill()
|
||||
if(!Blob)
|
||||
kill()
|
||||
return
|
||||
if(IsMultiple(activeFor, 3))
|
||||
Blob.Life()
|
||||
Blob.process()
|
||||
@@ -0,0 +1,47 @@
|
||||
/datum/event/brand_intelligence
|
||||
announceWhen = 21
|
||||
endWhen = 1000 //Ends when all vending machines are subverted anyway.
|
||||
oneShot = 1
|
||||
|
||||
var/list/obj/machinery/vending/vendingMachines = list()
|
||||
var/obj/machinery/vending/originMachine
|
||||
|
||||
|
||||
/datum/event/brand_intelligence/announce()
|
||||
command_alert("Rampant brand intelligence has been detected aboard [station_name()], please stand-by.", "Machine Learning Alert")
|
||||
|
||||
|
||||
/datum/event/brand_intelligence/start()
|
||||
for(var/obj/machinery/vending/V in machines)
|
||||
if(V.z != 1) continue
|
||||
vendingMachines.Add(V)
|
||||
|
||||
if(!vendingMachines.len)
|
||||
kill()
|
||||
return
|
||||
|
||||
originMachine = pick(vendingMachines)
|
||||
vendingMachines.Remove(originMachine)
|
||||
originMachine.shut_up = 0
|
||||
originMachine.shoot_inventory = 1
|
||||
|
||||
|
||||
/datum/event/brand_intelligence/tick()
|
||||
if(!vendingMachines.len || !originMachine || originMachine.shut_up) //if every machine is infected, or if the original vending machine is missing or has it's voice switch flipped
|
||||
kill()
|
||||
return
|
||||
|
||||
if(IsMultiple(activeFor, 3))
|
||||
var/obj/machinery/vending/infectedMachine = pick(vendingMachines)
|
||||
vendingMachines.Remove(infectedMachine)
|
||||
infectedMachine.shut_up = 0
|
||||
infectedMachine.shoot_inventory = 1
|
||||
|
||||
if(IsMultiple(activeFor, 12))
|
||||
originMachine.speak(pick("Try our aggressive new marketing strategies!", \
|
||||
"You should buy products to feed your lifestyle obession!", \
|
||||
"Consume!", \
|
||||
"Your money can buy happiness!", \
|
||||
"Engage direct marketing!", \
|
||||
"Advertising is legalized lying! But don't let that put you off our great deals!", \
|
||||
"You don't want to buy anything? Yeah, well I didn't want to buy your mom either."))
|
||||
@@ -1,8 +1,9 @@
|
||||
/datum/event/carp_migration
|
||||
announceWhen = 50
|
||||
endWhen = 50
|
||||
oneShot = 1
|
||||
|
||||
/datum/event/carp_migration/setup()
|
||||
announceWhen = rand(40, 60)
|
||||
|
||||
/datum/event/carp_migration/announce()
|
||||
command_alert("Unknown biological entities have been detected near [station_name()], please stand-by.", "Lifesign Alert")
|
||||
|
||||
@@ -1,17 +1,20 @@
|
||||
/datum/event/communications_blackout
|
||||
var/silent = 1 //most of the time, we don't want an announcement, so as to allow AIs to fake blackouts.
|
||||
|
||||
/datum/event/communications_blackout/announce()
|
||||
if(!silent)
|
||||
command_alert("Ionospheric anomalies detected. Temporary telecommunication failure imminent. Please contact you-BZZT")
|
||||
var/alert = pick( "Ionospheric anomalies detected. Temporary telecommunication failure imminent. Please contact you*%fj00)`5vc-BZZT", \
|
||||
"Ionospheric anomalies detected. Temporary telecommunication failu*3mga;b4;'1v¬-BZZZT", \
|
||||
"Ionospheric anomalies detected. Temporary telec#MCi46:5.;@63-BZZZZT", \
|
||||
"Ionospheric anomalies dete'fZ\\kg5_0-BZZZZZT", \
|
||||
"Ionospheri:%£ MCayj^j<.3-BZZZZZZT", \
|
||||
"#4nd%;f4y6,>£%-BZZZZZZZT")
|
||||
|
||||
for(var/mob/living/silicon/ai/A in player_list) //AIs are always aware of communication blackouts.
|
||||
A << "<br>"
|
||||
A << "<span class='warning'><b>[alert]</b></span>"
|
||||
A << "<br>"
|
||||
|
||||
if(prob(30)) //most of the time, we don't want an announcement, so as to allow AIs to fake blackouts.
|
||||
command_alert(alert)
|
||||
|
||||
|
||||
/datum/event/communications_blackout/start()
|
||||
if(prob(25))
|
||||
silent = 0
|
||||
for(var/mob/living/silicon/ai/A in player_list) //AIs are always aware of communication blackouts.
|
||||
A << "<br>"
|
||||
A << "<span class='warning'><b>Ionospheric anomalies detected. Temporary telecommunication failure imminent. Please contact you-BZZT<b></span>"
|
||||
A << "<br>"
|
||||
for(var/obj/machinery/telecomms/T in telecomms_list)
|
||||
T.emp_act(1)
|
||||
@@ -1,6 +1,5 @@
|
||||
/datum/event/disease_outbreak
|
||||
announceWhen = 15
|
||||
endWhen = 15
|
||||
oneShot = 1
|
||||
|
||||
|
||||
@@ -8,6 +7,9 @@
|
||||
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')
|
||||
|
||||
/datum/event/disease_outbreak/setup()
|
||||
announceWhen = rand(15, 30)
|
||||
|
||||
/datum/event/disease_outbreak/start()
|
||||
var/virus_type = pick(/datum/disease/dnaspread, /datum/disease/advance/flu, /datum/disease/advance/cold, /datum/disease/brainrot, /datum/disease/magnitis)
|
||||
|
||||
|
||||
@@ -1,22 +1,26 @@
|
||||
/datum/event //NOTE: Times are measured in master controller ticks!
|
||||
var/startWhen = 0 //When in the lifetime to call start().
|
||||
var/announceWhen = 0 //When in the lifetime to call announce().
|
||||
var/endWhen = 0 //When in the lifetime the event should end. Include time for delayed announcements.
|
||||
var/endWhen = 0 //When in the lifetime the event should end.
|
||||
var/oneShot = 0 //If true, then the event removes itself from the list of potential events on creation.
|
||||
|
||||
var/activeFor = 0 //How long the event has existed. You don't need to change this.
|
||||
|
||||
|
||||
|
||||
//Called first before processing.
|
||||
//Allows you to setup your event, such as randomly
|
||||
//setting the startWhen and or announceWhen variables.
|
||||
//Only called once.
|
||||
/datum/event/proc/setup()
|
||||
return
|
||||
|
||||
//Called when the tick is equal to the startWhen variable.
|
||||
//Allows you to announce before starting or vice versa.
|
||||
//Allows you to start before announcing or vice versa.
|
||||
//Only called once.
|
||||
/datum/event/proc/start()
|
||||
return
|
||||
|
||||
//Called when the tick is equal to the announceWhen variable.
|
||||
//Allows you to start before announcing or vice versa.
|
||||
//Allows you to announce before starting or vice versa.
|
||||
//Only called once.
|
||||
/datum/event/proc/announce()
|
||||
return
|
||||
@@ -39,21 +43,24 @@
|
||||
|
||||
|
||||
|
||||
|
||||
//Do not override this proc, instead use the appropiate procs.
|
||||
//This proc will handle the calls to the appropiate procs.
|
||||
/datum/event/proc/process()
|
||||
|
||||
if(activeFor > startWhen && activeFor < endWhen)
|
||||
tick()
|
||||
|
||||
if(activeFor == startWhen)
|
||||
start()
|
||||
|
||||
if(activeFor > startWhen)
|
||||
tick()
|
||||
|
||||
if(activeFor == announceWhen)
|
||||
announce()
|
||||
|
||||
if(activeFor >= endWhen)
|
||||
if(activeFor == endWhen)
|
||||
end()
|
||||
|
||||
// Everything is done, let's clean up.
|
||||
if(activeFor >= endWhen && activeFor >= announceWhen && activeFor >= startWhen)
|
||||
kill()
|
||||
|
||||
activeFor++
|
||||
@@ -61,6 +68,7 @@
|
||||
|
||||
//Garbage collects the event by removing it from the global events list,
|
||||
//which should be the only place it's referenced.
|
||||
//Called when start(), announce() and end() has all been called.
|
||||
/datum/event/proc/kill()
|
||||
events.Remove(src)
|
||||
|
||||
@@ -68,7 +76,8 @@
|
||||
//Adds the event to the global events list, and removes it from the list
|
||||
//of potential events.
|
||||
/datum/event/New()
|
||||
setup()
|
||||
events.Add(src)
|
||||
|
||||
if(oneShot)
|
||||
potentialRandomEvents.Remove(type)
|
||||
potentialRandomEvents.Remove(type)
|
||||
..()
|
||||
@@ -1,8 +1,8 @@
|
||||
var/list/allEvents = typesof(/datum/event) - /datum/event
|
||||
var/list/potentialRandomEvents = typesof(/datum/event) - /datum/event
|
||||
|
||||
var/eventTimeLower = 5000
|
||||
var/eventTimeUpper = 10000
|
||||
var/eventTimeLower = 15000 //15 minutes
|
||||
var/eventTimeUpper = 30000 //30 minutes
|
||||
|
||||
var/scheduledEvent = null
|
||||
|
||||
@@ -36,4 +36,15 @@ var/scheduledEvent = null
|
||||
|
||||
//The event will add itself to the MC's event list
|
||||
//and start working via the constructor.
|
||||
new Type
|
||||
new Type
|
||||
|
||||
/client/proc/forceEvent(var/type in allEvents)
|
||||
set name = "Trigger Event (Debug Only)"
|
||||
set category = "Debug"
|
||||
|
||||
if(!holder)
|
||||
return
|
||||
|
||||
if(ispath(type))
|
||||
new type
|
||||
message_admins("[key_name_admin(usr)] has triggered an event. ([type])", 1)
|
||||
@@ -1,17 +1,22 @@
|
||||
/datum/event/prison_break
|
||||
announceWhen = 50
|
||||
endWhen = 50
|
||||
oneShot = 1
|
||||
|
||||
var/releaseWhen = 25
|
||||
var/list/area/prisonAreas = list()
|
||||
|
||||
|
||||
/datum/event/prison_break/setup()
|
||||
announceWhen = rand(50, 60)
|
||||
releaseWhen = rand(20, 30)
|
||||
|
||||
|
||||
/datum/event/prison_break/announce()
|
||||
if(prisonAreas && prisonAreas.len > 0)
|
||||
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."
|
||||
kill()
|
||||
|
||||
|
||||
/datum/event/prison_break/start()
|
||||
@@ -25,6 +30,13 @@
|
||||
L.flicker(10)
|
||||
|
||||
|
||||
/datum/event/prison_break/announce()
|
||||
if(prisonAreas && prisonAreas.len > 0)
|
||||
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."
|
||||
|
||||
|
||||
/datum/event/prison_break/tick()
|
||||
if(activeFor == releaseWhen)
|
||||
if(prisonAreas && prisonAreas.len > 0)
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
/datum/event/radiation_storm
|
||||
announceWhen = 5
|
||||
endWhen = 5
|
||||
oneShot = 1
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
/datum/event/spider_infestation
|
||||
announceWhen = 400
|
||||
oneShot = 1
|
||||
|
||||
var/spawncount = 1
|
||||
|
||||
|
||||
/datum/event/spider_infestation/setup()
|
||||
announceWhen = rand(announceWhen, announceWhen + 50)
|
||||
spawncount = rand(5, 8)
|
||||
|
||||
/datum/event/spider_infestation/announce()
|
||||
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')
|
||||
|
||||
|
||||
/datum/event/spider_infestation/start()
|
||||
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)
|
||||
vents += temp_vent
|
||||
|
||||
while((spawncount >= 1) && vents.len)
|
||||
var/obj/vent = pick(vents)
|
||||
new /obj/effect/spider/spiderling(vent.loc)
|
||||
vents -= vent
|
||||
spawncount--
|
||||
@@ -1,5 +1,5 @@
|
||||
/datum/event/spontaneous_appendicitis/start()
|
||||
for(var/mob/living/carbon/human/H in living_mob_list)
|
||||
for(var/mob/living/carbon/human/H in shuffle(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
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
|
||||
//If there are alien weeds on the ground then heal if needed or give some toxins
|
||||
if(locate(/obj/effect/alien/weeds) in loc)
|
||||
if(health >= maxHealth)
|
||||
if(health >= maxHealth - getCloneLoss())
|
||||
adjustToxLoss(plasma_rate)
|
||||
else
|
||||
adjustBruteLoss(-heal_rate)
|
||||
|
||||
@@ -191,7 +191,7 @@
|
||||
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red <B>The [M.name] has [pick("bit","slashed")] []!</B>", src), 1)
|
||||
O.show_message(text("\red <B>The [M.name] glomps []!</B>", src), 1)
|
||||
|
||||
var/damage = rand(1, 3)
|
||||
|
||||
@@ -324,7 +324,7 @@
|
||||
if ("hurt")
|
||||
var/damage = rand(1, 9)
|
||||
if (prob(90))
|
||||
if ((HULK in M.mutations) || (SUPRSTR in M.augmentations))//HULK SMASH
|
||||
if (HULK in M.mutations)//HULK SMASH
|
||||
damage += 14
|
||||
spawn(0)
|
||||
Weaken(damage) // Why can a hulk knock an alien out but not knock out a human? Damage is robust enough.
|
||||
|
||||
@@ -216,7 +216,7 @@
|
||||
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red <B>The [M.name] has [pick("bit","slashed")] []!</B>", src), 1)
|
||||
O.show_message(text("\red <B>The [M.name] glomps []!</B>", src), 1)
|
||||
|
||||
var/damage = rand(1, 3)
|
||||
|
||||
@@ -304,7 +304,7 @@
|
||||
else
|
||||
var/damage = rand(1, 9)
|
||||
if (prob(90))
|
||||
if ((HULK in M.mutations) || (SUPRSTR in M.augmentations))
|
||||
if (HULK in M.mutations)
|
||||
damage += 5
|
||||
spawn(0)
|
||||
Paralyse(1)
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
return
|
||||
|
||||
if (length(message) >= 2)
|
||||
if (copytext(message, 1, 3) == ":a")
|
||||
if (copytext(message, 1, 3) == ":a" || copytext(message, 1, 3) == "#a" || copytext(message, 1, 3) == ".a" )
|
||||
message = copytext(message, 3)
|
||||
message = trim(copytext(sanitize(message), 1, MAX_MESSAGE_LEN))
|
||||
if (stat == 2)
|
||||
|
||||
@@ -26,12 +26,13 @@
|
||||
..()
|
||||
|
||||
/obj/item/alien_embryo/process()
|
||||
if(!affected_mob) return
|
||||
if(loc != affected_mob)
|
||||
affected_mob.status_flags &= ~(XENO_HOST)
|
||||
processing_objects.Remove(src)
|
||||
affected_mob = null
|
||||
spawn(0)
|
||||
RemoveInfectionImages(affected_mob)
|
||||
affected_mob = null
|
||||
return
|
||||
|
||||
if(stage < 5 && prob(3))
|
||||
|
||||
@@ -507,158 +507,6 @@
|
||||
src.hud_used.hotkey_ui_hidden = 1
|
||||
|
||||
|
||||
|
||||
/*
|
||||
|
||||
Radar-related things
|
||||
|
||||
*/
|
||||
|
||||
/mob/living/carbon/human/proc/close_radar()
|
||||
radar_open = 0
|
||||
for(var/obj/screen/x in client.screen)
|
||||
if( (x.name == "radar" && x.icon == 'icons/misc/radar.dmi') || (x in radar_blips) )
|
||||
client.screen -= x
|
||||
del(x)
|
||||
|
||||
place_radar_closed()
|
||||
|
||||
/mob/living/carbon/human/proc/place_radar_closed()
|
||||
var/obj/screen/closedradar = new()
|
||||
closedradar.icon = 'icons/misc/radar.dmi'
|
||||
closedradar.icon_state = "radarclosed"
|
||||
closedradar.screen_loc = "WEST,NORTH-1"
|
||||
closedradar.name = "radar closed"
|
||||
client.screen += closedradar
|
||||
|
||||
/mob/living/carbon/human/proc/start_radar()
|
||||
|
||||
for(var/obj/screen/x in client.screen)
|
||||
if(x.name == "radar closed" && x.icon == 'icons/misc/radar.dmi')
|
||||
client.screen -= x
|
||||
del(x)
|
||||
|
||||
var/obj/screen/cornerA = new()
|
||||
cornerA.icon = 'icons/misc/radar.dmi'
|
||||
cornerA.icon_state = "radar(1,1)"
|
||||
cornerA.screen_loc = "WEST,NORTH-2"
|
||||
cornerA.name = "radar"
|
||||
|
||||
var/obj/screen/cornerB = new()
|
||||
cornerB.icon = 'icons/misc/radar.dmi'
|
||||
cornerB.icon_state = "radar(2,1)"
|
||||
cornerB.screen_loc = "WEST+1,NORTH-2"
|
||||
cornerB.name = "radar"
|
||||
|
||||
var/obj/screen/cornerC = new()
|
||||
cornerC.icon = 'icons/misc/radar.dmi'
|
||||
cornerC.icon_state = "radar(1,2)"
|
||||
cornerC.screen_loc = "WEST,NORTH-1"
|
||||
cornerC.name = "radar"
|
||||
|
||||
var/obj/screen/cornerD = new()
|
||||
cornerD.icon = 'icons/misc/radar.dmi'
|
||||
cornerD.icon_state = "radar(2,2)"
|
||||
cornerD.screen_loc = "WEST+1,NORTH-1"
|
||||
cornerD.name = "radar"
|
||||
|
||||
client.screen += cornerA
|
||||
client.screen += cornerB
|
||||
client.screen += cornerC
|
||||
client.screen += cornerD
|
||||
|
||||
radar_open = 1
|
||||
|
||||
while(radar_open && (RADAR in augmentations))
|
||||
update_radar()
|
||||
sleep(6)
|
||||
|
||||
/mob/living/carbon/human/proc/update_radar()
|
||||
|
||||
if(!client) return
|
||||
var/list/found_targets = list()
|
||||
|
||||
var/max_dist = 29 // 29 tiles is the max distance
|
||||
|
||||
// If the mob is inside a turf, set the center to the object they're in
|
||||
var/atom/distance_ref = src
|
||||
if(!isturf(src.loc))
|
||||
distance_ref = loc
|
||||
|
||||
// Clear the radar_blips cache
|
||||
for(var/x in radar_blips)
|
||||
client.screen -= x
|
||||
del(x)
|
||||
radar_blips = list()
|
||||
|
||||
var/starting_px = 3
|
||||
var/starting_py = 3
|
||||
|
||||
for(var/mob/living/M in orange(max_dist, distance_ref))
|
||||
if(M.stat == 2) continue
|
||||
found_targets.Add(M)
|
||||
|
||||
for(var/obj/mecha/M in orange(max_dist, distance_ref))
|
||||
if(!M.occupant) continue
|
||||
found_targets.Add(M)
|
||||
|
||||
for(var/obj/structure/closet/C in orange(max_dist, distance_ref))
|
||||
for(var/mob/living/M in C.contents)
|
||||
if(M.stat == 2) continue
|
||||
found_targets.Add(M)
|
||||
|
||||
// Loop through all living mobs in a range.
|
||||
for(var/atom/A in found_targets)
|
||||
|
||||
var/a_x = A.x
|
||||
var/a_y = A.y
|
||||
|
||||
if(!isturf(A.loc))
|
||||
a_x = A.loc.x
|
||||
a_y = A.loc.y
|
||||
|
||||
var/blip_x = max_dist + (-( distance_ref.x-a_x ) ) + starting_px
|
||||
var/blip_y = max_dist + (-( distance_ref.y-a_y ) ) + starting_py
|
||||
var/obj/screen/blip = new()
|
||||
blip.icon = 'icons/misc/radar.dmi'
|
||||
blip.name = "Blip"
|
||||
blip.layer = 21
|
||||
blip.screen_loc = "WEST:[blip_x-1],NORTH-2:[blip_y-1]" // offset -1 because the center of the blip is not at the bottomleft corner (14)
|
||||
|
||||
if(istype(A, /mob/living))
|
||||
var/mob/living/M = A
|
||||
if(ishuman(M))
|
||||
if(M:wear_id)
|
||||
var/job = M:wear_id:GetJobRealName()
|
||||
if(job == "Security Officer")
|
||||
blip.icon_state = "secblip"
|
||||
blip.name = "Security Officer"
|
||||
else if(job == "Captain" || job == "Research Director" || job == "Chief Engineer" || job == "Chief Medical Officer" || job == "Head of Security" || job == "Head of Personnel")
|
||||
blip.icon_state = "headblip"
|
||||
blip.name = "Station Head"
|
||||
else
|
||||
blip.icon_state = "civblip"
|
||||
blip.name = "Civilian"
|
||||
else
|
||||
blip.icon_state = "civblip"
|
||||
blip.name = "Civilian"
|
||||
|
||||
else if(issilicon(M))
|
||||
blip.icon_state = "roboblip"
|
||||
blip.name = "Robotic Organism"
|
||||
|
||||
else
|
||||
blip.icon_state = "unknownblip"
|
||||
blip.name = "Unknown Organism"
|
||||
|
||||
else if(istype(A, /obj/mecha))
|
||||
blip.icon_state = "roboblip"
|
||||
blip.name = "Robotic Organism"
|
||||
|
||||
radar_blips.Add(blip)
|
||||
client.screen += blip
|
||||
|
||||
|
||||
/mob/living/carbon/human/update_action_buttons()
|
||||
var/num = 1
|
||||
if(!src.hud_used) return
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
mob/var/image/antag_img
|
||||
mob/living/carbon/human
|
||||
var/image/med_img
|
||||
var/image/sec_img
|
||||
var/image/sec2_img
|
||||
var/image/imp_img
|
||||
var/image/health_img
|
||||
|
||||
mob/New()
|
||||
. = ..()
|
||||
antag_img = image('icons/mob/hud.dmi',src)
|
||||
|
||||
mob/living/carbon/human/New()
|
||||
. = ..()
|
||||
med_img = image('icons/mob/hud.dmi',src)
|
||||
sec_img = image('icons/mob/hud.dmi',src)
|
||||
sec2_img = image('icons/mob/hud.dmi',src)
|
||||
imp_img = image('icons/mob/hud.dmi',src)
|
||||
health_img = image('icons/mob/hud.dmi',src)
|
||||
@@ -245,17 +245,19 @@
|
||||
|
||||
f_loss += 60
|
||||
|
||||
if (!prob(getarmor(null, "bomb")))
|
||||
if (prob(getarmor(null, "bomb")))
|
||||
b_loss = b_loss/1.5
|
||||
f_loss = f_loss/1.5
|
||||
|
||||
if (!istype(ears, /obj/item/clothing/ears/earmuffs))
|
||||
ear_damage += 30
|
||||
ear_deaf += 120
|
||||
if (prob(70) && !shielded)
|
||||
Paralyse(10)
|
||||
|
||||
if(3.0)
|
||||
b_loss += 30
|
||||
if (!prob(getarmor(null, "bomb")))
|
||||
if (prob(getarmor(null, "bomb")))
|
||||
b_loss = b_loss/2
|
||||
if (!istype(ears, /obj/item/clothing/ears/earmuffs))
|
||||
ear_damage += 15
|
||||
@@ -367,7 +369,7 @@
|
||||
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red <B>The [M.name] has [pick("bit","slashed")] []!</B>", src), 1)
|
||||
O.show_message(text("\red <B>The [M.name] glomps []!</B>", src), 1)
|
||||
|
||||
var/damage = rand(1, 3)
|
||||
|
||||
@@ -596,29 +598,32 @@
|
||||
return
|
||||
*/
|
||||
|
||||
var/perpname = "wot"
|
||||
var/modified = 0
|
||||
|
||||
var/perpname = "wot"
|
||||
if(wear_id)
|
||||
var/obj/item/weapon/card/id/I = wear_id.GetID()
|
||||
perpname = I.registered_name
|
||||
if(I)
|
||||
perpname = I.registered_name
|
||||
else
|
||||
perpname = name
|
||||
else
|
||||
perpname = src.name
|
||||
perpname = name
|
||||
|
||||
for (var/datum/data/record/E in data_core.general)
|
||||
if (E.fields["name"] == perpname)
|
||||
for (var/datum/data/record/R in data_core.security)
|
||||
if (R.fields["id"] == E.fields["id"])
|
||||
if(perpname)
|
||||
for (var/datum/data/record/E in data_core.general)
|
||||
if (E.fields["name"] == perpname)
|
||||
for (var/datum/data/record/R in data_core.security)
|
||||
if (R.fields["id"] == E.fields["id"])
|
||||
|
||||
var/setcriminal = input(usr, "Specify a new criminal status for this person.", "Security HUD", R.fields["criminal"]) in list("None", "*Arrest*", "Incarcerated", "Parolled", "Released", "Cancel")
|
||||
var/setcriminal = input(usr, "Specify a new criminal status for this person.", "Security HUD", R.fields["criminal"]) in list("None", "*Arrest*", "Incarcerated", "Parolled", "Released", "Cancel")
|
||||
|
||||
if(istype(H.glasses, /obj/item/clothing/glasses/hud/security) || istype(H.glasses, /obj/item/clothing/glasses/sunglasses/sechud))
|
||||
if(setcriminal != "Cancel")
|
||||
R.fields["criminal"] = setcriminal
|
||||
modified = 1
|
||||
if(istype(H.glasses, /obj/item/clothing/glasses/hud/security) || istype(H.glasses, /obj/item/clothing/glasses/sunglasses/sechud))
|
||||
if(setcriminal != "Cancel")
|
||||
R.fields["criminal"] = setcriminal
|
||||
modified = 1
|
||||
|
||||
spawn()
|
||||
H.handle_regular_hud_updates()
|
||||
spawn()
|
||||
H.handle_regular_hud_updates()
|
||||
|
||||
if(!modified)
|
||||
usr << "\red Unable to locate a data core entry for this person."
|
||||
|
||||
@@ -41,7 +41,6 @@
|
||||
var/armor_block = run_armor_check(affecting, "melee")
|
||||
|
||||
if(HULK in M.mutations) damage += 5
|
||||
if(SUPRSTR in M.augmentations) damage += 5
|
||||
|
||||
playsound(loc, "punch", 25, 1, -1)
|
||||
|
||||
@@ -97,24 +96,6 @@
|
||||
|
||||
if("hurt")
|
||||
|
||||
if(ELECTRICHANDS in M.augmentations)
|
||||
var/gendertxt = "their"
|
||||
if(M.gender == MALE)
|
||||
gendertxt = "his"
|
||||
if(M.gender == FEMALE)
|
||||
gendertxt = "her"
|
||||
|
||||
visible_message("\red <B>[M] has shocked [src] with [gendertxt] bare hands!</B>")
|
||||
M.attack_log += text("\[[time_stamp()]\] <font color='red'>Used Electric Hands nanoaug power on [src.name] ([src.ckey])</font>")
|
||||
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been shocked by [M.name] with the Electric Hands nanoaug ([M.ckey])</font>")
|
||||
|
||||
log_attack("<font color='red'>[M.name] ([M.ckey]) used Electric Hands nanoaug on [src.name]([src.ckey]), shocking them </font>")
|
||||
|
||||
var/armorblock = run_armor_check(M.zone_sel.selecting, "energy")
|
||||
apply_effects(5,5,0,0,5,0,0,armorblock)
|
||||
|
||||
return
|
||||
|
||||
var/attack_verb
|
||||
if(M.dna)
|
||||
switch(M.dna.mutantrace)
|
||||
@@ -150,7 +131,6 @@
|
||||
var/armor_block = run_armor_check(affecting, "melee")
|
||||
|
||||
if(HULK in M.mutations) damage += 5
|
||||
if(SUPRSTR in M.augmentations) damage += 5
|
||||
|
||||
|
||||
switch(attack_verb)
|
||||
@@ -162,7 +142,7 @@
|
||||
playsound(loc, "punch", 25, 1, -1)
|
||||
|
||||
visible_message("\red <B>[M] has [attack_verb]ed [src]!</B>")
|
||||
//Rearranged, so claws don't increase weaken chance.
|
||||
//Rearranged, so claws don't increase weaken chance.
|
||||
if(damage >= 5 && prob(50))
|
||||
visible_message("\red <B>[M] has weakened [src]!</B>")
|
||||
apply_effect(2, WEAKEN, armor_block)
|
||||
|
||||
@@ -171,9 +171,6 @@
|
||||
if(blocked)
|
||||
damage = (damage/(blocked+1))
|
||||
|
||||
if(DERMALARMOR in augmentations)
|
||||
damage = damage - (round(damage*0.35)) // reduce damage by 35%
|
||||
|
||||
switch(damagetype)
|
||||
if(BRUTE)
|
||||
damageoverlaytemp = 20
|
||||
|
||||
@@ -366,94 +366,6 @@ var/const/BLOOD_VOLUME_SURVIVE = 122
|
||||
if((COLD_RESISTANCE in mutations) || (prob(1)))
|
||||
heal_organ_damage(0,1)
|
||||
|
||||
if(mHallucination in mutations)
|
||||
hallucination = 100
|
||||
halloss = 0
|
||||
|
||||
if(mSmallsize in mutations)
|
||||
if(!(pass_flags & PASSTABLE))
|
||||
pass_flags |= PASSTABLE
|
||||
else
|
||||
if(pass_flags & PASSTABLE)
|
||||
pass_flags &= ~PASSTABLE
|
||||
|
||||
// Make nanoregen heal youu, -3 all damage types
|
||||
if((NANOREGEN in augmentations) || (mRegen in mutations))
|
||||
var/healed = 0
|
||||
var/hptoreg = 0
|
||||
if(NANOREGEN in augmentations)
|
||||
hptoreg += 3
|
||||
if(mRegen in mutations)
|
||||
hptoreg += 2
|
||||
if(stat==UNCONSCIOUS) hptoreg/=2
|
||||
if(stat==DEAD) hptoreg=0
|
||||
|
||||
for(var/i=0, i<hptoreg, i++)
|
||||
var/list/damages = new/list()
|
||||
if(getToxLoss())
|
||||
damages+="tox"
|
||||
if(getOxyLoss())
|
||||
damages+="oxy"
|
||||
if(getCloneLoss())
|
||||
damages+="clone"
|
||||
if(getBruteLoss())
|
||||
damages+="brute"
|
||||
if(getFireLoss())
|
||||
damages+="burn"
|
||||
if(halloss != 0)
|
||||
damages+="hal"
|
||||
|
||||
if(damages.len)
|
||||
switch(pick(damages))
|
||||
if("tox")
|
||||
adjustToxLoss(-1)
|
||||
healed = 1
|
||||
if("oxy")
|
||||
adjustOxyLoss(-1)
|
||||
healed = 1
|
||||
if("clone")
|
||||
adjustCloneLoss(-1)
|
||||
healed = 1
|
||||
if("brute")
|
||||
heal_organ_damage(1,0)
|
||||
healed = 1
|
||||
if("burn")
|
||||
heal_organ_damage(0,1)
|
||||
healed = 1
|
||||
if("hal")
|
||||
if(halloss > 0)
|
||||
halloss -= 1
|
||||
if(halloss < 0)
|
||||
halloss = 0
|
||||
healed = 1
|
||||
else
|
||||
break
|
||||
|
||||
if(healed)
|
||||
if(prob(5))
|
||||
src << "\blue You feel your wounds mending..."
|
||||
|
||||
if(!(/mob/living/carbon/human/proc/morph in src.verbs))
|
||||
if(mMorph in mutations)
|
||||
src.verbs += /mob/living/carbon/human/proc/morph
|
||||
else
|
||||
if(!(mMorph in mutations))
|
||||
src.verbs -= /mob/living/carbon/human/proc/morph
|
||||
|
||||
if(!(/mob/living/carbon/human/proc/remoteobserve in src.verbs))
|
||||
if(mRemote in mutations)
|
||||
src.verbs += /mob/living/carbon/human/proc/remoteobserve
|
||||
else
|
||||
if(!(mRemote in mutations))
|
||||
src.verbs -= /mob/living/carbon/human/proc/remoteobserve
|
||||
|
||||
if(!(/mob/living/carbon/human/proc/remotesay in src.verbs))
|
||||
if(mRemotetalk in mutations)
|
||||
src.verbs += /mob/living/carbon/human/proc/remotesay
|
||||
else
|
||||
if(!(mRemotetalk in mutations))
|
||||
src.verbs -= /mob/living/carbon/human/proc/remotesay
|
||||
|
||||
if ((HULK in mutations) && health <= 25)
|
||||
mutations.Remove(HULK)
|
||||
update_mutations() //update our mutation overlays
|
||||
@@ -606,7 +518,8 @@ var/const/BLOOD_VOLUME_SURVIVE = 122
|
||||
|
||||
|
||||
proc/handle_breath(datum/gas_mixture/breath)
|
||||
if((status_flags & GODMODE) || REBREATHER in augmentations) return
|
||||
if(status_flags & GODMODE)
|
||||
return
|
||||
|
||||
if(!breath || (breath.total_moles() == 0) || suiciding)
|
||||
if(reagents.has_reagent("inaprovaline"))
|
||||
@@ -687,8 +600,10 @@ var/const/BLOOD_VOLUME_SURVIVE = 122
|
||||
co2overloadtime = 0
|
||||
|
||||
if(Toxins_pp > safe_toxins_max) // Too much toxins
|
||||
var/ratio = breath.toxins/safe_toxins_max
|
||||
adjustToxLoss(min(ratio, MIN_PLASMA_DAMAGE)) //Limit amount of damage toxin exposure can do per second
|
||||
var/ratio = (breath.toxins/safe_toxins_max) * 10
|
||||
//adjustToxLoss(Clamp(ratio, MIN_PLASMA_DAMAGE, MAX_PLASMA_DAMAGE)) //Limit amount of damage toxin exposure can do per second
|
||||
if(reagents)
|
||||
reagents.add_reagent("plasma", Clamp(ratio, MIN_PLASMA_DAMAGE, MAX_PLASMA_DAMAGE))
|
||||
toxins_alert = max(toxins_alert, 1)
|
||||
else
|
||||
toxins_alert = 0
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/mob/living/carbon/human/say(var/message)
|
||||
|
||||
if (silent)
|
||||
if(silent)
|
||||
return
|
||||
|
||||
//Mimes dont speak! Changeling hivemind and emotes are allowed.
|
||||
@@ -18,11 +18,12 @@
|
||||
if (copytext(message, 1, 2) != "*")
|
||||
return
|
||||
|
||||
if(src.dna)
|
||||
/*if(src.dna.mutantrace == "lizard") //Soghun stutterss-s-ss-sss.
|
||||
/*if(dna)
|
||||
if(dna.mutantrace == "lizard")
|
||||
if(copytext(message, 1, 2) != "*")
|
||||
message = replacetext(message, "s", stutter("ss"))*/
|
||||
if(src.dna.mutantrace == "slime" && prob(5))
|
||||
message = replacetext(message, "s", stutter("ss"))
|
||||
|
||||
if(dna.mutantrace == "slime" && prob(5))
|
||||
if(copytext(message, 1, 2) != "*")
|
||||
if(copytext(message, 1, 2) == ";")
|
||||
message = ";"
|
||||
@@ -31,7 +32,7 @@
|
||||
message += "SKR"
|
||||
var/imax = rand(5,20)
|
||||
for(var/i = 0,i<imax,i++)
|
||||
message += "E"
|
||||
message += "E"*/
|
||||
|
||||
if(stat != DEAD)
|
||||
for(var/datum/disease/pierrot_throat/D in viruses)
|
||||
@@ -47,79 +48,58 @@
|
||||
pick_list -= H //Make sure that you dont HONK the same word twice
|
||||
message = dd_list2text(temp_message, " ")
|
||||
|
||||
if(istype(src.wear_mask, /obj/item/clothing/mask/luchador))
|
||||
if(copytext(message, 1, 2) != "*")
|
||||
message = replacetext(message, "captain", "CAPITÁN")
|
||||
message = replacetext(message, "station", "ESTACIÓN")
|
||||
message = replacetext(message, "sir", "SEÑOR")
|
||||
message = replacetext(message, "the ", "el ")
|
||||
message = replacetext(message, "my ", "mi ")
|
||||
message = replacetext(message, "is ", "es ")
|
||||
message = replacetext(message, "it's", "es")
|
||||
message = replacetext(message, "friend", "amigo")
|
||||
message = replacetext(message, "buddy", "amigo")
|
||||
message = replacetext(message, "hello", "hola")
|
||||
message = replacetext(message, " hot", " caliente")
|
||||
message = replacetext(message, " very ", " muy ")
|
||||
message = replacetext(message, "sword", "espada")
|
||||
message = replacetext(message, "library", "biblioteca")
|
||||
message = replacetext(message, "traitor", "traidor")
|
||||
message = replacetext(message, "wizard", "mago")
|
||||
message = uppertext(message) //Things end up looking better this way (no mixed cases), and it fits the macho wrestler image.
|
||||
if(prob(25))
|
||||
message += " OLE!"
|
||||
if(wear_mask)
|
||||
if(istype(wear_mask, /obj/item/clothing/mask/gas/voice/space_ninja) && wear_mask:voice == "Unknown")
|
||||
if(copytext(message, 1, 2) != "*")
|
||||
var/list/temp_message = text2list(message, " ")
|
||||
var/list/pick_list = list()
|
||||
for(var/i = 1, i <= temp_message.len, i++)
|
||||
pick_list += i
|
||||
for(var/i=1, i <= abs(temp_message.len/3), i++)
|
||||
var/H = pick(pick_list)
|
||||
if(findtext(temp_message[H], "*") || findtext(temp_message[H], ";") || findtext(temp_message[H], ":")) continue
|
||||
temp_message[H] = ninjaspeak(temp_message[H])
|
||||
pick_list -= H
|
||||
message = dd_list2text(temp_message, " ")
|
||||
message = replacetext(message, "o", "¤")
|
||||
message = replacetext(message, "p", "þ")
|
||||
message = replacetext(message, "l", "£")
|
||||
message = replacetext(message, "s", "§")
|
||||
message = replacetext(message, "u", "µ")
|
||||
message = replacetext(message, "b", "ß")
|
||||
|
||||
else if(istype(wear_mask, /obj/item/clothing/mask/luchador))
|
||||
if(copytext(message, 1, 2) != "*")
|
||||
message = replacetext(message, "captain", "CAPITÁN")
|
||||
message = replacetext(message, "station", "ESTACIÓN")
|
||||
message = replacetext(message, "sir", "SEÑOR")
|
||||
message = replacetext(message, "the ", "el ")
|
||||
message = replacetext(message, "my ", "mi ")
|
||||
message = replacetext(message, "is ", "es ")
|
||||
message = replacetext(message, "it's", "es")
|
||||
message = replacetext(message, "friend", "amigo")
|
||||
message = replacetext(message, "buddy", "amigo")
|
||||
message = replacetext(message, "hello", "hola")
|
||||
message = replacetext(message, " hot", " caliente")
|
||||
message = replacetext(message, " very ", " muy ")
|
||||
message = replacetext(message, "sword", "espada")
|
||||
message = replacetext(message, "library", "biblioteca")
|
||||
message = replacetext(message, "traitor", "traidor")
|
||||
message = replacetext(message, "wizard", "mago")
|
||||
message = uppertext(message) //Things end up looking better this way (no mixed cases), and it fits the macho wrestler image.
|
||||
if(prob(25))
|
||||
message += " OLE!"
|
||||
|
||||
else if(istype(wear_mask, /obj/item/clothing/mask/horsehead))
|
||||
var/obj/item/clothing/mask/horsehead/hoers = wear_mask
|
||||
if(hoers.voicechange)
|
||||
if(!(copytext(message, 1, 2) == "*" || (mind && mind.changeling && (copytext(message, 1, 3) == ":g" || copytext(message, 1, 3) == ":G" || copytext(message, 1, 3) == ":ï"))))
|
||||
message = pick("NEEIIGGGHHHH!", "NEEEIIIIGHH!", "NEIIIGGHH!", "HAAWWWWW!", "HAAAWWW!")
|
||||
|
||||
if ((HULK in mutations) && health >= 25 && length(message))
|
||||
if(copytext(message, 1, 2) != "*")
|
||||
message = "[uppertext(message)]!!" //because I don't know how to code properly in getting vars from other files -Bro
|
||||
|
||||
//Ninja mask obscures text and voice if set to do so.
|
||||
//Would make it more global but it's sort of ninja specific.
|
||||
if(istype(src.wear_mask, /obj/item/clothing/mask/gas/voice/space_ninja)&&src.wear_mask:voice=="Unknown")
|
||||
if(copytext(message, 1, 2) != "*")
|
||||
var/list/temp_message = text2list(message, " ")
|
||||
var/list/pick_list = list()
|
||||
for(var/i = 1, i <= temp_message.len, i++)
|
||||
pick_list += i
|
||||
for(var/i=1, i <= abs(temp_message.len/3), i++)
|
||||
var/H = pick(pick_list)
|
||||
if(findtext(temp_message[H], "*") || findtext(temp_message[H], ";") || findtext(temp_message[H], ":")) continue
|
||||
temp_message[H] = ninjaspeak(temp_message[H])
|
||||
pick_list -= H
|
||||
message = dd_list2text(temp_message, " ")
|
||||
message = replacetext(message, "o", "¤")
|
||||
message = replacetext(message, "p", "þ")
|
||||
message = replacetext(message, "l", "£")
|
||||
message = replacetext(message, "s", "§")
|
||||
message = replacetext(message, "u", "µ")
|
||||
message = replacetext(message, "b", "ß")
|
||||
/*This text is hilarious but also absolutely retarded.
|
||||
message = replacetext(message, "l", "r")
|
||||
message = replacetext(message, "rr", "ru")
|
||||
message = replacetext(message, "v", "b")
|
||||
message = replacetext(message, "f", "hu")
|
||||
message = replacetext(message, "'t", "")
|
||||
message = replacetext(message, "t ", "to ")
|
||||
message = replacetext(message, " I ", " ai ")
|
||||
message = replacetext(message, "th", "z")
|
||||
message = replacetext(message, "ish", "isu")
|
||||
message = replacetext(message, "is", "izu")
|
||||
message = replacetext(message, "ziz", "zis")
|
||||
message = replacetext(message, "se", "su")
|
||||
message = replacetext(message, "br", "bur")
|
||||
message = replacetext(message, "ry", "ri")
|
||||
message = replacetext(message, "you", "yuu")
|
||||
message = replacetext(message, "ck", "cku")
|
||||
message = replacetext(message, "eu", "uu")
|
||||
message = replacetext(message, "ow", "au")
|
||||
message = replacetext(message, "are", "aa")
|
||||
message = replacetext(message, "ay", "ayu")
|
||||
message = replacetext(message, "ea", "ii")
|
||||
message = replacetext(message, "ch", "chi")
|
||||
message = replacetext(message, "than", "sen")
|
||||
message = replacetext(message, ".", "")
|
||||
message = lowertext(message)
|
||||
*/
|
||||
if (src.slurring)
|
||||
message = slur(message)
|
||||
..(message)
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
//Lallander was here
|
||||
/mob/living/carbon/human/whisper(message as text)
|
||||
if(say_disabled) //This is here to try to identify lag problems
|
||||
usr << "\red Speech is currently admin-disabled."
|
||||
return
|
||||
|
||||
message = trim(copytext(strip_html_simple(message), 1, MAX_MESSAGE_LEN))
|
||||
|
||||
if (!message || silent || miming)
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
..()
|
||||
|
||||
/mob/living/carbon/slime/adult/New()
|
||||
verbs.Remove(/mob/living/carbon/slime/verb/ventcrawl)
|
||||
//verbs.Remove(/mob/living/carbon/slime/verb/ventcrawl)
|
||||
..()
|
||||
|
||||
/mob/living/carbon/slime/movement_delay()
|
||||
@@ -298,7 +298,7 @@
|
||||
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red <B>The [M.name] has bit []!</B>", src), 1)
|
||||
O.show_message(text("\red <B>The [M.name] has glomped []!</B>", src), 1)
|
||||
|
||||
var/damage = rand(1, 3)
|
||||
attacked += 5
|
||||
@@ -472,21 +472,12 @@
|
||||
O.show_message(text("\red [] has grabbed [] passively!", M, src), 1)
|
||||
|
||||
else
|
||||
if(ELECTRICHANDS in M.augmentations)
|
||||
var/gendertxt = "their"
|
||||
if(M.gender == MALE)
|
||||
gendertxt = "his"
|
||||
if(M.gender == FEMALE)
|
||||
gendertxt = "her"
|
||||
|
||||
visible_message("\red <B>[M] has shocked [src] with [gendertxt] bare hands!</B>")
|
||||
return
|
||||
|
||||
var/damage = rand(1, 9)
|
||||
|
||||
attacked += 10
|
||||
if (prob(90))
|
||||
if ((HULK in M.mutations) || (SUPRSTR in M.augmentations))
|
||||
if (HULK in M.mutations)
|
||||
damage += 5
|
||||
if(Victim)
|
||||
Victim = null
|
||||
@@ -922,13 +913,13 @@ mob/living/carbon/slime/var/temperature_resistance = T0C+75
|
||||
w_class = 4//bulky item
|
||||
gas_transfer_coefficient = 0.90
|
||||
permeability_coefficient = 0.50
|
||||
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS
|
||||
slowdown = 3.0
|
||||
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS|HEAD
|
||||
slowdown = 1.0
|
||||
flags_inv = HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT
|
||||
flags = FPRINT | TABLEPASS | ONESIZEFITSALL | STOPSPRESSUREDMAGE
|
||||
heat_protection = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS
|
||||
heat_protection = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS | HEAD
|
||||
max_heat_protection_temperature = FIRESUIT_MAX_HEAT_PROTECITON_TEMPERATURE
|
||||
cold_protection = UPPER_TORSO | LOWER_TORSO | LEGS | FEET | ARMS | HANDS
|
||||
cold_protection = UPPER_TORSO | LOWER_TORSO | LEGS | FEET | ARMS | HANDS | HEAD
|
||||
min_cold_protection_temperature = SPACE_SUIT_MIN_COLD_PROTECITON_TEMPERATURE
|
||||
canremove = 0
|
||||
armor = list(melee = 80, bullet = 20, laser = 20, energy = 10, bomb = 0, bio = 0, rad = 0)
|
||||
@@ -952,6 +943,16 @@ mob/living/carbon/slime/var/temperature_resistance = T0C+75
|
||||
siemens_coefficient = 0
|
||||
unacidable = 1
|
||||
|
||||
/obj/item/clothing/mask/gas/golem
|
||||
name = "golem's face"
|
||||
desc = "the imposing face of an adamantine golem"
|
||||
icon_state = "golem"
|
||||
item_state = "golem"
|
||||
canremove = 0
|
||||
siemens_coefficient = 0
|
||||
unacidable = 1
|
||||
|
||||
|
||||
/obj/item/clothing/gloves/golem
|
||||
name = "golem's hands"
|
||||
desc = "strong adamantine hands"
|
||||
@@ -961,8 +962,75 @@ mob/living/carbon/slime/var/temperature_resistance = T0C+75
|
||||
canremove = 0
|
||||
|
||||
|
||||
/obj/item/clothing/head/space/golem
|
||||
icon_state = "golem"
|
||||
item_state = "dermal"
|
||||
color = "dermal"
|
||||
name = "golem's head"
|
||||
desc = "a golem's head"
|
||||
canremove = 0
|
||||
unacidable = 1
|
||||
flags = FPRINT | TABLEPASS | STOPSPRESSUREDMAGE
|
||||
heat_protection = HEAD
|
||||
max_heat_protection_temperature = FIRE_HELMET_MAX_HEAT_PROTECITON_TEMPERATURE
|
||||
armor = list(melee = 80, bullet = 20, laser = 20, energy = 10, bomb = 0, bio = 0, rad = 0)
|
||||
|
||||
/obj/effect/golemrune
|
||||
anchored = 1
|
||||
desc = "a strange rune used to create golems. It glows when spirits are nearby."
|
||||
name = "rune"
|
||||
icon = 'icons/obj/rune.dmi'
|
||||
icon_state = "golem"
|
||||
unacidable = 1
|
||||
layer = TURF_LAYER
|
||||
|
||||
New()
|
||||
..()
|
||||
processing_objects.Add(src)
|
||||
|
||||
process()
|
||||
var/mob/dead/observer/ghost
|
||||
for(var/mob/dead/observer/O in src.loc)
|
||||
if(!O.client) continue
|
||||
if(O.mind && O.mind.current && O.mind.current.stat != DEAD) continue
|
||||
ghost = O
|
||||
break
|
||||
if(ghost)
|
||||
icon_state = "golem2"
|
||||
else
|
||||
icon_state = "golem"
|
||||
|
||||
attack_hand(mob/living/user as mob)
|
||||
var/mob/dead/observer/ghost
|
||||
for(var/mob/dead/observer/O in src.loc)
|
||||
if(!O.client) continue
|
||||
if(O.mind && O.mind.current && O.mind.current.stat != DEAD) continue
|
||||
ghost = O
|
||||
break
|
||||
if(!ghost)
|
||||
user << "The rune fizzles uselessly. There is no spirit nearby."
|
||||
return
|
||||
var/mob/living/carbon/human/G = new /mob/living/carbon/human
|
||||
G.dna.mutantrace = "adamantine"
|
||||
G.real_name = text("Adamantine Golem ([rand(1, 1000)])")
|
||||
G.equip_to_slot_or_del(new /obj/item/clothing/under/golem(G), slot_w_uniform)
|
||||
G.equip_to_slot_or_del(new /obj/item/clothing/suit/golem(G), slot_wear_suit)
|
||||
G.equip_to_slot_or_del(new /obj/item/clothing/shoes/golem(G), slot_shoes)
|
||||
G.equip_to_slot_or_del(new /obj/item/clothing/mask/gas/golem(G), slot_wear_mask)
|
||||
G.equip_to_slot_or_del(new /obj/item/clothing/gloves/golem(G), slot_gloves)
|
||||
//G.equip_to_slot_or_del(new /obj/item/clothing/head/space/golem(G), slot_head)
|
||||
G.loc = src.loc
|
||||
G.key = ghost.key
|
||||
G << "You are an adamantine golem. You move slowly, but are highly resistant to heat and cold as well as blunt trauma. You are unable to wear clothes, but can still use most tools. Serve [user], and assist them in completing their goals at any cost."
|
||||
del (src)
|
||||
|
||||
|
||||
proc/announce_to_ghosts()
|
||||
for(var/mob/dead/observer/G in player_list)
|
||||
if(G.client)
|
||||
var/area/A = get_area(src)
|
||||
if(A)
|
||||
G << "Golem rune created in [A.name]."
|
||||
//////////////////////////////Old shit from metroids/RoRos, and the old cores, would not take much work to re-add them////////////////////////
|
||||
|
||||
/*
|
||||
|
||||
@@ -180,7 +180,7 @@
|
||||
new_slime.powerlevel = max(0, powerlevel-1)
|
||||
new_slime.a_intent = "hurt"
|
||||
new_slime.key = key
|
||||
|
||||
new_slime.universal_speak = universal_speak
|
||||
new_slime << "<B>You are now an adult slime.</B>"
|
||||
del(src)
|
||||
else
|
||||
@@ -243,6 +243,7 @@
|
||||
|
||||
var/mob/living/carbon/slime/new_slime = pick(babies)
|
||||
new_slime.a_intent = "hurt"
|
||||
new_slime.universal_speak = universal_speak
|
||||
new_slime.key = key
|
||||
|
||||
new_slime << "<B>You are now a slime!</B>"
|
||||
|
||||
@@ -287,8 +287,10 @@
|
||||
co2overloadtime = 0
|
||||
|
||||
if(Toxins_pp > safe_toxins_max) // Too much toxins
|
||||
var/ratio = breath.toxins/safe_toxins_max
|
||||
adjustToxLoss(min(ratio, MIN_PLASMA_DAMAGE)) //Limit amount of damage toxin exposure can do per second
|
||||
var/ratio = (breath.toxins/safe_toxins_max) * 10
|
||||
//adjustToxLoss(Clamp(ratio, MIN_PLASMA_DAMAGE, MAX_PLASMA_DAMAGE)) //Limit amount of damage toxin exposure can do per second
|
||||
if(reagents)
|
||||
reagents.add_reagent("plasma", Clamp(ratio, MIN_PLASMA_DAMAGE, MAX_PLASMA_DAMAGE))
|
||||
toxins_alert = max(toxins_alert, 1)
|
||||
else
|
||||
toxins_alert = 0
|
||||
|
||||
@@ -348,7 +348,7 @@
|
||||
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red <B>The [M.name] has [pick("bit","slashed")] []!</B>", src), 1)
|
||||
O.show_message(text("\red <B>The [M.name] glomps []!</B>", src), 1)
|
||||
|
||||
var/damage = rand(1, 3)
|
||||
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
adjustCloneLoss(damage/(blocked+1))
|
||||
if(HALLOSS)
|
||||
adjustHalLoss(damage/(blocked+1))
|
||||
UpdateDamageIcon()
|
||||
updatehealth()
|
||||
return 1
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ var/list/ai_list = list()
|
||||
anchored = 1 // -- TLE
|
||||
density = 1
|
||||
status_flags = CANSTUN|CANPARALYSE
|
||||
var/network = "SS13"
|
||||
var/list/network = list("SS13")
|
||||
var/obj/machinery/camera/current = null
|
||||
var/list/connected_robots = list()
|
||||
var/aiRestorePowerRoutine = 0
|
||||
@@ -580,15 +580,12 @@ var/list/ai_list = list()
|
||||
for (var/obj/machinery/camera/C in cameranet.cameras)
|
||||
if(!C.can_use())
|
||||
continue
|
||||
if(C.network == "AI Satellite")
|
||||
if (ticker.mode.name == "AI malfunction")
|
||||
var/datum/game_mode/malfunction/malf = ticker.mode
|
||||
for (var/datum/mind/M in malf.malf_ai)
|
||||
if (mind == M)
|
||||
cameralist[C.network] = C.network
|
||||
else
|
||||
if(C.network != "CREED" && C.network != "thunder" && C.network != "RD" && C.network != "toxins" && C.network != "Prison")
|
||||
cameralist[C.network] = C.network
|
||||
|
||||
var/list/tempnetwork = C.network
|
||||
tempnetwork.Remove("CREED", "thunder", "RD", "toxins", "Prison")
|
||||
if(tempnetwork.len)
|
||||
for(var/i in C.network)
|
||||
cameralist[i] = i
|
||||
var/old_network = network
|
||||
network = input(U, "Which network would you like to view?") as null|anything in cameralist
|
||||
|
||||
@@ -602,7 +599,7 @@ var/list/ai_list = list()
|
||||
for(var/obj/machinery/camera/C in cameranet.cameras)
|
||||
if(!C.can_use())
|
||||
continue
|
||||
if(C.network == network)
|
||||
if(network in C.network)
|
||||
U.eyeobj.setLoc(get_turf(C))
|
||||
break
|
||||
src << "\blue Switched to [network] camera network."
|
||||
|
||||
@@ -219,7 +219,7 @@
|
||||
src.unset_machine()
|
||||
src.reset_view(null)
|
||||
return 0
|
||||
if (stat == 2 || !C.status || C.network != src.network) return 0
|
||||
if (stat == 2 || !C.status || !(src.network in C.network)) return 0
|
||||
|
||||
// ok, we're alive, camera is good and in our network...
|
||||
|
||||
@@ -254,7 +254,7 @@
|
||||
if(!C.status)
|
||||
continue
|
||||
else
|
||||
if(C.network != "CREED" && C.network != "thunder" && C.network != "RD" && C.network != "toxins" && C.network != "Prison")
|
||||
if(C.network != "CREED" && C.network != "thunder" && C.network != "RD" && C.network != "toxins" && C.network != "Prison") COMPILE ERROR! This will have to be updated as camera.network is no longer a string, but a list instead
|
||||
cameralist[C.network] = C.network
|
||||
|
||||
src.network = input(usr, "Which network would you like to view?") as null|anything in cameralist
|
||||
|
||||
@@ -94,7 +94,7 @@
|
||||
if(!scrambledcodes && !camera)
|
||||
camera = new /obj/machinery/camera(src)
|
||||
camera.c_tag = real_name
|
||||
camera.network = "SS13"
|
||||
camera.network = list("SS13")
|
||||
if(isWireCut(5)) // 5 = BORG CAMERA
|
||||
camera.status = 0
|
||||
..()
|
||||
@@ -652,7 +652,7 @@
|
||||
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red <B>The [M.name] has [pick("bit","slashed")] []!</B>", src), 1)
|
||||
O.show_message(text("\red <B>The [M.name] glomps []!</B>", src), 1)
|
||||
|
||||
var/damage = rand(1, 3)
|
||||
|
||||
@@ -782,7 +782,7 @@
|
||||
if(icon_state =="mopgearrex")
|
||||
overlays.Cut()
|
||||
overlays += "eyes-mopgearrex"
|
||||
if(icon_state =="Miner")
|
||||
if(icon_state =="Miner" || icon_state =="Miner+j")
|
||||
overlays.Cut()
|
||||
overlays += "eyes-Miner"
|
||||
else
|
||||
@@ -855,7 +855,8 @@
|
||||
|
||||
if (href_list["mod"])
|
||||
var/obj/item/O = locate(href_list["mod"])
|
||||
O.attack_self(src)
|
||||
if (O)
|
||||
O.attack_self(src)
|
||||
|
||||
if (href_list["act"])
|
||||
var/obj/item/O = locate(href_list["act"])
|
||||
|
||||
@@ -18,13 +18,17 @@
|
||||
return
|
||||
|
||||
if (length(message) >= 2)
|
||||
if ((copytext(message, 1, 3) == ":b") || (copytext(message, 1, 3) == ":B"))
|
||||
if ((copytext(message, 1, 3) == ":b") || (copytext(message, 1, 3) == ":B") || \
|
||||
(copytext(message, 1, 3) == "#b") || (copytext(message, 1, 3) == "#B") || \
|
||||
(copytext(message, 1, 3) == ".b") || (copytext(message, 1, 3) == ".B"))
|
||||
if(istype(src, /mob/living/silicon/pai))
|
||||
return ..(message)
|
||||
message = copytext(message, 3)
|
||||
message = trim(copytext(sanitize(message), 1, MAX_MESSAGE_LEN))
|
||||
robot_talk(message)
|
||||
else if (isAI(src) && ((copytext(message, 1, 3) == ":h") || (copytext(message, 1, 3) == ":H")))
|
||||
else if ((copytext(message, 1, 3) == ":h") || (copytext(message, 1, 3) == ":H") || \
|
||||
(copytext(message, 1, 3) == "#h") || (copytext(message, 1, 3) == "#H") || \
|
||||
(copytext(message, 1, 3) == ".h") || (copytext(message, 1, 3) == ".H"))
|
||||
if(isAI(src)&&client)//For patching directly into AI holopads.
|
||||
var/mob/living/silicon/ai/U = src
|
||||
message = copytext(message, 3)
|
||||
|
||||
@@ -1,209 +0,0 @@
|
||||
#define CLOWN_STANCE_IDLE 1
|
||||
#define CLOWN_STANCE_ATTACK 2
|
||||
#define CLOWN_STANCE_ATTACKING 3
|
||||
|
||||
/mob/living/simple_animal/clown
|
||||
name = "Clown"
|
||||
desc = "A denizen of clown planet"
|
||||
icon_state = "clown"
|
||||
icon_living = "clown"
|
||||
icon_dead = "clown_dead"
|
||||
icon_gib = "clown_gib"
|
||||
speak_chance = 0
|
||||
turns_per_move = 5
|
||||
response_help = "pokes the"
|
||||
response_disarm = "gently pushes aside the"
|
||||
response_harm = "hits the"
|
||||
speak = list("HONK", "Honk!", "Welcome to clown planet!")
|
||||
emote_see = list("honks")
|
||||
speak_chance = 1
|
||||
a_intent = "harm"
|
||||
stop_automated_movement_when_pulled = 0
|
||||
maxHealth = 75
|
||||
health = 75
|
||||
speed = -1
|
||||
harm_intent_damage = 8
|
||||
melee_damage_lower = 10
|
||||
melee_damage_upper = 10
|
||||
attacktext = "attacks"
|
||||
attack_sound = 'sound/items/bikehorn.ogg'
|
||||
|
||||
min_oxy = 5
|
||||
max_oxy = 0
|
||||
min_tox = 0
|
||||
max_tox = 1
|
||||
min_co2 = 0
|
||||
max_co2 = 5
|
||||
min_n2 = 0
|
||||
max_n2 = 0
|
||||
minbodytemp = 270
|
||||
maxbodytemp = 370
|
||||
heat_damage_per_tick = 15 //amount of damage applied if animal's body temperature is higher than maxbodytemp
|
||||
cold_damage_per_tick = 10 //same as heat_damage_per_tick, only if the bodytemperature it's lower than minbodytemp
|
||||
unsuitable_atoms_damage = 10
|
||||
|
||||
var/hostile = 0
|
||||
|
||||
var/stance = CLOWN_STANCE_IDLE //Used to determine behavior
|
||||
var/mob/living/target_mob
|
||||
|
||||
/mob/living/simple_animal/clown/Life()
|
||||
..()
|
||||
if(stat == 2)
|
||||
new /obj/effect/landmark/mobcorpse/clown (src.loc)
|
||||
del src
|
||||
return
|
||||
|
||||
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(CLOWN_STANCE_IDLE)
|
||||
if (src.hostile == 0) return
|
||||
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]")
|
||||
|
||||
if(CLOWN_STANCE_ATTACK) //This one should only be active for one tick
|
||||
stop_automated_movement = 1
|
||||
if(!target_mob || SA_attackable(target_mob))
|
||||
stance = CLOWN_STANCE_IDLE
|
||||
if(target_mob in view(7,src))
|
||||
walk_to(src, target_mob, 1, 3)
|
||||
stance = CLOWN_STANCE_ATTACKING
|
||||
|
||||
if(CLOWN_STANCE_ATTACKING)
|
||||
stop_automated_movement = 1
|
||||
if(!target_mob || SA_attackable(target_mob))
|
||||
stance = CLOWN_STANCE_IDLE
|
||||
target_mob = null
|
||||
return
|
||||
if(!(target_mob in view(7,src)))
|
||||
stance = CLOWN_STANCE_IDLE
|
||||
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] slips \the [L]!</span>")
|
||||
for(var/mob/H in viewers(src, null))
|
||||
if(istype(H, /mob/living/simple_animal/clown))
|
||||
var/mob/living/simple_animal/clown/C = H
|
||||
C.hostile = 1
|
||||
if(istype(target_mob,/obj/mecha))
|
||||
var/obj/mecha/M = target_mob
|
||||
M.attack_animal(src)
|
||||
for(var/mob/H in viewers(src, null))
|
||||
if(istype(H, /mob/living/simple_animal/clown))
|
||||
var/mob/living/simple_animal/clown/C = H
|
||||
C.hostile = 1
|
||||
|
||||
/mob/living/simple_animal/clown/bullet_act(var/obj/item/projectile/Proj)
|
||||
..()
|
||||
hostile = 1
|
||||
for(var/mob/M in viewers(src, null))
|
||||
if(istype(M, /mob/living/simple_animal/clown))
|
||||
var/mob/living/simple_animal/clown/C = M
|
||||
C.hostile = 1
|
||||
return 0
|
||||
|
||||
|
||||
/mob/living/simple_animal/clown/attackby(var/obj/item/O as obj, var/mob/user as mob)
|
||||
..()
|
||||
hostile = 1
|
||||
for(var/mob/Z in viewers(src, null))
|
||||
if(istype(Z, /mob/living/simple_animal/clown))
|
||||
var/mob/living/simple_animal/clown/C = Z
|
||||
C.hostile = 1
|
||||
return 0
|
||||
|
||||
/mob/living/simple_animal/clown/attack_alien(mob/living/carbon/alien/humanoid/M as mob)
|
||||
..()
|
||||
hostile = 1
|
||||
for(var/mob/Z in viewers(src, null))
|
||||
if(istype(Z, /mob/living/simple_animal/clown))
|
||||
var/mob/living/simple_animal/clown/C = Z
|
||||
C.hostile = 1
|
||||
return 0
|
||||
|
||||
/mob/living/simple_animal/clown/attack_hand(mob/living/carbon/human/M as mob)
|
||||
..()
|
||||
hostile = 1
|
||||
for(var/mob/Z in viewers(src, null))
|
||||
if(istype(Z, /mob/living/simple_animal/clown))
|
||||
var/mob/living/simple_animal/clown/C = Z
|
||||
C.hostile = 1
|
||||
return 0
|
||||
|
||||
/mob/living/simple_animal/clown/attack_animal(mob/living/simple_animal/M as mob)
|
||||
..()
|
||||
hostile = 1
|
||||
for(var/mob/Z in viewers(src, null))
|
||||
if(istype(Z, /mob/living/simple_animal/clown))
|
||||
var/mob/living/simple_animal/clown/C = Z
|
||||
C.hostile = 1
|
||||
return 0
|
||||
|
||||
/mob/living/simple_animal/clown/Bump(atom/movable/AM as mob|obj, yes)
|
||||
|
||||
spawn( 0 )
|
||||
if ((!( yes ) || now_pushing))
|
||||
return
|
||||
now_pushing = 1
|
||||
if(ismob(AM))
|
||||
var/mob/tmob = AM
|
||||
if(istype(tmob, /mob/living/carbon/human) && (FAT in tmob.mutations))
|
||||
if(prob(50))
|
||||
src << "\red <B>You fail to push [tmob]'s fat ass out of the way.</B>"
|
||||
now_pushing = 0
|
||||
return
|
||||
if(!(tmob.status_flags & CANPUSH))
|
||||
now_pushing = 0
|
||||
return
|
||||
|
||||
tmob.LAssailant = src
|
||||
now_pushing = 0
|
||||
..()
|
||||
if (!( istype(AM, /atom/movable) ))
|
||||
return
|
||||
if (!( now_pushing ))
|
||||
now_pushing = 1
|
||||
if (!( AM.anchored ))
|
||||
var/t = get_dir(src, AM)
|
||||
if (istype(AM, /obj/structure/window))
|
||||
if(AM:ini_dir == NORTHWEST || AM:ini_dir == NORTHEAST || AM:ini_dir == SOUTHWEST || AM:ini_dir == SOUTHEAST)
|
||||
for(var/obj/structure/window/win in get_step(AM,t))
|
||||
now_pushing = 0
|
||||
return
|
||||
step(AM, t)
|
||||
now_pushing = null
|
||||
return
|
||||
return
|
||||
@@ -0,0 +1,263 @@
|
||||
//goat
|
||||
/mob/living/simple_animal/hostile/retaliate/goat
|
||||
name = "goat"
|
||||
desc = "Not known for their pleasant disposition."
|
||||
icon_state = "goat"
|
||||
icon_living = "goat"
|
||||
icon_dead = "goat_dead"
|
||||
speak = list("EHEHEHEHEH","eh?")
|
||||
speak_emote = list("brays")
|
||||
emote_hear = list("brays")
|
||||
emote_see = list("shakes its head", "stamps a foot", "glares around")
|
||||
speak_chance = 1
|
||||
turns_per_move = 5
|
||||
see_in_dark = 6
|
||||
meat_type = /obj/item/weapon/reagent_containers/food/snacks/meat
|
||||
meat_amount = 4
|
||||
response_help = "pets the"
|
||||
response_disarm = "gently pushes aside the"
|
||||
response_harm = "kicks the"
|
||||
faction = "goat"
|
||||
attacktext = "kicks"
|
||||
health = 40
|
||||
melee_damage_lower = 1
|
||||
melee_damage_upper = 5
|
||||
var/datum/reagents/udder = null
|
||||
|
||||
/mob/living/simple_animal/hostile/retaliate/goat/New()
|
||||
udder = new(50)
|
||||
udder.my_atom = src
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/hostile/retaliate/goat/Life()
|
||||
. = ..()
|
||||
if(.)
|
||||
//chance to go crazy and start wacking stuff
|
||||
if(!enemies.len && prob(1))
|
||||
Retaliate()
|
||||
|
||||
if(enemies.len && prob(10))
|
||||
enemies = list()
|
||||
LoseTarget()
|
||||
src.visible_message("\blue [src] calms down.")
|
||||
|
||||
if(stat == CONSCIOUS)
|
||||
if(udder && prob(5))
|
||||
udder.add_reagent("milk", rand(5, 10))
|
||||
|
||||
if(locate(/obj/effect/spacevine) in loc)
|
||||
var/obj/effect/spacevine/SV = locate(/obj/effect/spacevine) in loc
|
||||
del(SV)
|
||||
if(prob(10))
|
||||
say("Nom")
|
||||
|
||||
if(!pulledby)
|
||||
for(var/direction in shuffle(list(1,2,4,8,5,6,9,10)))
|
||||
var/step = get_step(src, direction)
|
||||
if(step)
|
||||
if(locate(/obj/effect/spacevine) in step)
|
||||
Move(step)
|
||||
|
||||
/mob/living/simple_animal/hostile/retaliate/goat/Retaliate()
|
||||
..()
|
||||
src.visible_message("\red [src] gets an evil-looking gleam in their eye.")
|
||||
|
||||
/mob/living/simple_animal/hostile/retaliate/goat/Move()
|
||||
..()
|
||||
if(!stat)
|
||||
if(locate(/obj/effect/spacevine) in loc)
|
||||
var/obj/effect/spacevine/SV = locate(/obj/effect/spacevine) in loc
|
||||
del(SV)
|
||||
if(prob(10))
|
||||
say("Nom")
|
||||
|
||||
/mob/living/simple_animal/hostile/retaliate/goat/attackby(var/obj/item/O as obj, var/mob/user as mob)
|
||||
if(stat == CONSCIOUS && istype(O, /obj/item/weapon/reagent_containers/glass))
|
||||
user.visible_message("<span class='notice'>[user] milks [src] using \the [O].</span>")
|
||||
var/obj/item/weapon/reagent_containers/glass/G = O
|
||||
var/transfered = udder.trans_id_to(G, "milk", rand(5,10))
|
||||
if(G.reagents.total_volume >= G.volume)
|
||||
user << "\red The [O] is full."
|
||||
if(!transfered)
|
||||
user << "\red The udder is dry. Wait a bit longer..."
|
||||
else
|
||||
..()
|
||||
//cow
|
||||
/mob/living/simple_animal/cow
|
||||
name = "cow"
|
||||
desc = "Known for their milk, just don't tip them over."
|
||||
icon_state = "cow"
|
||||
icon_living = "cow"
|
||||
icon_dead = "cow_dead"
|
||||
icon_gib = "cow_gib"
|
||||
speak = list("moo?","moo","MOOOOOO")
|
||||
speak_emote = list("moos","moos hauntingly")
|
||||
emote_hear = list("brays")
|
||||
emote_see = list("shakes its head")
|
||||
speak_chance = 1
|
||||
turns_per_move = 5
|
||||
see_in_dark = 6
|
||||
meat_type = /obj/item/weapon/reagent_containers/food/snacks/meat
|
||||
meat_amount = 6
|
||||
response_help = "pets the"
|
||||
response_disarm = "gently pushes aside the"
|
||||
response_harm = "kicks the"
|
||||
attacktext = "kicks"
|
||||
health = 50
|
||||
var/datum/reagents/udder = null
|
||||
|
||||
/mob/living/simple_animal/cow/New()
|
||||
udder = new(50)
|
||||
udder.my_atom = src
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/cow/attackby(var/obj/item/O as obj, var/mob/user as mob)
|
||||
if(stat == CONSCIOUS && istype(O, /obj/item/weapon/reagent_containers/glass))
|
||||
user.visible_message("<span class='notice'>[user] milks [src] using \the [O].</span>")
|
||||
var/obj/item/weapon/reagent_containers/glass/G = O
|
||||
var/transfered = udder.trans_id_to(G, "milk", rand(5,10))
|
||||
if(G.reagents.total_volume >= G.volume)
|
||||
user << "\red The [O] is full."
|
||||
if(!transfered)
|
||||
user << "\red The udder is dry. Wait a bit longer..."
|
||||
else
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/cow/Life()
|
||||
. = ..()
|
||||
if(stat == CONSCIOUS)
|
||||
if(udder && prob(5))
|
||||
udder.add_reagent("milk", rand(5, 10))
|
||||
|
||||
/mob/living/simple_animal/cow/attack_hand(mob/living/carbon/M as mob)
|
||||
if(!stat && M.a_intent == "disarm" && icon_state != icon_dead)
|
||||
M.visible_message("<span class='warning'>[M] tips over [src].</span>","<span class='notice'>You tip over [src].</span>")
|
||||
Weaken(30)
|
||||
icon_state = icon_dead
|
||||
spawn(rand(20,50))
|
||||
if(!stat && M)
|
||||
icon_state = icon_living
|
||||
var/list/responses = list( "[src] looks at you imploringly.",
|
||||
"[src] looks at you pleadingly",
|
||||
"[src] looks at you with a resigned expression.",
|
||||
"[src] seems resigned to it's fate.")
|
||||
M << pick(responses)
|
||||
else
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/chick
|
||||
name = "\improper chick"
|
||||
desc = "Adorable! They make such a racket though."
|
||||
icon_state = "chick"
|
||||
icon_living = "chick"
|
||||
icon_dead = "chick_dead"
|
||||
icon_gib = "chick_gib"
|
||||
speak = list("Cherp.","Cherp?","Chirrup.","Cheep!")
|
||||
speak_emote = list("cheeps")
|
||||
emote_hear = list("cheeps")
|
||||
emote_see = list("pecks at the ground","flaps its tiny wings")
|
||||
speak_chance = 2
|
||||
turns_per_move = 2
|
||||
meat_type = /obj/item/weapon/reagent_containers/food/snacks/meat
|
||||
meat_amount = 1
|
||||
response_help = "pets the"
|
||||
response_disarm = "gently pushes aside the"
|
||||
response_harm = "kicks the"
|
||||
attacktext = "kicks"
|
||||
health = 1
|
||||
var/amount_grown = 0
|
||||
pass_flags = PASSTABLE | PASSGRILLE
|
||||
|
||||
/mob/living/simple_animal/chick/New()
|
||||
..()
|
||||
pixel_x = rand(-6, 6)
|
||||
pixel_y = rand(0, 10)
|
||||
|
||||
/mob/living/simple_animal/chick/Life()
|
||||
. =..()
|
||||
if(!.)
|
||||
return
|
||||
if(!stat)
|
||||
amount_grown += rand(1,2)
|
||||
if(amount_grown >= 100)
|
||||
new /mob/living/simple_animal/chicken(src.loc)
|
||||
del(src)
|
||||
|
||||
var/const/MAX_CHICKENS = 50
|
||||
var/global/chicken_count = 0
|
||||
|
||||
/mob/living/simple_animal/chicken
|
||||
name = "\improper chicken"
|
||||
desc = "Hopefully the eggs are good this season."
|
||||
icon_state = "chicken"
|
||||
icon_living = "chicken"
|
||||
icon_dead = "chicken_dead"
|
||||
speak = list("Cluck!","BWAAAAARK BWAK BWAK BWAK!","Bwaak bwak.")
|
||||
speak_emote = list("clucks","croons")
|
||||
emote_hear = list("clucks")
|
||||
emote_see = list("pecks at the ground","flaps its wings viciously")
|
||||
speak_chance = 2
|
||||
turns_per_move = 3
|
||||
meat_type = /obj/item/weapon/reagent_containers/food/snacks/meat
|
||||
meat_amount = 2
|
||||
response_help = "pets the"
|
||||
response_disarm = "gently pushes aside the"
|
||||
response_harm = "kicks the"
|
||||
attacktext = "kicks"
|
||||
health = 10
|
||||
var/eggsleft = 0
|
||||
var/color
|
||||
pass_flags = PASSTABLE
|
||||
|
||||
/mob/living/simple_animal/chicken/New()
|
||||
..()
|
||||
if(!color)
|
||||
color = pick( list("brown","black","white") )
|
||||
icon_state = "chicken_[color]"
|
||||
icon_living = "chicken_[color]"
|
||||
icon_dead = "chicken_[color]_dead"
|
||||
pixel_x = rand(-6, 6)
|
||||
pixel_y = rand(0, 10)
|
||||
chicken_count += 1
|
||||
|
||||
/mob/living/simple_animal/chicken/Die()
|
||||
..()
|
||||
chicken_count -= 1
|
||||
|
||||
/mob/living/simple_animal/chicken/attackby(var/obj/item/O as obj, var/mob/user as mob)
|
||||
if(istype(O, /obj/item/weapon/reagent_containers/food/snacks/grown/wheat)) //feedin' dem chickens
|
||||
if(!stat && eggsleft < 8)
|
||||
user.visible_message("\blue [user] feeds [O] to [name]! It clucks happily.","\blue You feed [O] to [name]! It clucks happily.")
|
||||
user.drop_item()
|
||||
del(O)
|
||||
eggsleft += rand(1, 4)
|
||||
//world << eggsleft
|
||||
else
|
||||
user << "\blue [name] doesn't seem hungry!"
|
||||
else
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/chicken/Life()
|
||||
. =..()
|
||||
if(!.)
|
||||
return
|
||||
if(!stat && prob(3) && eggsleft > 0)
|
||||
visible_message("[src] [pick("lays an egg.","squats down and croons.","begins making a huge racket.","begins clucking raucously.")]")
|
||||
eggsleft--
|
||||
var/obj/item/weapon/reagent_containers/food/snacks/egg/E = new(get_turf(src))
|
||||
E.pixel_x = rand(-6,6)
|
||||
E.pixel_y = rand(-6,6)
|
||||
if(chicken_count < MAX_CHICKENS && prob(10))
|
||||
processing_objects.Add(E)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/egg/var/amount_grown = 0
|
||||
/obj/item/weapon/reagent_containers/food/snacks/egg/process()
|
||||
if(isturf(loc))
|
||||
amount_grown += rand(1,2)
|
||||
if(amount_grown >= 100)
|
||||
visible_message("[src] hatches with a quiet cracking sound.")
|
||||
new /mob/living/simple_animal/chick(get_turf(src))
|
||||
processing_objects.Remove(src)
|
||||
del(src)
|
||||
else
|
||||
processing_objects.Remove(src)
|
||||
@@ -65,18 +65,20 @@
|
||||
emote_see = list("jiggles", "bounces in place")
|
||||
var/colour = "grey"
|
||||
|
||||
/mob/living/simple_animal/slime/adult/Die()
|
||||
/mob/living/simple_animal/adultslime/New()
|
||||
..()
|
||||
overlays += "aslime-:33"
|
||||
|
||||
|
||||
/mob/living/simple_animal/slime/adult/Die()
|
||||
var/mob/living/simple_animal/slime/S1 = new /mob/living/simple_animal/slime (src.loc)
|
||||
S1.icon_state = "[src.colour] baby slime"
|
||||
S1.icon_state = "[src.colour] adult slime"
|
||||
S1.icon_living = "[src.colour] adult slime"
|
||||
S1.icon_dead = "[src.colour] adult slime dead"
|
||||
S1.icon_living = "[src.colour] baby slime"
|
||||
S1.icon_dead = "[src.colour] baby slime dead"
|
||||
S1.colour = "[src.colour]"
|
||||
var/mob/living/simple_animal/slime/S2 = new /mob/living/simple_animal/slime (src.loc)
|
||||
S2.icon_state = "[src.colour] baby slime"
|
||||
S2.icon_state = "[src.colour] adult slime"
|
||||
S2.icon_living = "[src.colour] adult slime"
|
||||
S2.icon_dead = "[src.colour] adult slime dead"
|
||||
S2.icon_living = "[src.colour] baby slime"
|
||||
S2.icon_dead = "[src.colour] baby slime dead"
|
||||
S2.colour = "[src.colour]"
|
||||
del(src)
|
||||
@@ -0,0 +1,201 @@
|
||||
|
||||
#define SPINNING_WEB 1
|
||||
#define LAYING_EGGS 2
|
||||
#define MOVING_TO_TARGET 3
|
||||
#define SPINNING_COCOON 4
|
||||
|
||||
//basic spider mob, these generally guard nests
|
||||
/mob/living/simple_animal/hostile/giant_spider
|
||||
name = "giant spider"
|
||||
desc = "Furry and black, it makes you shudder to look at it. This one has deep red eyes."
|
||||
icon_state = "guard"
|
||||
icon_living = "guard"
|
||||
icon_dead = "guard_dead"
|
||||
speak_emote = list("chitters")
|
||||
emote_hear = list("chitters")
|
||||
speak_chance = 5
|
||||
turns_per_move = 5
|
||||
see_in_dark = 10
|
||||
meat_type = /obj/item/weapon/reagent_containers/food/snacks/bearmeat
|
||||
response_help = "pets the"
|
||||
response_disarm = "gently pushes aside the"
|
||||
response_harm = "pokes the"
|
||||
stop_automated_movement_when_pulled = 0
|
||||
maxHealth = 200
|
||||
health = 200
|
||||
melee_damage_lower = 15
|
||||
melee_damage_upper = 20
|
||||
heat_damage_per_tick = 20
|
||||
cold_damage_per_tick = 20
|
||||
var/poison_per_bite = 5
|
||||
var/poison_type = "toxin"
|
||||
faction = "spiders"
|
||||
var/busy = 0
|
||||
pass_flags = PASSTABLE
|
||||
move_to_delay = 6
|
||||
|
||||
//nursemaids - these create webs and eggs
|
||||
/mob/living/simple_animal/hostile/giant_spider/nurse
|
||||
desc = "Furry and black, it makes you shudder to look at it. This one has brilliant green eyes."
|
||||
icon_state = "nurse"
|
||||
icon_living = "nurse"
|
||||
icon_dead = "nurse_dead"
|
||||
maxHealth = 40
|
||||
health = 40
|
||||
melee_damage_lower = 5
|
||||
melee_damage_upper = 10
|
||||
poison_per_bite = 10
|
||||
var/atom/cocoon_target
|
||||
poison_type = "stoxin"
|
||||
var/fed = 0
|
||||
|
||||
//hunters have the most poison and move the fastest, so they can find prey
|
||||
/mob/living/simple_animal/hostile/giant_spider/hunter
|
||||
desc = "Furry and black, it makes you shudder to look at it. This one has sparkling purple eyes."
|
||||
icon_state = "hunter"
|
||||
icon_living = "hunter"
|
||||
icon_dead = "hunter_dead"
|
||||
maxHealth = 120
|
||||
health = 120
|
||||
melee_damage_lower = 10
|
||||
melee_damage_upper = 20
|
||||
poison_per_bite = 5
|
||||
move_to_delay = 4
|
||||
|
||||
/mob/living/simple_animal/hostile/giant_spider/AttackingTarget()
|
||||
..()
|
||||
if(isliving(target_mob))
|
||||
var/mob/living/L = target_mob
|
||||
if(L.reagents)
|
||||
L.reagents.add_reagent("toxin", poison_per_bite)
|
||||
if(prob(poison_per_bite))
|
||||
L << "\red You feel a tiny prick."
|
||||
L.reagents.add_reagent(poison_type, 5)
|
||||
|
||||
/mob/living/simple_animal/hostile/giant_spider/Life()
|
||||
..()
|
||||
if(!stat)
|
||||
if(stance == HOSTILE_STANCE_IDLE)
|
||||
//1% chance to skitter madly away
|
||||
if(!busy && prob(1))
|
||||
/*var/list/move_targets = list()
|
||||
for(var/turf/T in orange(20, src))
|
||||
move_targets.Add(T)*/
|
||||
stop_automated_movement = 1
|
||||
walk_to(src, pick(orange(20, src)), 1, move_to_delay)
|
||||
spawn(50)
|
||||
stop_automated_movement = 0
|
||||
walk(src,0)
|
||||
|
||||
/mob/living/simple_animal/hostile/giant_spider/nurse/proc/GiveUp(var/C)
|
||||
spawn(100)
|
||||
if(busy == MOVING_TO_TARGET)
|
||||
if(cocoon_target == C && get_dist(src,cocoon_target) > 1)
|
||||
cocoon_target = null
|
||||
busy = 0
|
||||
stop_automated_movement = 0
|
||||
|
||||
/mob/living/simple_animal/hostile/giant_spider/nurse/Life()
|
||||
..()
|
||||
if(!stat)
|
||||
if(stance == HOSTILE_STANCE_IDLE)
|
||||
var/list/can_see = ListTargets()
|
||||
//30% chance to stop wandering and do something
|
||||
if(!busy && prob(30))
|
||||
//first, check for potential food nearby to cocoon
|
||||
for(var/mob/living/C in can_see)
|
||||
if(C.stat)
|
||||
cocoon_target = C
|
||||
busy = MOVING_TO_TARGET
|
||||
walk_to(src, C, 1, move_to_delay)
|
||||
//give up if we can't reach them after 10 seconds
|
||||
GiveUp(C)
|
||||
return
|
||||
|
||||
//second, spin a sticky spiderweb on this tile
|
||||
var/obj/effect/spider/stickyweb/W = locate() in get_turf(src)
|
||||
if(!W)
|
||||
busy = SPINNING_WEB
|
||||
src.visible_message("\blue \the [src] begins to secrete a sticky substance.")
|
||||
stop_automated_movement = 1
|
||||
spawn(40)
|
||||
if(busy == SPINNING_WEB)
|
||||
new /obj/effect/spider/stickyweb(src.loc)
|
||||
busy = 0
|
||||
stop_automated_movement = 0
|
||||
else
|
||||
//third, lay an egg cluster there
|
||||
var/obj/effect/spider/eggcluster/E = locate() in get_turf(src)
|
||||
if(!E && fed > 0)
|
||||
busy = LAYING_EGGS
|
||||
src.visible_message("\blue \the [src] begins to lay a cluster of eggs.")
|
||||
stop_automated_movement = 1
|
||||
spawn(50)
|
||||
if(busy == LAYING_EGGS)
|
||||
E = locate() in get_turf(src)
|
||||
if(!E)
|
||||
new /obj/effect/spider/eggcluster(src.loc)
|
||||
fed--
|
||||
busy = 0
|
||||
stop_automated_movement = 0
|
||||
else
|
||||
//fourthly, cocoon any nearby items so those pesky pinkskins can't use them
|
||||
for(var/obj/O in can_see)
|
||||
|
||||
if(O.anchored)
|
||||
continue
|
||||
|
||||
if(istype(O, /obj/item) || istype(O, /obj/structure) || istype(O, /obj/machinery))
|
||||
cocoon_target = O
|
||||
busy = MOVING_TO_TARGET
|
||||
stop_automated_movement = 1
|
||||
walk_to(src, O, 1, move_to_delay)
|
||||
//give up if we can't reach them after 10 seconds
|
||||
GiveUp(O)
|
||||
|
||||
else if(busy == MOVING_TO_TARGET && cocoon_target)
|
||||
if(get_dist(src, cocoon_target) <= 1)
|
||||
busy = SPINNING_COCOON
|
||||
src.visible_message("\blue \the [src] begins to secrete a sticky substance around \the [cocoon_target].")
|
||||
stop_automated_movement = 1
|
||||
walk(src,0)
|
||||
spawn(50)
|
||||
if(busy == SPINNING_COCOON)
|
||||
if(cocoon_target && istype(cocoon_target.loc, /turf) && get_dist(src,cocoon_target) <= 1)
|
||||
var/obj/effect/spider/cocoon/C = new(cocoon_target.loc)
|
||||
var/large_cocoon = 0
|
||||
C.pixel_x = cocoon_target.pixel_x
|
||||
C.pixel_y = cocoon_target.pixel_y
|
||||
for(var/mob/living/M in C.loc)
|
||||
if(istype(M, /mob/living/simple_animal/hostile/giant_spider))
|
||||
continue
|
||||
large_cocoon = 1
|
||||
fed++
|
||||
src.visible_message("\red \the [src] sticks a proboscis into \the [cocoon_target] and sucks a viscous substance out.")
|
||||
M.loc = C
|
||||
C.pixel_x = M.pixel_x
|
||||
C.pixel_y = M.pixel_y
|
||||
break
|
||||
for(var/obj/item/I in C.loc)
|
||||
I.loc = C
|
||||
for(var/obj/structure/S in C.loc)
|
||||
if(!S.anchored)
|
||||
S.loc = C
|
||||
large_cocoon = 1
|
||||
for(var/obj/machinery/M in C.loc)
|
||||
if(!M.anchored)
|
||||
M.loc = C
|
||||
large_cocoon = 1
|
||||
if(large_cocoon)
|
||||
C.icon_state = pick("cocoon_large1","cocoon_large2","cocoon_large3")
|
||||
busy = 0
|
||||
stop_automated_movement = 0
|
||||
|
||||
else
|
||||
busy = 0
|
||||
stop_automated_movement = 0
|
||||
|
||||
#undef SPINNING_WEB
|
||||
#undef LAYING_EGGS
|
||||
#undef MOVING_TO_TARGET
|
||||
#undef SPINNING_COCOON
|
||||
@@ -18,6 +18,11 @@
|
||||
stop_automated_movement = 0
|
||||
for(var/atom/A in ListTargets())
|
||||
|
||||
var/atom/F = Found(A)
|
||||
if(F)
|
||||
T = F
|
||||
break
|
||||
|
||||
if(isliving(A))
|
||||
var/mob/living/L = A
|
||||
if(L.faction == src.faction && !attack_same)
|
||||
@@ -29,6 +34,7 @@
|
||||
stance = HOSTILE_STANCE_ATTACK
|
||||
T = L
|
||||
break
|
||||
|
||||
if(istype(A, /obj/mecha))
|
||||
var/obj/mecha/M = A
|
||||
if (M.occupant)
|
||||
@@ -37,6 +43,10 @@
|
||||
break
|
||||
return T
|
||||
|
||||
|
||||
/mob/living/simple_animal/hostile/proc/Found(var/atom/A)
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/hostile/proc/MoveToTarget()
|
||||
stop_automated_movement = 1
|
||||
if(!target_mob || SA_attackable(target_mob))
|
||||
@@ -163,4 +173,4 @@
|
||||
for(var/dir in cardinal) // North, South, East, 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)
|
||||
obstacle.attack_animal(src)
|
||||
|
||||
@@ -133,13 +133,13 @@ var/global/list/protected_objects = list(/obj/structure/table, /obj/structure/ca
|
||||
|
||||
health = 100
|
||||
maxHealth = 100
|
||||
var/obj/item/staff = null // the staff that changed they, never attack the bearer of this staff
|
||||
var/mob/living/creator = null // the creator
|
||||
var/destroy_objects = 0
|
||||
var/knockdown_people = 0
|
||||
|
||||
/mob/living/simple_animal/hostile/mimic/copy/New(loc, var/obj/copy, var/obj/item/staff)
|
||||
/mob/living/simple_animal/hostile/mimic/copy/New(loc, var/obj/copy, var/mob/living/creator)
|
||||
..(loc)
|
||||
CopyObject(copy, staff)
|
||||
CopyObject(copy, creator)
|
||||
|
||||
/mob/living/simple_animal/hostile/mimic/copy/Die()
|
||||
|
||||
@@ -148,10 +148,10 @@ var/global/list/protected_objects = list(/obj/structure/table, /obj/structure/ca
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/hostile/mimic/copy/ListTargets()
|
||||
// Return a list of targets that isn't the holder of our staff
|
||||
return view(src, 7) - get(staff, /mob)
|
||||
// Return a list of targets that isn't the creator
|
||||
return view(src, 7) - creator
|
||||
|
||||
/mob/living/simple_animal/hostile/mimic/copy/proc/CopyObject(var/obj/O, var/obj/item/staff)
|
||||
/mob/living/simple_animal/hostile/mimic/copy/proc/CopyObject(var/obj/O, var/mob/living/creator)
|
||||
|
||||
if((istype(O, /obj/item) || istype(O, /obj/structure)) && !is_type_in_list(O, protected_objects))
|
||||
|
||||
@@ -177,9 +177,9 @@ var/global/list/protected_objects = list(/obj/structure/table, /obj/structure/ca
|
||||
move_to_delay = 2 * I.w_class
|
||||
|
||||
maxHealth = health
|
||||
if(staff)
|
||||
src.staff = staff
|
||||
faction = "\ref[staff]" // very unique
|
||||
if(creator)
|
||||
src.creator = creator
|
||||
faction = "\ref[creator]" // very unique
|
||||
return 1
|
||||
return
|
||||
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
/mob/living/simple_animal/hostile/retaliate/clown
|
||||
name = "Clown"
|
||||
desc = "A denizen of clown planet"
|
||||
icon_state = "clown"
|
||||
icon_living = "clown"
|
||||
icon_dead = "clown_dead"
|
||||
icon_gib = "clown_gib"
|
||||
speak_chance = 0
|
||||
turns_per_move = 5
|
||||
response_help = "pokes the"
|
||||
response_disarm = "gently pushes aside the"
|
||||
response_harm = "hits the"
|
||||
speak = list("HONK", "Honk!", "Welcome to clown planet!")
|
||||
emote_see = list("honks")
|
||||
speak_chance = 1
|
||||
a_intent = "harm"
|
||||
stop_automated_movement_when_pulled = 0
|
||||
maxHealth = 75
|
||||
health = 75
|
||||
speed = -1
|
||||
harm_intent_damage = 8
|
||||
melee_damage_lower = 10
|
||||
melee_damage_upper = 10
|
||||
attacktext = "attacks"
|
||||
attack_sound = 'sound/items/bikehorn.ogg'
|
||||
|
||||
min_oxy = 5
|
||||
max_oxy = 0
|
||||
min_tox = 0
|
||||
max_tox = 1
|
||||
min_co2 = 0
|
||||
max_co2 = 5
|
||||
min_n2 = 0
|
||||
max_n2 = 0
|
||||
minbodytemp = 270
|
||||
maxbodytemp = 370
|
||||
heat_damage_per_tick = 15 //amount of damage applied if animal's body temperature is higher than maxbodytemp
|
||||
cold_damage_per_tick = 10 //same as heat_damage_per_tick, only if the bodytemperature it's lower than minbodytemp
|
||||
unsuitable_atoms_damage = 10
|
||||
@@ -0,0 +1,49 @@
|
||||
/mob/living/simple_animal/hostile/retaliate
|
||||
var/list/enemies = list()
|
||||
|
||||
/mob/living/simple_animal/hostile/retaliate/Found(var/atom/A)
|
||||
if(isliving(A))
|
||||
var/mob/living/L = A
|
||||
if(!L.stat)
|
||||
stance = HOSTILE_STANCE_ATTACK
|
||||
return L
|
||||
else
|
||||
enemies -= L
|
||||
else if(istype(A, /obj/mecha))
|
||||
var/obj/mecha/M = A
|
||||
if(M.occupant)
|
||||
stance = HOSTILE_STANCE_ATTACK
|
||||
return A
|
||||
|
||||
/mob/living/simple_animal/hostile/retaliate/ListTargets()
|
||||
if(!enemies.len)
|
||||
return list()
|
||||
var/list/see = ..()
|
||||
see &= enemies // Remove all entries that aren't in enemies
|
||||
return see
|
||||
|
||||
/mob/living/simple_animal/hostile/retaliate/proc/Retaliate()
|
||||
..()
|
||||
var/list/around = view(src, 7)
|
||||
|
||||
for(var/atom/movable/A in around)
|
||||
if(A == src)
|
||||
continue
|
||||
if(isliving(A))
|
||||
var/mob/living/M = A
|
||||
if(!attack_same && M.faction != faction)
|
||||
enemies |= M
|
||||
else if(istype(A, /obj/mecha))
|
||||
var/obj/mecha/M = A
|
||||
if(M.occupant)
|
||||
enemies |= M
|
||||
enemies |= M.occupant
|
||||
|
||||
for(var/mob/living/simple_animal/hostile/retaliate/H in around)
|
||||
if(!attack_same && !H.attack_same && H.faction == faction)
|
||||
H.enemies |= enemies
|
||||
return 0
|
||||
|
||||
/mob/living/simple_animal/hostile/retaliate/adjustBruteLoss(var/damage)
|
||||
..(damage)
|
||||
Retaliate()
|
||||
@@ -339,6 +339,28 @@
|
||||
L.amount_grown = min(L.amount_grown + damage, L.max_grown)
|
||||
|
||||
|
||||
/mob/living/simple_animal/attack_slime(mob/living/carbon/slime/M as mob)
|
||||
if (!ticker)
|
||||
M << "You cannot attack people before the game has started."
|
||||
return
|
||||
|
||||
if(M.Victim) return // can't attack while eating!
|
||||
|
||||
visible_message("\red <B>The [M.name] glomps [src]!</B>")
|
||||
|
||||
var/damage = rand(1, 3)
|
||||
|
||||
if(istype(src, /mob/living/carbon/slime/adult))
|
||||
damage = rand(20, 40)
|
||||
else
|
||||
damage = rand(5, 35)
|
||||
|
||||
adjustBruteLoss(damage)
|
||||
|
||||
|
||||
return
|
||||
|
||||
|
||||
/mob/living/simple_animal/attackby(var/obj/item/O as obj, var/mob/user as mob) //Marker -Agouri
|
||||
if(istype(O, /obj/item/stack/medical))
|
||||
|
||||
|
||||
@@ -145,9 +145,6 @@
|
||||
var/list/mutations = list() //Carbon -- Doohl
|
||||
//see: setup.dm for list of mutations
|
||||
|
||||
var/list/augmentations = list() //Carbon -- Doohl
|
||||
//see: setup.dm for list of augmentations
|
||||
|
||||
var/voice_name = "unidentifiable voice"
|
||||
var/voice_message = null // When you are not understood by others (replaced with just screeches, hisses, chimpers etc.)
|
||||
var/say_message = null // When you are understood by others. Currently only used by aliens and monkeys in their say_quote procs
|
||||
|
||||
@@ -81,7 +81,7 @@
|
||||
return 0
|
||||
|
||||
/proc/isclown(A)
|
||||
if(istype(A, /mob/living/simple_animal/clown))
|
||||
if(istype(A, /mob/living/simple_animal/hostile/retaliate/clown))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
|
||||
@@ -259,6 +259,7 @@
|
||||
if(!job) return 0
|
||||
if((job.current_positions >= job.total_positions) && job.total_positions != -1) return 0
|
||||
if(jobban_isbanned(src,rank)) return 0
|
||||
if(!job.player_old_enough(src.client)) return 0
|
||||
return 1
|
||||
|
||||
|
||||
|
||||
@@ -9,12 +9,19 @@
|
||||
/mob/verb/say_verb(message as text)
|
||||
set name = "Say"
|
||||
set category = "IC"
|
||||
if(say_disabled) //This is here to try to identify lag problems
|
||||
usr << "\red Speech is currently admin-disabled."
|
||||
return
|
||||
usr.say(message)
|
||||
|
||||
/mob/verb/me_verb(message as text)
|
||||
set name = "Me"
|
||||
set category = "IC"
|
||||
|
||||
if(say_disabled) //This is here to try to identify lag problems
|
||||
usr << "\red Speech is currently admin-disabled."
|
||||
return
|
||||
|
||||
message = trim(copytext(sanitize(message), 1, MAX_MESSAGE_LEN))
|
||||
|
||||
if(ishuman(src) || isrobot(src))
|
||||
@@ -26,6 +33,10 @@
|
||||
var/name = src.real_name
|
||||
var/alt_name = ""
|
||||
|
||||
if(say_disabled) //This is here to try to identify lag problems
|
||||
usr << "\red Speech is currently admin-disabled."
|
||||
return
|
||||
|
||||
if(mind && mind.name)
|
||||
name = "[mind.name]"
|
||||
else
|
||||
|
||||
@@ -460,12 +460,6 @@
|
||||
usr:inv3.icon_state = "inv3"
|
||||
usr:module_active = null
|
||||
|
||||
if("radar")
|
||||
usr:close_radar()
|
||||
|
||||
if("radar closed")
|
||||
usr:start_radar()
|
||||
|
||||
else
|
||||
DblClick()
|
||||
return
|
||||
@@ -646,7 +640,7 @@
|
||||
if(CM.handcuffed && CM.canmove && (CM.last_special <= world.time))
|
||||
CM.next_move = world.time + 100
|
||||
CM.last_special = world.time + 100
|
||||
if(isalienadult(CM) || (HULK in usr.mutations) || (SUPRSTR in CM.augmentations))//Don't want to do a lot of logic gating here.
|
||||
if(isalienadult(CM) || (HULK in usr.mutations))//Don't want to do a lot of logic gating here.
|
||||
usr << "\red You attempt to break your handcuffs. (This will take around 5 seconds and you need to stand still)"
|
||||
for(var/mob/O in viewers(CM))
|
||||
O.show_message(text("\red <B>[] is trying to break the handcuffs!</B>", CM), 1)
|
||||
@@ -684,7 +678,7 @@
|
||||
else if(CM.legcuffed && CM.canmove && (CM.last_special <= world.time))
|
||||
CM.next_move = world.time + 100
|
||||
CM.last_special = world.time + 100
|
||||
if(isalienadult(CM) || (HULK in usr.mutations) || (SUPRSTR in CM.augmentations))//Don't want to do a lot of logic gating here.
|
||||
if(isalienadult(CM) || (HULK in usr.mutations))//Don't want to do a lot of logic gating here.
|
||||
usr << "\red You attempt to break your legcuffs. (This will take around 5 seconds and you need to stand still)"
|
||||
for(var/mob/O in viewers(CM))
|
||||
O.show_message(text("\red <B>[] is trying to break the legcuffs!</B>", CM), 1)
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
var/obj/item/weapon/toppaper //The topmost piece of paper.
|
||||
flags = FPRINT | TABLEPASS
|
||||
slot_flags = SLOT_BELT
|
||||
pressure_resistance = 10
|
||||
|
||||
/obj/item/weapon/clipboard/New()
|
||||
update_icon()
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
throw_range = 15
|
||||
m_amt = 10
|
||||
var/colour = "black" //what colour the ink is!
|
||||
pressure_resistance = 5
|
||||
pressure_resistance = 2
|
||||
|
||||
|
||||
/obj/item/weapon/pen/blue
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
throw_range = 15
|
||||
m_amt = 60
|
||||
color = "cargo"
|
||||
pressure_resistance = 5
|
||||
pressure_resistance = 2
|
||||
attack_verb = list("stamped")
|
||||
|
||||
/obj/item/weapon/stamp/captain
|
||||
|
||||
@@ -173,7 +173,7 @@
|
||||
attack_verb = list("whipped", "lashed", "disciplined", "flogged")
|
||||
|
||||
suicide_act(mob/user)
|
||||
viewers(user) << "\red <b>[user] is strangling \himself with the [src]! It looks like \he's trying to commit suicide.</b>"
|
||||
viewers(user) << "\red <b>[user] is strangling \himself with the [src.name]! It looks like \he's trying to commit suicide.</b>"
|
||||
return(OXYLOSS)
|
||||
|
||||
|
||||
|
||||
@@ -145,9 +145,12 @@
|
||||
|
||||
|
||||
/obj/machinery/power/proc/get_connections()
|
||||
if(!directwired) return get_indirect_connections()
|
||||
|
||||
. = list()
|
||||
|
||||
if(!directwired)
|
||||
return get_indirect_connections()
|
||||
|
||||
var/cdir
|
||||
|
||||
for(var/card in cardinal)
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
/obj/item/ammo_casing/c9mm
|
||||
desc = "A 9mm bullet casing."
|
||||
caliber = "9mm"
|
||||
projectile_type = "/obj/item/projectile/bullet/weakbullet"
|
||||
projectile_type = "/obj/item/projectile/bullet/midbullet2"
|
||||
|
||||
|
||||
/obj/item/ammo_casing/c45
|
||||
|
||||
@@ -74,17 +74,15 @@
|
||||
loc = A.loc
|
||||
return 0// nope.avi
|
||||
|
||||
// check for dodge (i can't place in bullet_act because then things get wonky)
|
||||
if(!M.stat && !M.lying && (REFLEXES in M.augmentations) && prob(85))
|
||||
var/message = pick("[M] skillfully dodges the [name]!", "[M] ducks, dodging the [name]!", "[M] effortlessly jumps out of the way of the [name]!", "[M] dodges the [name] in one graceful movement!", "[M] leans back, dodging the [name] narrowly!", "[M] sidesteps, avoiding the [name] narrowly.", "[M] barely weaves out of the way of the [name].")
|
||||
M.visible_message("\red <B>[message]</B>")
|
||||
forcedodge = 1
|
||||
else
|
||||
var/distance = get_dist(original,loc)
|
||||
//Lower accurancy/longer range tradeoff. Distance matters a lot here, so at
|
||||
// close distance, actually RAISE the chance to hit.
|
||||
def_zone = get_zone_with_miss_chance(def_zone, M, -30 + 8*distance)
|
||||
var/distance = get_dist(original,loc)
|
||||
//Lower accurancy/longer range tradeoff. Distance matters a lot here, so at
|
||||
// close distance, actually RAISE the chance to hit.
|
||||
def_zone = get_zone_with_miss_chance(def_zone, M, -30 + 8*distance)
|
||||
|
||||
if(silenced)
|
||||
if(def_zone)
|
||||
M << "\red You've been shot in the [parse_zone(def_zone)] by the [src.name]!"
|
||||
else
|
||||
if(!def_zone)
|
||||
visible_message("\The [src] misses [M] narrowly.")
|
||||
del(src)
|
||||
@@ -93,7 +91,6 @@
|
||||
M << "\red You've been shot in the [parse_zone(def_zone)] by the [src.name]!"
|
||||
else
|
||||
visible_message("\red [A.name] is hit by the [src.name] in the [parse_zone(def_zone)]!")//X has fired Y is now given by the guns so you cant tell who shot you if you could not see the shooter
|
||||
|
||||
if(istype(firer, /mob))
|
||||
M.attack_log += "\[[time_stamp()]\] <b>[firer]/[firer.ckey]</b> shot <b>[M]/[M.ckey]</b> with a <b>[src.type]</b>"
|
||||
firer.attack_log += "\[[time_stamp()]\] <b>[firer]/[firer.ckey]</b> shot <b>[M]/[M.ckey]</b> with a <b>[src.type]</b>"
|
||||
|
||||
@@ -10,4 +10,4 @@
|
||||
. = ..()
|
||||
if(istype(change, /obj/item) || istype(change, /obj/structure) && !is_type_in_list(change, protected_objects))
|
||||
var/obj/O = change
|
||||
new /mob/living/simple_animal/hostile/mimic/copy(O.loc, O, shot_from)
|
||||
new /mob/living/simple_animal/hostile/mimic/copy(O.loc, O, firer)
|
||||
|
||||
@@ -24,12 +24,29 @@ datum
|
||||
var/datum/reagent/D = new path()
|
||||
chemical_reagents_list[D.id] = D
|
||||
if(!chemical_reactions_list)
|
||||
//Chemical Reactions - Initialises all /datum/chemical_reaction into a list (without an index)
|
||||
//Chemical Reactions - Initialises all /datum/chemical_reaction into a list
|
||||
// It is filtered into multiple lists within a list.
|
||||
// For example:
|
||||
// chemical_reaction_list["plasma"] is a list of all reactions relating to plasma
|
||||
|
||||
var/paths = typesof(/datum/chemical_reaction) - /datum/chemical_reaction
|
||||
chemical_reactions_list = list()
|
||||
|
||||
for(var/path in paths)
|
||||
|
||||
var/datum/chemical_reaction/D = new path()
|
||||
chemical_reactions_list += D
|
||||
var/list/reaction_ids = list()
|
||||
|
||||
if(D.required_reagents && D.required_reagents.len)
|
||||
for(var/reaction in D.required_reagents)
|
||||
reaction_ids += reaction
|
||||
|
||||
// Create filters based on each reagent id in the required reagents list
|
||||
for(var/id in reaction_ids)
|
||||
if(!chemical_reactions_list[id])
|
||||
chemical_reactions_list[id] = list()
|
||||
chemical_reactions_list[id] += D
|
||||
break // Don't bother adding ourselves to other reagent ids, it is redundant.
|
||||
|
||||
proc
|
||||
|
||||
@@ -88,14 +105,9 @@ datum
|
||||
var/current_reagent_transfer = current_reagent.volume * part
|
||||
if(preserve_data)
|
||||
trans_data = current_reagent.data
|
||||
if((current_reagent.id == "blood" && !ishuman(target)) || current_reagent.id != "blood")
|
||||
R.add_reagent(current_reagent.id, (current_reagent_transfer * multiplier), trans_data)
|
||||
src.remove_reagent(current_reagent.id, current_reagent_transfer)
|
||||
else if(current_reagent.id == "blood" && ishuman(target)) // can never be sure
|
||||
var/mob/living/carbon/human/H = target
|
||||
H.vessel.add_reagent(current_reagent.id, (current_reagent_transfer * multiplier), trans_data)
|
||||
src.remove_reagent(current_reagent.id, current_reagent_transfer)
|
||||
H.vessel.update_total()
|
||||
R.add_reagent(current_reagent.id, (current_reagent_transfer * multiplier), trans_data)
|
||||
src.remove_reagent(current_reagent.id, current_reagent_transfer)
|
||||
|
||||
src.update_total()
|
||||
R.update_total()
|
||||
R.handle_reactions()
|
||||
@@ -203,84 +215,90 @@ datum
|
||||
var/reaction_occured = 0
|
||||
do
|
||||
reaction_occured = 0
|
||||
for(var/datum/chemical_reaction/C in chemical_reactions_list)
|
||||
var/total_required_reagents = C.required_reagents.len
|
||||
var/total_matching_reagents = 0
|
||||
var/total_required_catalysts = C.required_catalysts.len
|
||||
var/total_matching_catalysts= 0
|
||||
var/matching_container = 0
|
||||
var/matching_other = 0
|
||||
var/list/multipliers = new/list()
|
||||
for(var/datum/reagent/R in reagent_list) // Usually a small list
|
||||
for(var/reaction in chemical_reactions_list[R.id]) // Was a big list but now it should be smaller since we filtered it with our reagent id
|
||||
|
||||
for(var/B in C.required_reagents)
|
||||
if(!has_reagent(B, C.required_reagents[B])) break
|
||||
total_matching_reagents++
|
||||
multipliers += round(get_reagent_amount(B) / C.required_reagents[B])
|
||||
for(var/B in C.required_catalysts)
|
||||
if(!has_reagent(B, C.required_catalysts[B])) break
|
||||
total_matching_catalysts++
|
||||
if(!reaction)
|
||||
continue
|
||||
|
||||
if(!C.required_container)
|
||||
matching_container = 1
|
||||
var/datum/chemical_reaction/C = reaction
|
||||
var/total_required_reagents = C.required_reagents.len
|
||||
var/total_matching_reagents = 0
|
||||
var/total_required_catalysts = C.required_catalysts.len
|
||||
var/total_matching_catalysts= 0
|
||||
var/matching_container = 0
|
||||
var/matching_other = 0
|
||||
var/list/multipliers = new/list()
|
||||
|
||||
else
|
||||
if(my_atom.type == C.required_container)
|
||||
for(var/B in C.required_reagents)
|
||||
if(!has_reagent(B, C.required_reagents[B])) break
|
||||
total_matching_reagents++
|
||||
multipliers += round(get_reagent_amount(B) / C.required_reagents[B])
|
||||
for(var/B in C.required_catalysts)
|
||||
if(!has_reagent(B, C.required_catalysts[B])) break
|
||||
total_matching_catalysts++
|
||||
|
||||
if(!C.required_container)
|
||||
matching_container = 1
|
||||
|
||||
if(!C.required_other)
|
||||
matching_other = 1
|
||||
else
|
||||
if(my_atom.type == C.required_container)
|
||||
matching_container = 1
|
||||
|
||||
else
|
||||
/*if(istype(my_atom, /obj/item/slime_core))
|
||||
var/obj/item/slime_core/M = my_atom
|
||||
if(!C.required_other)
|
||||
matching_other = 1
|
||||
|
||||
if(M.POWERFLAG == C.required_other && M.Uses > 0) // added a limit to slime cores -- Muskets requested this
|
||||
matching_other = 1*/
|
||||
if(istype(my_atom, /obj/item/slime_extract))
|
||||
var/obj/item/slime_extract/M = my_atom
|
||||
else
|
||||
/*if(istype(my_atom, /obj/item/slime_core))
|
||||
var/obj/item/slime_core/M = my_atom
|
||||
|
||||
if(M.Uses > 0) // added a limit to slime cores -- Muskets requested this
|
||||
matching_other = 1
|
||||
if(M.POWERFLAG == C.required_other && M.Uses > 0) // added a limit to slime cores -- Muskets requested this
|
||||
matching_other = 1*/
|
||||
if(istype(my_atom, /obj/item/slime_extract))
|
||||
var/obj/item/slime_extract/M = my_atom
|
||||
|
||||
if(M.Uses > 0) // added a limit to slime cores -- Muskets requested this
|
||||
matching_other = 1
|
||||
|
||||
|
||||
|
||||
|
||||
if(total_matching_reagents == total_required_reagents && total_matching_catalysts == total_required_catalysts && matching_container && matching_other)
|
||||
var/multiplier = min(multipliers)
|
||||
for(var/B in C.required_reagents)
|
||||
remove_reagent(B, (multiplier * C.required_reagents[B]), safety = 1)
|
||||
if(total_matching_reagents == total_required_reagents && total_matching_catalysts == total_required_catalysts && matching_container && matching_other)
|
||||
var/multiplier = min(multipliers)
|
||||
for(var/B in C.required_reagents)
|
||||
remove_reagent(B, (multiplier * C.required_reagents[B]), safety = 1)
|
||||
|
||||
var/created_volume = C.result_amount*multiplier
|
||||
if(C.result)
|
||||
feedback_add_details("chemical_reaction","[C.result]|[C.result_amount*multiplier]")
|
||||
multiplier = max(multiplier, 1) //this shouldnt happen ...
|
||||
add_reagent(C.result, C.result_amount*multiplier)
|
||||
var/created_volume = C.result_amount*multiplier
|
||||
if(C.result)
|
||||
feedback_add_details("chemical_reaction","[C.result]|[C.result_amount*multiplier]")
|
||||
multiplier = max(multiplier, 1) //this shouldnt happen ...
|
||||
add_reagent(C.result, C.result_amount*multiplier)
|
||||
|
||||
if(!isliving(my_atom))
|
||||
for(var/mob/M in viewers(4, get_turf(my_atom)) )
|
||||
var/list/seen = viewers(4, get_turf(my_atom))
|
||||
for(var/mob/M in seen)
|
||||
M << "\blue \icon[my_atom] The solution begins to bubble."
|
||||
|
||||
/* if(istype(my_atom, /obj/item/slime_core))
|
||||
var/obj/item/slime_core/ME = my_atom
|
||||
ME.Uses--
|
||||
if(ME.Uses <= 0) // give the notification that the slime core is dead
|
||||
for(var/mob/M in viewers(4, get_turf(my_atom)) )
|
||||
M << "\blue \icon[my_atom] The innards begin to boil!"
|
||||
*/
|
||||
if(istype(my_atom, /obj/item/slime_extract))
|
||||
var/obj/item/slime_extract/ME2 = my_atom
|
||||
ME2.Uses--
|
||||
if(ME2.Uses <= 0) // give the notification that the slime core is dead
|
||||
for(var/mob/M in viewers(4, get_turf(my_atom)) )
|
||||
M << "\blue \icon[my_atom] The [my_atom]'s power is consumed in the reaction."
|
||||
ME2.name = "used slime extract"
|
||||
ME2.desc = "This extract has been used up."
|
||||
/* if(istype(my_atom, /obj/item/slime_core))
|
||||
var/obj/item/slime_core/ME = my_atom
|
||||
ME.Uses--
|
||||
if(ME.Uses <= 0) // give the notification that the slime core is dead
|
||||
for(var/mob/M in viewers(4, get_turf(my_atom)) )
|
||||
M << "\blue \icon[my_atom] The innards begin to boil!"
|
||||
*/
|
||||
if(istype(my_atom, /obj/item/slime_extract))
|
||||
var/obj/item/slime_extract/ME2 = my_atom
|
||||
ME2.Uses--
|
||||
if(ME2.Uses <= 0) // give the notification that the slime core is dead
|
||||
for(var/mob/M in seen)
|
||||
M << "\blue \icon[my_atom] The [my_atom]'s power is consumed in the reaction."
|
||||
ME2.name = "used slime extract"
|
||||
ME2.desc = "This extract has been used up."
|
||||
|
||||
playsound(get_turf(my_atom), 'sound/effects/bubbles.ogg', 80, 1)
|
||||
playsound(get_turf(my_atom), 'sound/effects/bubbles.ogg', 80, 1)
|
||||
|
||||
C.on_reaction(src, created_volume)
|
||||
reaction_occured = 1
|
||||
break
|
||||
C.on_reaction(src, created_volume)
|
||||
reaction_occured = 1
|
||||
break
|
||||
|
||||
while(reaction_occured)
|
||||
update_total()
|
||||
@@ -426,17 +444,13 @@ datum
|
||||
|
||||
for(var/A in reagent_list)
|
||||
var/datum/reagent/R = A
|
||||
var/datum/compare = chemical_reagents_list[reagent]
|
||||
if(istype(R,compare))
|
||||
var/amt = max(0,min(R.volume,amount))
|
||||
R.volume -= amt
|
||||
amount -= amt
|
||||
if(amount<=0)
|
||||
update_total()
|
||||
if(!safety)//So it does not handle reactions when it need not to
|
||||
handle_reactions()
|
||||
my_atom.on_reagent_change()
|
||||
return 0
|
||||
if (R.id == reagent)
|
||||
R.volume -= amount
|
||||
update_total()
|
||||
if(!safety)//So it does not handle reactions when it need not to
|
||||
handle_reactions()
|
||||
my_atom.on_reagent_change()
|
||||
return 0
|
||||
|
||||
return 1
|
||||
|
||||
@@ -444,8 +458,7 @@ datum
|
||||
|
||||
for(var/A in reagent_list)
|
||||
var/datum/reagent/R = A
|
||||
var/datum/compare = chemical_reagents_list[reagent]
|
||||
if(istype(R,compare))
|
||||
if (R.id == reagent)
|
||||
if(!amount) return R
|
||||
else
|
||||
if(R.volume >= amount) return R
|
||||
@@ -454,14 +467,12 @@ datum
|
||||
return 0
|
||||
|
||||
get_reagent_amount(var/reagent)
|
||||
var/amnt = 0
|
||||
for(var/A in reagent_list)
|
||||
var/datum/reagent/R = A
|
||||
var/datum/compare = chemical_reagents_list[reagent]
|
||||
if(istype(R,compare))
|
||||
amnt += R.volume
|
||||
if (R.id == reagent)
|
||||
return R.volume
|
||||
|
||||
return amnt
|
||||
return 0
|
||||
|
||||
get_reagents()
|
||||
var/res = ""
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1009,7 +1009,8 @@ datum
|
||||
/mob/living/simple_animal/hostile/syndicate/ranged,
|
||||
/mob/living/simple_animal/hostile/syndicate/ranged/space,
|
||||
/mob/living/simple_animal/hostile/alien/queen/large,
|
||||
/mob/living/simple_animal/clown
|
||||
/mob/living/simple_animal/hostile/retaliate,
|
||||
/mob/living/simple_animal/hostile/retaliate/clown
|
||||
)//exclusion list for things you don't want the reaction to create.
|
||||
var/list/critters = typesof(/mob/living/simple_animal/hostile) - blocked // list of possible hostile mobs
|
||||
|
||||
@@ -1282,20 +1283,9 @@ datum
|
||||
required_container = /obj/item/slime_extract/adamantine
|
||||
required_other = 1
|
||||
on_reaction(var/datum/reagents/holder)
|
||||
var/mob/living/carbon/human/G = new /mob/living/carbon/human
|
||||
G.dna.mutantrace = "adamantine"
|
||||
G.real_name = text("Adamantine Golem ([rand(1, 1000)])")
|
||||
G.equip_to_slot_or_del(new /obj/item/clothing/under/golem(G), slot_w_uniform)
|
||||
G.equip_to_slot_or_del(new /obj/item/clothing/suit/golem(G), slot_wear_suit)
|
||||
G.equip_to_slot_or_del(new /obj/item/clothing/shoes/golem(G), slot_shoes)
|
||||
G.equip_to_slot_or_del(new /obj/item/clothing/mask/gas/golem(G), slot_wear_mask)
|
||||
G.equip_to_slot_or_del(new /obj/item/clothing/gloves/golem(G), slot_gloves)
|
||||
G.loc = get_turf_loc(holder.my_atom)
|
||||
var/list/candidates = get_alien_candidates()
|
||||
var/candidate = pick(candidates)
|
||||
G.key = candidate
|
||||
G << "You are an adamantine golem. You move slowly, but are highly resistant to heat and cold as well as blunt trauma. You are unable to wear clothes, but can still use most tools. Serve the one created you, and assist them in completing their goals at any cost."
|
||||
|
||||
var/obj/effect/golemrune/Z = new /obj/effect/golemrune
|
||||
Z.loc = get_turf_loc(holder.my_atom)
|
||||
Z.announce_to_ghosts()
|
||||
//////////////////////////////////////////FOOD MIXTURES////////////////////////////////////
|
||||
|
||||
tofu
|
||||
@@ -1802,8 +1792,8 @@ datum
|
||||
name = "Changeling Sting"
|
||||
id = "changelingsting"
|
||||
result = "changelingsting"
|
||||
required_reagents = list("orangejuice" = 1, "limejuice" = 1, "lemonjuice" = 1, "vodka" = 1)
|
||||
result_amount = 4
|
||||
required_reagents = list("screwdrivercocktail" = 1, "limejuice" = 1, "lemonjuice" = 1)
|
||||
result_amount = 5
|
||||
|
||||
aloe
|
||||
name = "Aloe"
|
||||
|
||||
@@ -1174,9 +1174,9 @@
|
||||
bitesize = 5
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/bloodsoup
|
||||
name = "Meatball soup"
|
||||
name = "Tomato soup"
|
||||
desc = "Smells like copper"
|
||||
icon_state = "meatballsoup"
|
||||
icon_state = "tomatosoup"
|
||||
New()
|
||||
..()
|
||||
reagents.add_reagent("nutriment", 2)
|
||||
|
||||
@@ -26,10 +26,11 @@
|
||||
/obj/machinery/bot/medbot,
|
||||
/obj/machinery/computer/pandemic,
|
||||
/obj/item/weapon/storage/secure/safe,
|
||||
/obj/machinery/disposal,
|
||||
/obj/machinery/iv_drip,
|
||||
/obj/machinery/disease2/incubator
|
||||
)
|
||||
/obj/machinery/disease2/incubator,
|
||||
/obj/machinery/disposal,
|
||||
/mob/living/simple_animal/cow,
|
||||
/mob/living/simple_animal/hostile/retaliate/goat )
|
||||
|
||||
examine()
|
||||
set src in view()
|
||||
|
||||
@@ -1073,16 +1073,16 @@ datum/design/subspace_amplifier
|
||||
datum/design/subspace_treatment
|
||||
name = "Subspace Treatment Disk"
|
||||
desc = "A compact micro-machine capable of stretching out hyper-compressed radio waves."
|
||||
id = "s-amplifier"
|
||||
id = "s-treatment"
|
||||
req_tech = list("programming" = 3, "magnets" = 2, "materials" = 4, "bluespace" = 2)
|
||||
build_type = PROTOLATHE
|
||||
materials = list("$metal" = 10, "$silver" = 20)
|
||||
build_path = "/obj/item/weapon/stock_parts/subspace/treatment"
|
||||
|
||||
datum/design/subspace_analyzer
|
||||
name = "Subspace Treatment Disk"
|
||||
name = "Subspace Analyzer"
|
||||
desc = "A sophisticated analyzer capable of analyzing cryptic subspace wavelengths."
|
||||
id = "s-amplifier"
|
||||
id = "s-analyzer"
|
||||
req_tech = list("programming" = 3, "magnets" = 4, "materials" = 4, "bluespace" = 2)
|
||||
build_type = PROTOLATHE
|
||||
materials = list("$metal" = 10, "$gold" = 15)
|
||||
@@ -1091,7 +1091,7 @@ datum/design/subspace_analyzer
|
||||
datum/design/subspace_crystal
|
||||
name = "Ansible Crystal"
|
||||
desc = "A sophisticated analyzer capable of analyzing cryptic subspace wavelengths."
|
||||
id = "s-amplifier"
|
||||
id = "s-crystal"
|
||||
req_tech = list("magnets" = 4, "materials" = 4, "bluespace" = 2)
|
||||
build_type = PROTOLATHE
|
||||
materials = list("$glass" = 1000, "$silver" = 20, "$gold" = 20)
|
||||
@@ -1100,7 +1100,7 @@ datum/design/subspace_crystal
|
||||
datum/design/subspace_transmitter
|
||||
name = "Subspace Transmitter"
|
||||
desc = "A large piece of equipment used to open a window into the subspace dimension."
|
||||
id = "s-amplifier"
|
||||
id = "s-transmitter"
|
||||
req_tech = list("magnets" = 5, "materials" = 5, "bluespace" = 3)
|
||||
build_type = PROTOLATHE
|
||||
materials = list("$glass" = 100, "$silver" = 10, "$uranium" = 15)
|
||||
|
||||
@@ -355,53 +355,54 @@ won't update every console in existence) but it's more of a hassle to do. Also,
|
||||
if(D.id == href_list["build"])
|
||||
being_built = D
|
||||
break
|
||||
var/power = 2000
|
||||
for(var/M in being_built.materials)
|
||||
power += round(being_built.materials[M] / 5)
|
||||
power = max(2000, power)
|
||||
screen = 0.3
|
||||
linked_lathe.busy = 1
|
||||
flick("protolathe_n",linked_lathe)
|
||||
var/key = usr.key //so we don't lose the info during the spawn delay
|
||||
spawn(16)
|
||||
use_power(power)
|
||||
if(being_built)
|
||||
var/power = 2000
|
||||
for(var/M in being_built.materials)
|
||||
power += round(being_built.materials[M] / 5)
|
||||
power = max(2000, power)
|
||||
screen = 0.3
|
||||
linked_lathe.busy = 1
|
||||
flick("protolathe_n",linked_lathe)
|
||||
var/key = usr.key //so we don't lose the info during the spawn delay
|
||||
spawn(16)
|
||||
for(var/M in being_built.materials)
|
||||
switch(M)
|
||||
if("$metal")
|
||||
linked_lathe.m_amount = max(0, (linked_lathe.m_amount-being_built.materials[M]))
|
||||
if("$glass")
|
||||
linked_lathe.g_amount = max(0, (linked_lathe.g_amount-being_built.materials[M]))
|
||||
if("$gold")
|
||||
linked_lathe.gold_amount = max(0, (linked_lathe.gold_amount-being_built.materials[M]))
|
||||
if("$silver")
|
||||
linked_lathe.silver_amount = max(0, (linked_lathe.silver_amount-being_built.materials[M]))
|
||||
if("$plasma")
|
||||
linked_lathe.plasma_amount = max(0, (linked_lathe.plasma_amount-being_built.materials[M]))
|
||||
if("$uranium")
|
||||
linked_lathe.uranium_amount = max(0, (linked_lathe.uranium_amount-being_built.materials[M]))
|
||||
if("$diamond")
|
||||
linked_lathe.diamond_amount = max(0, (linked_lathe.diamond_amount-being_built.materials[M]))
|
||||
if("$clown")
|
||||
linked_lathe.clown_amount = max(0, (linked_lathe.clown_amount-being_built.materials[M]))
|
||||
else
|
||||
linked_lathe.reagents.remove_reagent(M, being_built.materials[M])
|
||||
use_power(power)
|
||||
spawn(16)
|
||||
for(var/M in being_built.materials)
|
||||
switch(M)
|
||||
if("$metal")
|
||||
linked_lathe.m_amount = max(0, (linked_lathe.m_amount-being_built.materials[M]))
|
||||
if("$glass")
|
||||
linked_lathe.g_amount = max(0, (linked_lathe.g_amount-being_built.materials[M]))
|
||||
if("$gold")
|
||||
linked_lathe.gold_amount = max(0, (linked_lathe.gold_amount-being_built.materials[M]))
|
||||
if("$silver")
|
||||
linked_lathe.silver_amount = max(0, (linked_lathe.silver_amount-being_built.materials[M]))
|
||||
if("$plasma")
|
||||
linked_lathe.plasma_amount = max(0, (linked_lathe.plasma_amount-being_built.materials[M]))
|
||||
if("$uranium")
|
||||
linked_lathe.uranium_amount = max(0, (linked_lathe.uranium_amount-being_built.materials[M]))
|
||||
if("$diamond")
|
||||
linked_lathe.diamond_amount = max(0, (linked_lathe.diamond_amount-being_built.materials[M]))
|
||||
if("$clown")
|
||||
linked_lathe.clown_amount = max(0, (linked_lathe.clown_amount-being_built.materials[M]))
|
||||
else
|
||||
linked_lathe.reagents.remove_reagent(M, being_built.materials[M])
|
||||
|
||||
if(being_built.build_path)
|
||||
var/obj/new_item = new being_built.build_path(src)
|
||||
if( new_item.type == /obj/item/weapon/storage/backpack/holding )
|
||||
new_item.investigate_log("built by [key]","singulo")
|
||||
new_item.reliability = being_built.reliability
|
||||
if(linked_lathe.hacked) being_built.reliability = max((reliability / 2), 0)
|
||||
if(being_built.locked)
|
||||
var/obj/item/weapon/storage/lockbox/L = new/obj/item/weapon/storage/lockbox(linked_lathe.loc)
|
||||
new_item.loc = L
|
||||
L.name += " ([new_item.name])"
|
||||
else
|
||||
new_item.loc = linked_lathe.loc
|
||||
linked_lathe.busy = 0
|
||||
screen = 3.1
|
||||
updateUsrDialog()
|
||||
if(being_built.build_path)
|
||||
var/obj/new_item = new being_built.build_path(src)
|
||||
if( new_item.type == /obj/item/weapon/storage/backpack/holding )
|
||||
new_item.investigate_log("built by [key]","singulo")
|
||||
new_item.reliability = being_built.reliability
|
||||
if(linked_lathe.hacked) being_built.reliability = max((reliability / 2), 0)
|
||||
if(being_built.locked)
|
||||
var/obj/item/weapon/storage/lockbox/L = new/obj/item/weapon/storage/lockbox(linked_lathe.loc)
|
||||
new_item.loc = L
|
||||
L.name += " ([new_item.name])"
|
||||
else
|
||||
new_item.loc = linked_lathe.loc
|
||||
linked_lathe.busy = 0
|
||||
screen = 3.1
|
||||
updateUsrDialog()
|
||||
|
||||
else if(href_list["imprint"]) //Causes the Circuit Imprinter to build something.
|
||||
if(linked_imprinter)
|
||||
@@ -410,32 +411,33 @@ won't update every console in existence) but it's more of a hassle to do. Also,
|
||||
if(D.id == href_list["imprint"])
|
||||
being_built = D
|
||||
break
|
||||
var/power = 2000
|
||||
for(var/M in being_built.materials)
|
||||
power += round(being_built.materials[M] / 5)
|
||||
power = max(2000, power)
|
||||
screen = 0.4
|
||||
linked_imprinter.busy = 1
|
||||
flick("circuit_imprinter_ani",linked_imprinter)
|
||||
spawn(16)
|
||||
use_power(power)
|
||||
if(being_built)
|
||||
var/power = 2000
|
||||
for(var/M in being_built.materials)
|
||||
switch(M)
|
||||
if("$glass")
|
||||
linked_imprinter.g_amount = max(0, (linked_imprinter.g_amount-being_built.materials[M]))
|
||||
if("$gold")
|
||||
linked_imprinter.gold_amount = max(0, (linked_imprinter.gold_amount-being_built.materials[M]))
|
||||
if("$diamond")
|
||||
linked_imprinter.diamond_amount = max(0, (linked_imprinter.diamond_amount-being_built.materials[M]))
|
||||
else
|
||||
linked_imprinter.reagents.remove_reagent(M, being_built.materials[M])
|
||||
var/obj/new_item = new being_built.build_path(src)
|
||||
new_item.reliability = being_built.reliability
|
||||
if(linked_imprinter.hacked) being_built.reliability = max((reliability / 2), 0)
|
||||
new_item.loc = linked_imprinter.loc
|
||||
linked_imprinter.busy = 0
|
||||
screen = 4.1
|
||||
updateUsrDialog()
|
||||
power += round(being_built.materials[M] / 5)
|
||||
power = max(2000, power)
|
||||
screen = 0.4
|
||||
linked_imprinter.busy = 1
|
||||
flick("circuit_imprinter_ani",linked_imprinter)
|
||||
spawn(16)
|
||||
use_power(power)
|
||||
for(var/M in being_built.materials)
|
||||
switch(M)
|
||||
if("$glass")
|
||||
linked_imprinter.g_amount = max(0, (linked_imprinter.g_amount-being_built.materials[M]))
|
||||
if("$gold")
|
||||
linked_imprinter.gold_amount = max(0, (linked_imprinter.gold_amount-being_built.materials[M]))
|
||||
if("$diamond")
|
||||
linked_imprinter.diamond_amount = max(0, (linked_imprinter.diamond_amount-being_built.materials[M]))
|
||||
else
|
||||
linked_imprinter.reagents.remove_reagent(M, being_built.materials[M])
|
||||
var/obj/new_item = new being_built.build_path(src)
|
||||
new_item.reliability = being_built.reliability
|
||||
if(linked_imprinter.hacked) being_built.reliability = max((reliability / 2), 0)
|
||||
new_item.loc = linked_imprinter.loc
|
||||
linked_imprinter.busy = 0
|
||||
screen = 4.1
|
||||
updateUsrDialog()
|
||||
|
||||
else if(href_list["disposeI"] && linked_imprinter) //Causes the circuit imprinter to dispose of a single reagent (all of it)
|
||||
linked_imprinter.reagents.del_reagent(href_list["dispose"])
|
||||
|
||||
@@ -68,7 +68,7 @@ proc/do_surgery(mob/living/M, mob/living/user, obj/item/tool)
|
||||
if (user.a_intent == "harm") //check for Hippocratic Oath
|
||||
return 0
|
||||
for(var/datum/surgery_step/S in surgery_steps)
|
||||
if( S.isright(tool) || S.isacceptable(tool) && \
|
||||
if( (S.isright(tool) || S.isacceptable(tool)) && \
|
||||
S.can_use(user, M, user.zone_sel.selecting, tool)) //check if tool is right or close enough and if this step is possible
|
||||
S.begin_step(user, M, user.zone_sel.selecting, tool) //start on it
|
||||
if(do_mob(user, M, rand(S.min_duration, S.max_duration))) //if user did nto move or changed hands
|
||||
|
||||
Reference in New Issue
Block a user