mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-28 15:47:15 +01:00
Merge branch 'master' into meido
Conflicts: code/modules/clothing/under/miscellaneous.dm icons/mob/uniform.dmi icons/obj/clothing/uniforms.dmi
This commit is contained in:
@@ -2,6 +2,9 @@
|
||||
//SS13 Optimized Map loader
|
||||
//////////////////////////////////////////////////////////////
|
||||
|
||||
//global datum that will preload variables on atoms instanciation
|
||||
var/global/dmm_suite/preloader/_preloader = null
|
||||
|
||||
|
||||
/**
|
||||
* Construct the model map and control the loading process
|
||||
@@ -163,7 +166,7 @@
|
||||
//first instance the /area and remove it from the members list
|
||||
index = members.len
|
||||
var/atom/instance
|
||||
var/dmm_suite/preloader/_preloader = new(members_attributes[index])//preloader for assigning set variables on atom creation
|
||||
_preloader = new(members_attributes[index])//preloader for assigning set variables on atom creation
|
||||
|
||||
instance = locate(members[index])
|
||||
instance.contents.Add(locate(xcrd,ycrd,zcrd))
|
||||
@@ -191,34 +194,6 @@
|
||||
T = UT
|
||||
index++
|
||||
|
||||
|
||||
//Replace the previous part of the code with this if it's unsafe to assume tiles have ALWAYS an /area AND a /turf
|
||||
/*while(members.len > 0)
|
||||
var/length = members.len
|
||||
var/member = members[length]
|
||||
|
||||
if(ispath(member,/area))
|
||||
var/atom/instance
|
||||
var/dmm_suite/preloader/_preloader = new(members_attributes[length])
|
||||
|
||||
instance = locate(member)
|
||||
instance.contents.Add(locate(xcrd,ycrd,zcrd))
|
||||
|
||||
if(_preloader && instance)
|
||||
_preloader.load(instance)
|
||||
|
||||
members.Remove(member)
|
||||
continue
|
||||
|
||||
else if(ispath(member,/turf))
|
||||
instance_atom(member,members_attributes[length],xcrd,ycrd,zcrd)
|
||||
members.Remove(member)
|
||||
continue
|
||||
|
||||
else
|
||||
break
|
||||
*/
|
||||
|
||||
//finally instance all remainings objects/mobs
|
||||
for(index=1,index < first_turf_index,index++)
|
||||
instance_atom(members[index],members_attributes[index],xcrd,ycrd,zcrd)
|
||||
@@ -230,11 +205,11 @@
|
||||
//Instance an atom at (x,y,z) and gives it the variables in attributes
|
||||
/dmm_suite/proc/instance_atom(var/path,var/list/attributes, var/x, var/y, var/z)
|
||||
var/atom/instance
|
||||
var/dmm_suite/preloader/_preloader = new(attributes)
|
||||
_preloader = new(attributes, path)
|
||||
|
||||
instance = new path (locate(x,y,z), _preloader)//first preloader pass
|
||||
instance = new path (locate(x,y,z))//first preloader pass
|
||||
|
||||
if(_preloader && instance)//second preloader pass, as some variables may have been reset/changed by New()
|
||||
if(_preloader && instance)//second preloader pass, for those atoms that don't ..() in New()
|
||||
_preloader.load(instance)
|
||||
|
||||
return instance
|
||||
@@ -242,9 +217,9 @@
|
||||
//text trimming (both directions) helper proc
|
||||
//optionally removes quotes before and after the text (for variable name)
|
||||
/dmm_suite/proc/trim_text(var/what as text,var/trim_quotes=0)
|
||||
while(length(what) && (findtext(what," ",1,2)))// || findtext(what,quote,1,2)))
|
||||
while(length(what) && (findtext(what," ",1,2)))
|
||||
what=copytext(what,2,0)
|
||||
while(length(what) && (findtext(what," ",length(what),0)))// || findtext(what,quote,length(what),0)))
|
||||
while(length(what) && (findtext(what," ",length(what),0)))
|
||||
what=copytext(what,1,length(what))
|
||||
if(trim_quotes)
|
||||
while(length(what) && (findtext(what,quote,1,2)))
|
||||
@@ -298,14 +273,18 @@
|
||||
else if(isnum(text2num(trim_right)))
|
||||
trim_right = text2num(trim_right)
|
||||
|
||||
//Check for file
|
||||
else if(copytext(trim_right,1,2) == "'")
|
||||
trim_right = file(copytext(trim_right,2,length(trim_right)))
|
||||
//Check for null
|
||||
else if(trim_right == "null")
|
||||
trim_right = null
|
||||
|
||||
//Check for list
|
||||
else if(copytext(trim_right,1,5) == "list")
|
||||
trim_right = text2list(copytext(trim_right,6,length(trim_right)))
|
||||
|
||||
//Check for file
|
||||
else if(copytext(trim_right,1,2) == "'")
|
||||
trim_right = file(copytext(trim_right,2,length(trim_right)))
|
||||
|
||||
to_return[trim_left] = trim_right
|
||||
|
||||
else//simple var
|
||||
@@ -323,10 +302,11 @@
|
||||
placed.opacity = 1
|
||||
placed.underlays += turfs_underlays
|
||||
|
||||
//atom creation method that preloads variables before creation
|
||||
/atom/New(atom/loc, dmm_suite/preloader/_dmm_preloader)
|
||||
if(istype(_dmm_preloader, /dmm_suite/preloader))
|
||||
_dmm_preloader.load(src)
|
||||
//atom creation method that preloads variables at creation
|
||||
/atom/New()
|
||||
if(_preloader && (src.type == _preloader.target_path))//in case the instanciated atom is creating other atoms in New()
|
||||
_preloader.load(src)
|
||||
|
||||
. = ..()
|
||||
|
||||
//////////////////
|
||||
@@ -336,12 +316,15 @@
|
||||
/dmm_suite/preloader
|
||||
parent_type = /datum
|
||||
var/list/attributes
|
||||
var/target_path
|
||||
|
||||
/dmm_suite/preloader/New(list/the_attributes)
|
||||
/dmm_suite/preloader/New(var/list/the_attributes, var/path)
|
||||
.=..()
|
||||
if(!the_attributes.len)
|
||||
Del()
|
||||
return
|
||||
attributes = the_attributes
|
||||
target_path = path
|
||||
|
||||
/dmm_suite/preloader/proc/load(atom/what)
|
||||
for(var/attribute in attributes)
|
||||
|
||||
@@ -163,7 +163,7 @@ var/sc_safecode5 = "[rand(0,9)]"
|
||||
desc = "Your body becomes weak and your feel your mind slipping away as you try to comprehend what you know can't be possible."
|
||||
move_self = 0 //Contianed narsie does not move!
|
||||
grav_pull = 0 //Contained narsie does not pull stuff in!
|
||||
|
||||
var/uneatable = list(/turf/space, /obj/effect/overlay, /mob/living/simple_animal/construct)
|
||||
//Override this to prevent no adminlog runtimes and admin warnings about a singularity without containment
|
||||
/obj/singularity/narsie/sc_Narsie/admin_investigate_setup()
|
||||
return
|
||||
|
||||
@@ -376,6 +376,33 @@
|
||||
fitted = 0
|
||||
can_adjust = 0
|
||||
|
||||
/obj/item/clothing/under/stripeddress
|
||||
name = "striped dress"
|
||||
desc = "Fashion in space."
|
||||
icon_state = "striped_dress"
|
||||
item_state = "stripeddress"
|
||||
item_color = "striped_dress"
|
||||
fitted = 0
|
||||
can_adjust = 0
|
||||
|
||||
/obj/item/clothing/under/sailordress
|
||||
name = "sailor dress"
|
||||
desc = "Formal wear for a leading lady."
|
||||
icon_state = "sailor_dress"
|
||||
item_state = "sailordress"
|
||||
item_color = "sailor_dress"
|
||||
fitted = 0
|
||||
can_adjust = 0
|
||||
|
||||
/obj/item/clothing/under/redeveninggown
|
||||
name = "red evening gown"
|
||||
desc = "Fancy dress for space bar singers."
|
||||
icon_state = "red_evening_gown"
|
||||
item_state = "redeveninggown"
|
||||
item_color = "red_evening_gown"
|
||||
fitted = 0
|
||||
can_adjust = 0
|
||||
|
||||
/obj/item/clothing/under/maid
|
||||
name = "maid costume"
|
||||
desc = "Maid in China."
|
||||
|
||||
@@ -211,21 +211,10 @@
|
||||
name = "\improper Donk-pocket"
|
||||
desc = "The food of choice for the seasoned traitor."
|
||||
icon_state = "donkpocket"
|
||||
var/warm = 0
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/donkpocket/New()
|
||||
..()
|
||||
reagents.add_reagent("nutriment", 4)
|
||||
reagents.add_reagent("sugar", 5)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/donkpocket/proc/cooltime() //Not working, derp?
|
||||
if(warm)
|
||||
spawn(4200) //ew
|
||||
warm = 0
|
||||
reagents.del_reagent("tricordrazine")
|
||||
reagents.add_reagent("sugar", 5)
|
||||
name = initial(name)
|
||||
return
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/fortunecookie
|
||||
name = "fortune cookie"
|
||||
|
||||
@@ -71,34 +71,10 @@
|
||||
/datum/recipe/donkpocket
|
||||
reagents = list("flour" = 5)
|
||||
items = list(
|
||||
/obj/item/weapon/reagent_containers/food/snacks/faggot,
|
||||
/obj/item/weapon/reagent_containers/food/snacks/faggot
|
||||
)
|
||||
result = /obj/item/weapon/reagent_containers/food/snacks/donkpocket //SPECIAL
|
||||
result = /obj/item/weapon/reagent_containers/food/snacks/donkpocket
|
||||
|
||||
/datum/recipe/donkpocket/proc/warm_up(var/obj/item/weapon/reagent_containers/food/snacks/donkpocket/being_cooked)
|
||||
being_cooked.warm = 1
|
||||
being_cooked.reagents.add_reagent("tricordrazine", 5)
|
||||
being_cooked.reagents.del_reagent("sugar")
|
||||
being_cooked.bitesize = 6
|
||||
being_cooked.name = "Warm " + being_cooked.name
|
||||
being_cooked.cooltime()
|
||||
|
||||
/datum/recipe/donkpocket/make_food(var/obj/container as obj)
|
||||
var/obj/item/weapon/reagent_containers/food/snacks/donkpocket/being_cooked = ..(container)
|
||||
warm_up(being_cooked)
|
||||
return being_cooked
|
||||
|
||||
/datum/recipe/donkpocket/warm
|
||||
reagents = list() //This is necessary since this is a child object of the above recipe and we don't want donk pockets to need flour
|
||||
items = list(
|
||||
/obj/item/weapon/reagent_containers/food/snacks/donkpocket
|
||||
)
|
||||
result = /obj/item/weapon/reagent_containers/food/snacks/donkpocket //SPECIAL
|
||||
make_food(var/obj/container as obj)
|
||||
var/obj/item/weapon/reagent_containers/food/snacks/donkpocket/being_cooked = locate() in container
|
||||
if(being_cooked && !being_cooked.warm)
|
||||
warm_up(being_cooked)
|
||||
return being_cooked
|
||||
|
||||
////////////////////////////////////////////////MUFFINS////////////////////////////////////////////////
|
||||
|
||||
|
||||
@@ -301,3 +301,13 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
return 0
|
||||
usr.visible_message("<span class='deadsay'><b>[src]</b> points to [A]</span>")
|
||||
return 1
|
||||
|
||||
/mob/dead/observer/verb/view_manfiest()
|
||||
set name = "View Crew Manifest"
|
||||
set category = "Ghost"
|
||||
|
||||
var/dat
|
||||
dat += "<h4>Crew Manifest</h4>"
|
||||
dat += data_core.get_manifest()
|
||||
|
||||
src << browse(dat, "window=manifest;size=370x420;can_close=1")
|
||||
@@ -762,6 +762,13 @@
|
||||
/mob/living/singularity_pull(S)
|
||||
step_towards(src,S)
|
||||
|
||||
/mob/living/narsie_act()
|
||||
if(client)
|
||||
makeNewConstruct(/mob/living/simple_animal/construct/harvester, src, null, 1)
|
||||
spawn_dust()
|
||||
gib()
|
||||
return
|
||||
|
||||
/mob/living/proc/do_attack_animation(atom/A)
|
||||
var/pixel_x_diff = 0
|
||||
var/pixel_y_diff = 0
|
||||
|
||||
@@ -261,6 +261,8 @@ var/list/department_radio_keys = list(
|
||||
if(stuttering)
|
||||
message = stutter(message)
|
||||
|
||||
message = capitalize(message)
|
||||
|
||||
return message
|
||||
|
||||
/mob/living/proc/radio(message, message_mode, steps)
|
||||
|
||||
@@ -70,7 +70,8 @@
|
||||
Proj.on_hit(src, 0)
|
||||
return 0
|
||||
|
||||
|
||||
/mob/living/simple_animal/construct/narsie_act()
|
||||
return
|
||||
|
||||
/////////////////Juggernaut///////////////
|
||||
|
||||
|
||||
@@ -25,10 +25,13 @@
|
||||
var/output = "<center><p><a href='byond://?src=\ref[src];show_preferences=1'>Setup Character</A></p>"
|
||||
|
||||
if(!ticker || ticker.current_state <= GAME_STATE_PREGAME)
|
||||
if(!ready) output += "<p><a href='byond://?src=\ref[src];ready=1'>Declare Ready</A></p>"
|
||||
else output += "<p><b>You are ready</b> <a href='byond://?src=\ref[src];ready=0'>Cancel</A></p>"
|
||||
if(ready)
|
||||
output += "<p>\[ <b>Ready</b> | <a href='byond://?src=\ref[src];ready=0'>Not Ready</a> \]</p>"
|
||||
else
|
||||
output += "<p>\[ <a href='byond://?src=\ref[src];ready=1'>Ready</a> | <b>Not Ready</b> \]</p>"
|
||||
|
||||
else
|
||||
output += "<a href='byond://?src=\ref[src];manifest=1'>View the Crew Manifest</A><br><br>"
|
||||
output += "<p><a href='byond://?src=\ref[src];late_join=1'>Join Game!</A></p>"
|
||||
|
||||
output += "<p><a href='byond://?src=\ref[src];observe=1'>Observe</A></p>"
|
||||
@@ -98,7 +101,10 @@
|
||||
return 1
|
||||
|
||||
if(href_list["ready"])
|
||||
ready = text2num(href_list["ready"])
|
||||
if(!ticker || ticker.current_state <= GAME_STATE_PREGAME) // Make sure we don't ready up after the round has started
|
||||
ready = !ready
|
||||
else
|
||||
ready = 0
|
||||
|
||||
if(href_list["refresh"])
|
||||
src << browse(null, "window=playersetup") //closes the player setup window
|
||||
@@ -136,6 +142,9 @@
|
||||
return
|
||||
LateChoices()
|
||||
|
||||
if(href_list["manifest"])
|
||||
ViewManifest()
|
||||
|
||||
if(href_list["SelectedJob"])
|
||||
|
||||
if(!enter_allowed)
|
||||
@@ -364,6 +373,12 @@
|
||||
|
||||
return new_character
|
||||
|
||||
/mob/new_player/proc/ViewManifest()
|
||||
var/dat = "<html><body>"
|
||||
dat += "<h4>Crew Manifest</h4>"
|
||||
dat += data_core.get_manifest(OOC = 1)
|
||||
|
||||
src << browse(dat, "window=manifest;size=370x420;can_close=1")
|
||||
|
||||
/mob/new_player/Move()
|
||||
return 0
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
move_self = 1 //Do we move on our own?
|
||||
grav_pull = 5 //How many tiles out do we pull?
|
||||
consume_range = 6 //How many tiles out do we eat
|
||||
var/uneatable = list(/turf/space, /obj/effect/overlay, /mob/living/simple_animal/construct)
|
||||
|
||||
/obj/singularity/narsie/large
|
||||
name = "Nar-Sie"
|
||||
@@ -84,25 +83,7 @@
|
||||
|
||||
|
||||
/obj/singularity/narsie/consume(var/atom/A)
|
||||
if(is_type_in_list(A, uneatable))
|
||||
return 0
|
||||
|
||||
if(istype(A,/mob/living/))
|
||||
var/mob/living/C = A
|
||||
if(C.client)
|
||||
makeNewConstruct(/mob/living/simple_animal/construct/harvester, C, null, 1)
|
||||
C.spawn_dust()
|
||||
C.gib()
|
||||
return
|
||||
|
||||
if(isturf(A))
|
||||
var/turf/T = A
|
||||
if(istype(T, /turf/simulated/floor) && !istype(T, /turf/simulated/floor/engine/cult))
|
||||
if(prob(20)) T.ChangeTurf(/turf/simulated/floor/engine/cult)
|
||||
|
||||
else if(istype(T,/turf/simulated/wall) && !istype(T, /turf/simulated/wall/cult))
|
||||
if(prob(20)) T.ChangeTurf(/turf/simulated/wall/cult)
|
||||
return
|
||||
A.narsie_act()
|
||||
|
||||
|
||||
/obj/singularity/narsie/ex_act() //No throwing bombs at it either. --NEO
|
||||
|
||||
@@ -83,23 +83,28 @@
|
||||
M.drop_item()
|
||||
return
|
||||
|
||||
if(isliving(user))
|
||||
var/mob/living/L = user
|
||||
if(!can_trigger_gun(L))
|
||||
return
|
||||
|
||||
process_fire(target,user,flag,params)
|
||||
|
||||
/obj/item/weapon/gun/proc/can_trigger_gun(mob/living/user)
|
||||
if (!user.IsAdvancedToolUser())
|
||||
user << "<span class='notice'>You don't have the dexterity to do this!</span>"
|
||||
return
|
||||
return 0
|
||||
|
||||
if(trigger_guard)
|
||||
if(istype(user, /mob/living))
|
||||
var/mob/living/M = user
|
||||
if (HULK in M.mutations)
|
||||
M << "<span class='notice'>Your meaty finger is much too large for the trigger guard!</span>"
|
||||
return
|
||||
if (HULK in user.mutations)
|
||||
user << "<span class='notice'>Your meaty finger is much too large for the trigger guard!</span>"
|
||||
return 0
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(H.dna && NOGUNS in H.dna.species.specflags)
|
||||
user << "<span class='notice'>Your fingers don't fit in the trigger guard!</span>"
|
||||
return
|
||||
|
||||
process_fire(target,user,flag,params)
|
||||
return 0
|
||||
return 1
|
||||
|
||||
/obj/item/weapon/gun/proc/process_fire(atom/target as mob|obj|turf, mob/living/user as mob|obj, var/message = 1, params)
|
||||
|
||||
|
||||
@@ -175,7 +175,7 @@
|
||||
return
|
||||
|
||||
/obj/item/weapon/gun/projectile/revolver/russian/attack_self(mob/user as mob)
|
||||
if(!spun && get_ammo(0,0))
|
||||
if(!spun && can_shoot())
|
||||
user.visible_message("<span class='warning'>[user] spins the chamber of the revolver.</span>", "<span class='warning'>You spin the revolver's chamber.</span>")
|
||||
Spin()
|
||||
else
|
||||
@@ -193,34 +193,35 @@
|
||||
user << "<span class='notice'>[src] is empty.</span>"
|
||||
|
||||
/obj/item/weapon/gun/projectile/revolver/russian/afterattack(atom/target as mob|obj|turf, mob/living/user as mob|obj, flag, params)
|
||||
if(!spun && get_ammo(0,0))
|
||||
user.visible_message("<span class='warning'>[user] spins the chamber of the revolver.</span>", "<span class='warning'>You spin the revolver's chamber.</span>")
|
||||
Spin()
|
||||
..()
|
||||
spun = 0
|
||||
|
||||
/obj/item/weapon/gun/projectile/revolver/russian/attack(atom/target as mob|obj|turf|area, mob/living/user as mob|obj)
|
||||
if(!spun && get_ammo(0,0))
|
||||
user.visible_message("<span class='warning'>[user] spins the chamber of the revolver.</span>", "<span class='warning'>You spin the revolver's chamber.</span>")
|
||||
Spin()
|
||||
if(user.a_intent == "harm") // Flogging action
|
||||
return
|
||||
if(isliving(user))
|
||||
if(!can_trigger_gun(user))
|
||||
return
|
||||
if(target != user)
|
||||
user << "<span class='warning'>A mechanism prevents you from shooting anyone but yourself.</span>"
|
||||
return
|
||||
|
||||
|
||||
if(target == user)
|
||||
if(!chambered)
|
||||
user.visible_message("<span class='danger'>*click*</span>", "<span class='danger'>*click*</span>")
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(!spun)
|
||||
user << "<span class='warning'>You need to spin the revolver's chamber first.</span>"
|
||||
return
|
||||
|
||||
if(isliving(target) && isliving(user))
|
||||
var/obj/item/organ/limb/affecting = user.zone_sel.selecting
|
||||
if(affecting == "head")
|
||||
var/obj/item/ammo_casing/AC = chambered
|
||||
if(AC.fire(user, user))
|
||||
spun = 0
|
||||
|
||||
if(chambered)
|
||||
var/obj/item/ammo_casing/AC = chambered
|
||||
if(AC.fire(user, user))
|
||||
playsound(user, fire_sound, 50, 1)
|
||||
var/obj/item/organ/limb/affecting = H.get_organ(check_zone(user.zone_sel.selecting))
|
||||
var/limb_name = affecting.getDisplayName()
|
||||
if(affecting == "head" || affecting == "eyes" || affecting == "mouth")
|
||||
user.apply_damage(300, BRUTE, affecting)
|
||||
playsound(user, fire_sound, 50, 1)
|
||||
user.visible_message("<span class='danger'>[user.name] fires [src] at \his head!</span>", "<span class='danger'>You fire [src] at your head!</span>", "You hear a [istype(AC.BB, /obj/item/projectile/beam) ? "laser blast" : "gunshot"]!")
|
||||
return
|
||||
user.visible_message("<span class='danger'>[user.name] fires [src] at \his head!</span>", "<span class='userdanger'>You fire [src] at your head!</span>", "You hear a gunshot!")
|
||||
else
|
||||
user.visible_message("<span class='danger'>*click*</span>", "<span class='danger'>*click*</span>")
|
||||
return
|
||||
..()
|
||||
user.visible_message("<span class='danger'>[user.name] cowardly fires [src] at \his [limb_name]!</span>", "<span class='userdanger'>You cowardly fire [src] at your [limb_name]!</span>", "You hear a gunshot!")
|
||||
return
|
||||
|
||||
user.visible_message("<span class='danger'>*click*</span>")
|
||||
playsound(user, 'sound/weapons/empty.ogg', 100, 1)
|
||||
|
||||
Reference in New Issue
Block a user